C++ Bitwise XOR ^ Not Working -
the c++ xor ^. if i:
a ^ b it should xor b
however when values 4246661 0
4246661 ^ 0 it prints: 4246661 when should 0.
edit: wow going off of online xor calculator giving me weird results.. sorry
am missing something?
xor result 1 if 1 , 1 of 2 values 1, meaning:
- 0 xor 0 0
- 0 xor 1 1
- 1 xor 0 1
- 1 xor 1 0
so, (4246661 xor 0), (0b10000001100110010000101 xor 0b0) result 0b10000001100110010000101...no problem here!
anything xor 0 result anything
Comments
Post a Comment