<?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: Bitwise And</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 12:03:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: mark kimber</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-17633</link>
		<dc:creator>mark kimber</dc:creator>
		<pubDate>Mon, 05 Dec 2005 13:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-17633</guid>
		<description>&lt;p&gt;oh, and things like Feng Shui Moving Stars in Excel, and transposing music from a stave to colours for your kiddies&#039; xylophone, I thought it was just me!&lt;/p&gt;
&lt;p&gt;still, the question that brought me here, a bitwise AND that can retrieve flags from my integer - anyone any clues?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>oh, and things like Feng Shui Moving Stars in Excel, and transposing music from a stave to colours for your kiddies&#8217; xylophone, I thought it was just me!</p>
<p>still, the question that brought me here, a bitwise AND that can retrieve flags from my integer &#8211; anyone any clues?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ross</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-2054</link>
		<dc:creator>ross</dc:creator>
		<pubDate>Wed, 28 Jul 2004 18:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-2054</guid>
		<description>&lt;p&gt;&quot;Great magazine, great author, recommended.&quot;&lt;br&gt;
Clearly, you see &quot;&lt;b&gt;british&lt;/b&gt; mag PcPlus&quot;, stands to reason!!!! lol, yak, yak.&lt;/p&gt;
&lt;p&gt;&quot;for my soon-to-be-launched website&quot;&lt;br&gt;
Look forward to that, &lt;/p&gt;
&lt;p&gt;and...&lt;/p&gt;
&lt;p&gt;&quot;A digital watch using Excel cells for display ? Wow. Only men do things like that&quot;&lt;/p&gt;
&lt;p&gt;.... Abso-bloodly-lutely!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&#8220;Great magazine, great author, recommended.&#8221;<br />
Clearly, you see &#8220;<b>british</b> mag PcPlus&#8221;, stands to reason!!!! lol, yak, yak.</p>
<p>&#8220;for my soon-to-be-launched website&#8221;<br />
Look forward to that, </p>
<p>and&#8230;</p>
<p>&#8220;A digital watch using Excel cells for display ? Wow. Only men do things like that&#8221;</p>
<p>&#8230;. Abso-bloodly-lutely!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harald Staff</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-2053</link>
		<dc:creator>Harald Staff</dc:creator>
		<pubDate>Wed, 28 Jul 2004 17:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-2053</guid>
		<description>&lt;p&gt;Wilf Hey wrote a similar series in british mag PcPlus on RPN and how it makes calculation programming logical and easy. Far too many calculators state that 2+3*4 is 20. Great magazine, great author, recommended.&lt;/p&gt;
&lt;p&gt;I use AND a lot to store/hide multiple TRUE/FALSE or YES/NO settings in a single Long variable. Not complicated, extremely useful. Writing a tutorial on it these days for my soon-to-be-launched website.&lt;/p&gt;
&lt;p&gt;A digital watch using Excel cells for display ? Wow. Only men do things like that&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Wilf Hey wrote a similar series in british mag PcPlus on RPN and how it makes calculation programming logical and easy. Far too many calculators state that 2+3*4 is 20. Great magazine, great author, recommended.</p>
<p>I use AND a lot to store/hide multiple TRUE/FALSE or YES/NO settings in a single Long variable. Not complicated, extremely useful. Writing a tutorial on it these days for my soon-to-be-launched website.</p>
<p>A digital watch using Excel cells for display ? Wow. Only men do things like that</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-2052</link>
		<dc:creator>Dick</dc:creator>
		<pubDate>Wed, 28 Jul 2004 14:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-2052</guid>
		<description>&lt;p&gt;&quot;Any luck with that scoreboard matrix/light thing?&quot;&lt;/p&gt;
&lt;p&gt;Juan Pablo has a nice digital clock that I hope to post later this week.  It&#039;s a good stepping stone to where I want to go.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&#8220;Any luck with that scoreboard matrix/light thing?&#8221;</p>
<p>Juan Pablo has a nice digital clock that I hope to post later this week.  It&#8217;s a good stepping stone to where I want to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ross</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-2051</link>
		<dc:creator>ross</dc:creator>
		<pubDate>Wed, 28 Jul 2004 12:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-2051</guid>
		<description>&lt;p&gt;Oft quoated saying in the news groups that one Harald, in fact i use it as my sig.&lt;/p&gt;
