views:

75

answers:

2

Looking forward to see some cool XOR tricks. May be using other bit-wise operators also.

+1  A: 

swap(a,b)

  a = a xor b
  b = a xor b
  a = a xor b

a and b will now be swapped

Nice info on bitwise operations

slashmais
A: 

Easy and efficient encryption: encrypted_text = text ^ long_secret.
Repeat 256 times for security. :-)

VladV