title: Bit-shifting a byte array by N bits
body: <p>Hello quick question regarding bit shifting</p>
  <p>I have a value in HEX: <code>new byte[] { 0x56, 0xAF };</code>
  which is <code>0101 0110 1010 1111</code></p>
  <p>I want to the first N bits, for example 12.</p>
  <p>Then I must right-shift off the lowest 4 bits (16 - 12) to get <code>0000 0101 0110 1010</code> (1386 dec).</p>
  <p>I can't wrap my head around it and make it scalable for n bits.</p>