The XOR Binary Operator

Exclusive OR (XOR or ^) is a binary operator that takes two inputs and produces
1 is the inputs are different and 0 is the inputs are the same.
----------------------
A   ^	B   => 	C
----------------------
0	0	0	same      inputs  => 0
0	1	1	different inputs  => 1
1	0	1	different inputs  => 1
1	1	0	same      inputs  => 0
----------------------

XOR is a reversable operator, XORing the output with any input produces the other input.
----------------------		----------------------
C   ^	A   => 	B	 and	C   ^	B   => 	A
----------------------		----------------------
0	0	0		0	0	0
1	0	1		1	1	0
1	1	0		1	0	1
0	1	1		0	1	1
----------------------		----------------------

XOR is order-independent and used in encryption to remove locks in any order (inner locks before outer locks).
----------------------	---------------------- 		----------------------	----------------------
A   ^	B   => 	C	C   ^	X   => 	Y     Ordered	Y   ^	X   => 	C	C   ^	B   => 	A
----------------------	----------------------		----------------------	----------------------
0	0	0	0	0	0		0	0	0	0	0	0
0	1	1	1	0	1		1	0	1	1	1	0
1	0	1	1	0	1		1	0	1	1	0	1
1	1	0	0	1	1		1	1	0	0	1	1
----------------------	----------------------		----------------------	----------------------

----------------------	----------------------		----------------------	----------------------
A   ^	B   => 	C	C   ^	X   => 	Y     Unordered	Y   ^	B   => 	Z	Z   ^	X   => 	A
----------------------	----------------------		----------------------	----------------------
0	0	0	0	0	0		0	0	0	0	0	0
0	1	1	1	0	1		1	1	0	0	0	0
1	0	1	1	0	1		1	0	1	1	0	1
1	1	0	0	1	1		1	1	0	0	1	1
----------------------	----------------------		----------------------	----------------------

Ali Adams
www.heliwave.com