Reading bit inside 2 byte
<pre><code>int id = ((reply[0] &amp; 0x3));
id = (id&lt;&lt;7) | (reply[1] &amp; 0x7F);
</code></pre>

<p>Suppose I have a reply array storing 2 byte reply[0] and reply[1].
I wanna read the last two bits in the first byte and all the bits in the second byte, then adding them together</p>

<p>why the code above is going to work, can anyone explain? </p>
