Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
  2. 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | = 255 // just sum all the possible bit values in the table
  3. | | | | | | | |
  4. 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | = 10 // Representation of the 10 in bit
  5. 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | = 192 // Representation of the 192 in bit
  6.  
  7. AND (&) Operator (7 & 9) The bits must be active in either rows
  8.  
  9. 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | = 7
  10. 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | = 9
  11. 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | = 1 // Result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement