Fun with Exclusive Or (XOR)

Grappling with bitwise boolean algebra in C++, I came across this tidbit:

https://betterexplained.com/articles/swap-two-variables-using-xor/

That just put me into a trance.

2 Likes

You sound like the type of person that will appriciate https://en.m.wikipedia.org/wiki/XOR_linked_list