code_junkie

^ operator in java

Nov 13th, 2011
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. 0 ^ 0 == 0
  2. 1 ^ 0 == 1
  3. 0 ^ 1 == 1
  4. 1 ^ 1 == 0
  5.  
  6. A B A^B
  7.  
  8. true 1 true 1 false 0
  9. true 1 false 0 true 1
  10. false 0 true 1 true 1
  11. false 0 false 0 false 0
  12.  
  13. num1: 0 0 1 1
  14. num2: 0 1 1 0
  15. ------------------
  16. num1^num2: 0 1 0 1
  17.  
  18. num1 num2 num1^num2
  19. ---- ---- ---------
  20. 0011 0110 0101
Add Comment
Please, Sign In to add comment