title: How to check certain bits of a variable in C++?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/523724/c-c-check-if-one-bit-is-set-in-i-e-int-variable">C/C++ check if one bit is set in, i.e. int variable</a>  </p>
  </blockquote>
  
  
  
  <p>e.g. if I had a integer and i wanted to check what the value of bits 20-25 were, or if i just wanted to check if one of the bits is 0 or 1, how would i do that?</p>