&lt;p&gt;I studied 2&#039;s comp for my A-level computers, never thought i&#039;d see the day when it would crop up agian. Best of all was &lt;i&gt;Reverse Polish Notation&lt;/i&gt;, kinda makes sense, see, &lt;a href=&quot;http://www-stone.ch.cam.ac.uk/documentation/rrf/rpn.html&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www-stone.ch.cam.ac.uk/documentation/rrf/rpn.html&quot; rel=&quot;nofollow&quot;&gt;http://www-stone.ch.cam.ac.uk/documentation/rrf/rpn.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hex and Oct arithmetic where a brigde to far for me i&#039;m afraid.&lt;/p&gt;
&lt;p&gt;Intresting topic, i dont think i would ever use it, but you just don&#039;t know -  Any luck with that scoreboard matrix/light thing?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Oft quoated saying in the news groups that one Harald, in fact i use it as my sig.</p>
<p>I studied 2&#8242;s comp for my A-level computers, never thought i&#8217;d see the day when it would crop up agian. Best of all was <i>Reverse Polish Notation</i>, kinda makes sense, see, <a href="http://www-stone.ch.cam.ac.uk/documentation/rrf/rpn.html"></a><a href="http://www-stone.ch.cam.ac.uk/documentation/rrf/rpn.html" rel="nofollow">http://www-stone.ch.cam.ac.uk/documentation/rrf/rpn.html</a></p>
<p>Hex and Oct arithmetic where a brigde to far for me i&#8217;m afraid.</p>
<p>Intresting topic, i dont think i would ever use it, but you just don&#8217;t know &#8211;  Any luck with that scoreboard matrix/light thing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harald Staff</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-2050</link>
		<dc:creator>Harald Staff</dc:creator>
		<pubDate>Tue, 27 Jul 2004 17:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-2050</guid>
		<description>&lt;p&gt;Don&#039;t remember where I saw this, but anyway:&lt;/p&gt;
&lt;p&gt;&quot;There are 10 kinds of people. Those who read binary and those who don&#039;t.&quot;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Don&#8217;t remember where I saw this, but anyway:</p>
<p>&#8220;There are 10 kinds of people. Those who read binary and those who don&#8217;t.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Miller</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-2049</link>
		<dc:creator>Andy Miller</dc:creator>
		<pubDate>Mon, 26 Jul 2004 16:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-2049</guid>
		<description>&lt;p&gt;&lt;i&gt;It&#039;s not necessary to use the ^ operator in SplitBit above.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Jonathon - what&#039;s the difference?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><i>It&#8217;s not necessary to use the ^ operator in SplitBit above.</i></p>
<p>Jonathon &#8211; what&#8217;s the difference?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Pope</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-2048</link>
		<dc:creator>Andy Pope</dc:creator>
		<pubDate>Sat, 24 Jul 2004 15:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-2048</guid>
		<description>&lt;p&gt;Hi Dick,&lt;/p&gt;
&lt;p&gt;Here&#039;s an explanation lifted from www4.wittenberg.edu&lt;/p&gt;
&lt;p&gt;Two&#039;s complement representation is a convention used to represent signed binary integers. In binary representation (positional notation), each bit has a weight which a power of two. The weights increase from right to left. For example&lt;/p&gt;
&lt;p&gt;     011101 = 0 x 2^5 + 1 x 2^4 + 1 x 2^3 + 1 x 2^2 + 0 x 2^1 + 1 x 2^0 = 16 + 8 + 4 + 1 =   29&lt;/p&gt;
&lt;p&gt;The same positional notation is used with decimal numbers, except using powers of 10.&lt;/p&gt;
&lt;p&gt;With two&#039;s complement notation, all integers are represented using a fixed number of bits with the leftmost bit given a negative weight. So 100011 would be&lt;/p&gt;
&lt;p&gt;     100011 = -1 x 2^5 + 0 x 2^4 + 0 x 2^3 + 0 x 2^2 + 1 x 2^1 + 1 x 2^ 0 = -32 + 2 + 1 = -29   &lt;/p&gt;
&lt;p&gt;There are a number of nice features to two&#039;s complement representation. The first is that the normal rules used in the addition of (unsigned) binary integers still work (throw away any bit carried out of the left-most position). Second, it&#039;s easy to negate any integers: simply complement each bit and add 1 to the result (011101 complemented is 100010 plus 1 is 100011; 100011 complemented is 011100 plus 1 is 011101). Finally, the left most bit tells you if the integer is positive (0) or negative (1).&lt;/p&gt;
&lt;p&gt;The range of integers and the ordering does change. For example, four bits can represent the unsigned integers values 0 (0000) through 15 (1111). However, four bit two&#039;s complement representation represents the signed values - 8 through +7 ordered as below&lt;/p&gt;
&lt;p&gt;1000 1001 1010 1011 1100 1101 1110 1111 0000 0001 0010 0011 0100 0101 0110 0111&lt;br&gt;
 -8   -7   -6   -5   -4   -3   -2   -1    0    1    2    3    4    5    6    7&lt;/p&gt;
