title: Bitwise operators. Decimal and Hexa
body: <p>Good evening.</p>
  
  <p>Can someone explain me why the following code runs the message from IF condition?</p>
  
  <pre><code>if ((~7 &amp; 0x000f) == 8)
     printf("Honesty is the best policy\n");
  </code></pre>
  
  <p>From what I know ~7 = 11111001 and 0x000f= 00001111</p>
  
  <p>Thank you!</p>