I didn't believe him until he showed me. Apparently they used to use it all the time to swap out entire segments of RAM in the S/360 without having to page out to disk or clobber other free RAM segments. It is simply:
a = a xor b
b = b xor a
a = a xor b
Three steps, same as using a placeholder 'c' variable. I think he mentioned on most of the processors of the time, 3 XOR instructions actually worked faster than 3 MOV instructions.Illustration for the non-believers:
a = 10010110
b = 01100011
a = a xor b
a = 11110101
b = 01100011 (unchanged)
b = b xor a
a = 11110101 (unchanged)
b = 10010110
a = a xor b
a = 01100011
b = 10010110
Voila!