2008-10-27, 12:39 AM
wow my comp teacher told us last year that we cant swap variable without assigning a temporary variable, i guess he's wrong!
but i don't get how xor works.
isn't xor for boolean operations only?
if a xor b = 2 then
that means if a = 2 or b =2 but not both.
i don't get how it works for changing the number though.
any1 wanna explain?
but i don't get how xor works.
isn't xor for boolean operations only?
if a xor b = 2 then
that means if a = 2 or b =2 but not both.
i don't get how it works for changing the number though.
any1 wanna explain?

