The idea behind this circuit is based on the 2:1 multiplexer. Remember that the XOR function can be written in disjunctive form as
XOR( A, B ) = (A & !B) | (!A & B)
When A is low, the inverter on the right ensures that the lower t-gate is conducting, and the value from input B is passed through to the gate output. This realizes the (!A & B) term of the above expression.
When A is high, the upper t-gate is conducting and passes the inverted value of B through to the gate output. This realizes the (A & !B) term.
The circuit shown here uses eight transistors, while the straightforward variant built from static gates (using two inverters and three NAND2 gates) requires 16 transistors. However, as shown in the next applet, an even cheaper implementation exists (using a dirty trick).
XOR2 A B | Y --------+----- 0 0 | 0 0 1 | 1 1 0 | 1 1 1 | 0
Run the applet | Run the editor (via Webstart)