Hades logo    Hades applet banner

TAMS / Java / Hades / applets (print version): contents | previous | next

CMOS mux-based XOR gate

CMOS mux-based XOR gate screenshot

Description

This circuit shows a common realization of the two-input XOR gate. The circuit is based on the t-gate multiplexer demonstrated in the previous applet. Click the input switches or type the ('a','b') bindkeys to control the circuit.

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)


Impressum | 11.01.07
http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/05-switched/40-cmos/xor-mux_print.html