title: How to work with the bits in a byte
body: <p>I have a single byte which contains two values. Here's the documentation:</p>
  <blockquote>
  <p>The authority byte is split into two fields. The three least significant bits carry the user’s authority level (0-5). The five most
  significant bits carry an override reject threshold. If these bits are
  set to zero, the system reject threshold is used to determine whether
  a score for this user is considered an accept or reject. If they are
  not zero, then the value of these bits multiplied by ten will be the
  threshold score for this user.</p>
  <p>Authority Byte:</p>
  <pre class="lang-none prettyprint-override"><code>7 6 5 4 3 ......... 2 1 0
  Reject Threshold .. Authority
  </code></pre>
  </blockquote>
  <p>I don't have any experience of working with bits in C#.</p>
  <p>Can someone please help me convert a Byte and get the values as mentioned above?</p>
  <p>I've tried the following code:</p>
  <pre><code>BitArray BA = new BitArray(mybyte); 
  </code></pre>
  <p>But the length comes back as 29 and I would have expected 8, being each bit in the byte.</p>
  <p>-- Thanks for everyone's quick help. Got it working now! Awesome internet.</p>