In CMOS, XOR is carried out like:
_____

________
_ _ _
A_ A_
_ _ _
B_ B_
_________
____________OUT
_____
_ _ _
A_ B_
______
_____
_ _ _
B_ A_
______
____

This, of course, is A
XOR B, expressed as:
_ _
(A * B) + (A * B)
A B  OUT
0 0  0
0 1  1
1 0  1
1 1  0