2008-10-27, 02:21 AM
Horusmaster Wrote: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...Because if (a xor b) = (b xor a) = c
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.
then (a xor c) = (c xor a) = b.

