title: C Using bitwise operators tell if binary number has all evens set to 0
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7225112/find-if-every-even-bit-is-set-to-0-using-bitwise-operators">Find if every even bit is set to 0 using bitwise operators</a>  </p>
  </blockquote>
  
  
  
  <p>The other example didnt really answer my question so here is the situation:</p>
  
  <p>I need to return 1 if all evens in the bit sequence are set to 0 and return 0 otherwise.
  -I cant use conditional statements!</p>
  
  <p>So I have a number 0x7f (01111111)</p>
  
  <p>I can and by a mask of 0xAA(10101010)</p>
  
  <p>that gives me: 00101010</p>
  
  <p>I need to do only a 0 or 1 so I !!(00101010) and that will give me the boolean value for it but it returns a 1 but I need a 0 so I can negate it or use a different mask. </p>
  
  <p>I keep going in circles with this and its driving me nuts please help and remember no conditional statements just these operators:</p>
  
  <p>! ~ &amp; ^ | + &lt;&lt; >></p>