title: Bit-shifting in Java
body: <p>Why is it that:</p>
  
  <pre><code>return 1 | (1 &lt;&lt; 32) // returns 0x00000001
  </code></pre>
  
  <p>but:</p>
  
  <pre><code>return 6 | (1 &lt;&lt; 32) // returns 0x00000007
  </code></pre>
  
  <p>I was expecting the latter to return 0x00000006. What type of bitmask can be OR-ed with the expression to generate 0x00000006 for 6 | (1 &lt;&lt; 32)?</p>