title: Check if a number is non zero using bitwise operators in C
body: <p>Check whether a number <code>x</code> is nonzero using the legal operators except <code>!</code>.</p>
  
  <p>Examples: <code>isNonZero(3) = 1</code>, <code>isNonZero(0) = 0</code></p>
  
  <p>Legal ops: <code>~</code> <code>&amp;</code> <code>^</code> <code>|</code> <code>+</code> <code>&lt;&lt;</code> <code>&gt;&gt;</code></p>
  
  <ul>
  <li>Note : Only bitwise operators should be used. <code>if</code>, <code>else</code>, <code>for</code>, etc. cannot be used.</li>
  <li>Edit1 : No. of operators should not exceed 10.</li>
  <li>Edit2 : Consider size of <code>int</code> to be 4 bytes.</li>
  </ul>
  
  <p></p>
  
  <pre><code>int isNonZero(int x) {
  return ???;
  }
  </code></pre>
  
  <p>Using <code>!</code> this would be trivial , but how do we do it without using <code>!</code> ?</p>