<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Storing on/off switches through binary representation</title>
	<atom:link href="http://visual77.com/blog/2010/01/storing-onoff-switches-through-binary-representation/feed/" rel="self" type="application/rss+xml" />
	<link>http://visual77.com/blog/2010/01/storing-onoff-switches-through-binary-representation/</link>
	<description>Ramblings from Steve Phillips</description>
	<lastBuildDate>Tue, 13 Sep 2011 20:36:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: DiscDev</title>
		<link>http://visual77.com/blog/2010/01/storing-onoff-switches-through-binary-representation/comment-page-1/#comment-4463</link>
		<dc:creator>DiscDev</dc:creator>
		<pubDate>Wed, 05 Jan 2011 22:41:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.visual77.com/blog/?p=502#comment-4463</guid>
		<description>&lt;strong&gt;Using binary numbers for permissions...&lt;/strong&gt;

I am building a permissions system on the Kohana framework(PHP) using binary numbers and bitwise operators. Below are the 5 binary flags I will be using for permissions: binary flag(permission level) = permission = binary number 1 = view = 00001 2 = ed...</description>
		<content:encoded><![CDATA[<p><strong>Using binary numbers for permissions&#8230;</strong></p>
<p>I am building a permissions system on the Kohana framework(PHP) using binary numbers and bitwise operators. Below are the 5 binary flags I will be using for permissions: binary flag(permission level) = permission = binary number 1 = view = 00001 2 = ed&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tinus</title>
		<link>http://visual77.com/blog/2010/01/storing-onoff-switches-through-binary-representation/comment-page-1/#comment-2387</link>
		<dc:creator>Tinus</dc:creator>
		<pubDate>Mon, 14 Jun 2010 16:05:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.visual77.com/blog/?p=502#comment-2387</guid>
		<description>Ah, right. Makes sense. Should have thought of that. Either way, nice article, keep it up!</description>
		<content:encoded><![CDATA[<p>Ah, right. Makes sense. Should have thought of that. Either way, nice article, keep it up!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: visual77</title>
		<link>http://visual77.com/blog/2010/01/storing-onoff-switches-through-binary-representation/comment-page-1/#comment-2386</link>
		<dc:creator>visual77</dc:creator>
		<pubDate>Mon, 14 Jun 2010 15:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.visual77.com/blog/?p=502#comment-2386</guid>
		<description>Good point, and this is a concept I should elaborate upon in this article. MySQL has bitwise operators just as PHP does. To get all records with a particular light set, you would structure the SQL query like this:

&quot;SELECT * FROM `light_walkthroughs` WHERE `light` &amp; 256 &gt; 0&quot;

256 is the reception listing, as can be inferred through the earlier table listing each of the areas. &quot;`light` &amp; 256 &gt; 0&quot; is a bitwise operation that will find all entries where the 256 flag (2^8) are enabled.</description>
		<content:encoded><![CDATA[<p>Good point, and this is a concept I should elaborate upon in this article. MySQL has bitwise operators just as PHP does. To get all records with a particular light set, you would structure the SQL query like this:</p>
<p>&#8220;SELECT * FROM `light_walkthroughs` WHERE `light` &#038; 256 > 0&#8243;</p>
<p>256 is the reception listing, as can be inferred through the earlier table listing each of the areas. &#8220;`light` &#038; 256 > 0&#8243; is a bitwise operation that will find all entries where the 256 flag (2^8) are enabled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tinus</title>
		<link>http://visual77.com/blog/2010/01/storing-onoff-switches-through-binary-representation/comment-page-1/#comment-2383</link>
		<dc:creator>Tinus</dc:creator>
		<pubDate>Mon, 14 Jun 2010 13:48:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.visual77.com/blog/?p=502#comment-2383</guid>
		<description>No offence, but doesn&#039;t this defeat the purpose of having a table for the lights in the first place? For example, how would you query the table to return all records where the &quot;Reception&quot; lights are set?</description>
		<content:encoded><![CDATA[<p>No offence, but doesn&#8217;t this defeat the purpose of having a table for the lights in the first place? For example, how would you query the table to return all records where the &#8220;Reception&#8221; lights are set?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
