Perform signed arithmetic on numbers defined as bit ranges of unsigned bytes
<p>I have two bytes.  I need to turn them into two integers where the first 12 bits make one int and the last 4 make the other.  I figure i can &amp;&amp; the 2nd byte with 0x0f to get the 4 bits, but I'm not sure how to make that into a byte with the correct sign.</p>

<p>update:
just to clarify I have 2 bytes</p>

<pre><code>byte1 = 0xab
byte2 = 0xcd
</code></pre>

<p>and I need to do something like this with it</p>

<pre><code>var value = 0xabc * 10 ^ 0xd;
</code></pre>

<p>sorry for the confusion.</p>

<p>thanks for all of the help.</p>
