title: Combine 2 8 bit byte array positions to a single 16 bit integer
body: <p>I have a byte array in which a value is stored as a 16bit unsigned integer.  This is spread across two positions in my byte array, <code>DataArray[11]</code> and <code>DataArray[12]</code>.  The documentation I have for the packet which contains the byte array tells me that the value I need to extract is packed least significant bit first.  I'm having trouble wrapping my head around bitmasks and bit shifting, and I'm actually unclear if I need to use one or the other, or both.</p>
  
  <p>This is what I have so far, but the results don't seem right:</p>
  
  <pre><code>int result =  (DataArray[11] &lt;&lt; 8 | DataArray[12]) &amp; 0xFF;
  </code></pre>