2008-10-27, 02:07 AM
wow you just killed 1000 more of my brain cells with your last sentence, it doesn't add or subtract? now i'm uterly confused...
0 xor 1 = 1 (addition-like)
1 xor 0 = 1 (addition-like)
1 xor 1 = 0 (subtraction-like)
0 xor 0 = 0 (addition or subtraction)
that rule applies to binary numbers right?
edit: OH i got how xor works now!
but still have to understand why it works for swapping.
0 xor 1 = 1 (addition-like)
1 xor 0 = 1 (addition-like)
1 xor 1 = 0 (subtraction-like)
0 xor 0 = 0 (addition or subtraction)
that rule applies to binary numbers right?
edit: OH i got how xor works now!
but still have to understand why it works for swapping.

