What is your confusion?  Do you understand binary representation of numbers?  Can you given us the binary representation of 11?  12?  25?  -9?<p>Do you know what the logical operations are?  AND?  OR?  XOR?  NOT?  What are the answers to these:<p><pre><code>  1 AND 1
  1 AND 0
  1 OR x (where x is 0 or 1)

</code></pre>
Without that knowledge you have a problem.  With that knowledge the problem lies elsewhere and we can explore that.  If you can work on this is slow time then I'd be happy to get an email asking questions.<p>ADDED IN EDIT: Can you give an example of a case or calculation you don't understand?