title: What does AND 0xFF do?
body: <p>In the following code:</p>
  
  <pre><code>short = ((byte2 &lt;&lt; 8) | (byte1 &amp; 0xFF))
  </code></pre>
  
  <p>What is the purpose of <code>&amp;0xFF</code>?
  Because other somestimes I see it written as:</p>
  
  <pre><code>short = ((byte2 &lt;&lt; 8) | byte1)
  </code></pre>
  
  <p>And that seems to work fine too?</p>