title: Getting value of last 2 bits in an unsigned char
body: <p>I have an unsigned char and I need to check bits 1 and 2 to find the status. What is the best way to determine the last 2 bits?</p>
  
  <p>I am attempting to perform an OR, but my results aren't correct. Any help would be appreciated. Thanks.</p>
  
  <p>Example:</p>
  
  <pre><code>10101000 = off
  10101001 = on
  10101010 = error
  10101011 = n/a
  
  if(data_byte_data[0] | 0xfe)
      //01
  else if(data_byte_data[0] | 0xfd)
      //10;
  else if(data_byte_data[0] | 0xfc)
      //11
  else if(data_byte_data[0] | 0xff)
      //00
  </code></pre>