title: Long type, left shift and right shift operations
body: <p>Continuing my previous question
  <a href="https://stackoverflow.com/questions/1782927/why-i-cannot-derive-from-long">Why I cannot derive from long?</a></p>
  
  <p>I found an interesting problem.</p>
  
  <p>Step one: </p>
  
  <pre><code>4294967296 &amp; 0xFFFFFFFF00000000
  </code></pre>
  
  <p>Result: 4294967296. </p>
  
  <p>Step two.</p>
  
  <pre><code>4294967296 &amp; 0x00000000FFFFFFFF
  </code></pre>
  
  <p>Result: 0</p>
  
  <p>Aha, So here I assume that 4294967296 == 0xFFFFFFFF</p>
  
  <p>Let's check </p>
  
  <pre><code>(long)0x00000000FFFFFFFF
  </code></pre>
  
  <p>Result: 4294967295. Fail.</p>
  
  <p>Let's double check</p>
  
  <pre><code>4294967296 &gt;&gt; 32
  </code></pre>
  
  <p>Result: 1. Fail.</p>
  
  <p>The only explanation is that because i am using long where
  some bit is reserved for sign. In C I would use unsigned long.
  What do you think guys?</p>