Guest User

Untitled

a guest
Aug 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. Bit level operations in Java
  2. int one=1;
  3. int two=2;
  4. int andop=1&2;
  5. System.out.println(andop);
  6.  
  7. 0...001
  8. 0...010
  9. _______
  10. 0...011
  11.  
  12. int andop = 1 | 2;
  13.  
  14. int both = one | two;
  15.  
  16. 0...001
  17. &...&&&
  18. 0...010
  19. _______
  20. 0...000
  21.  
  22. 0...001
  23. |...|||
  24. 0...010
  25. _______
  26. 0...011
Add Comment
Please, Sign In to add comment