&lt;p&gt;I now know why the negative value is 1 larger than the positive.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Dick,</p>
<p>Here&#8217;s an explanation lifted from www4.wittenberg.edu</p>
<p>Two&#8217;s complement representation is a convention used to represent signed binary integers. In binary representation (positional notation), each bit has a weight which a power of two. The weights increase from right to left. For example</p>
<p>     011101 = 0 x 2^5 + 1 x 2^4 + 1 x 2^3 + 1 x 2^2 + 0 x 2^1 + 1 x 2^0 = 16 + 8 + 4 + 1 =   29</p>
<p>The same positional notation is used with decimal numbers, except using powers of 10.</p>
<p>With two&#8217;s complement notation, all integers are represented using a fixed number of bits with the leftmost bit given a negative weight. So 100011 would be</p>
<p>     100011 = -1 x 2^5 + 0 x 2^4 + 0 x 2^3 + 0 x 2^2 + 1 x 2^1 + 1 x 2^ 0 = -32 + 2 + 1 = -29   </p>
<p>There are a number of nice features to two&#8217;s complement representation. The first is that the normal rules used in the addition of (unsigned) binary integers still work (throw away any bit carried out of the left-most position). Second, it&#8217;s easy to negate any integers: simply complement each bit and add 1 to the result (011101 complemented is 100010 plus 1 is 100011; 100011 complemented is 011100 plus 1 is 011101). Finally, the left most bit tells you if the integer is positive (0) or negative (1).</p>
<p>The range of integers and the ordering does change. For example, four bits can represent the unsigned integers values 0 (0000) through 15 (1111). However, four bit two&#8217;s complement representation represents the signed values &#8211; 8 through +7 ordered as below</p>
<p>1000 1001 1010 1011 1100 1101 1110 1111 0000 0001 0010 0011 0100 0101 0110 0111<br />
 -8   -7   -6   -5   -4   -3   -2   -1    0    1    2    3    4    5    6    7</p>
<p>I now know why the negative value is 1 larger than the positive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-2047</link>
		<dc:creator>Dick</dc:creator>
		<pubDate>Fri, 23 Jul 2004 20:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-2047</guid>
		<description>&lt;p&gt;Jonathan:  Why do longs only use 31 bits then?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Jonathan:  Why do longs only use 31 bits then?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Rynd</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/23/bitwise-and/#comment-2046</link>
		<dc:creator>Jonathan Rynd</dc:creator>
		<pubDate>Fri, 23 Jul 2004 19:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=696#comment-2046</guid>
		<description>&lt;p&gt;1. Negative numbers are actually stored differently from positive numbers.  -1 is actually 11111111111111111111111111111111.  This is called &quot;Two&#039;s Complement Notation&quot;.  To negate a binary number, flip all the bits and then add one.&lt;/p&gt;
&lt;p&gt;2. It&#039;s not necessary to use the ^ operator in SplitBit above. Instead, put&lt;/p&gt;
&lt;p&gt;lPower = 1&lt;/p&gt;
&lt;p&gt;before the For i loop, and &lt;/p&gt;
&lt;p&gt;lPower = lPower * 2&lt;/p&gt;
&lt;p&gt;at the end of the loop.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>1. Negative numbers are actually stored differently from positive numbers.  -1 is actually 11111111111111111111111111111111.  This is called &#8220;Two&#8217;s Complement Notation&#8221;.  To negate a binary number, flip all the bits and then add one.</p>
<p>2. It&#8217;s not necessary to use the ^ operator in SplitBit above. Instead, put</p>
<p>lPower = 1</p>
<p>before the For i loop, and </p>
<p>lPower = lPower * 2</p>
<p>at the end of the loop.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

