title: Performing a logical not ! using only bitwise operations
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3912112/check-if-a-number-is-non-zero-using-bitwise-operators-in-c">Check if a number is non zero using bitwise operators in C.</a>  </p>
  </blockquote>
  
  
  
  <p>Hello everyone,</p>
  
  <p>I am working on a project and I need a little help with a function. We need to write a function that performs the logical not, !, using only the following bitwise operators:</p>
  
  <pre><code>~ &amp; ^ | + &lt;&lt; &gt;&gt;
  </code></pre>
  
  <p>I'm not even sure where to begin.</p>