Guest User

Untitled

a guest
Dec 5th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. int num = 00000010;
  2. System.out.println(num);
  3.  
  4. int num = 00000100;
  5. System.out.println(num);
  6.  
  7. int num = 00000010 << 1;
  8. System.out.println(num);
  9.  
  10. 00000010 => 1*8^1 + 0*8^0 => 8
  11. 00000100 => 1*8^2 + 0*8^1 + 0*8^0 => 64
  12.  
  13. 00000100 => 00001000
  14. (8 => 16)
  15.  
  16. 0b000010 => 2
Add Comment
Please, Sign In to add comment