Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Bit level operations in Java
- int one=1;
- int two=2;
- int andop=1&2;
- System.out.println(andop);
- 0...001
- 0...010
- _______
- 0...011
- int andop = 1 | 2;
- int both = one | two;
- 0...001
- &...&&&
- 0...010
- _______
- 0...000
- 0...001
- |...|||
- 0...010
- _______
- 0...011
Add Comment
Please, Sign In to add comment