Hades logoHades applet banner
CMOS mux-based XOR gate

applet icon

The image above shows a thumbnail of the interactive Java applet embedded into this page. Unfortunately, your browser is not Java-aware or Java is disabled in the browser preferences. To start the applet, please enable Java and reload this page. (You might have to restart the browser.)

Circuit 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).


  A  B  |  Y   
  0  0  |  0   
  0  1  |  1   
  1  0  |  1   
  1  1  |  0   

Print version | Run this demo in the Hades editor (via Java WebStart)
Usage | FAQ | About | License | Feedback | Tutorial (PDF) | Referenzkarte (PDF, in German)
Impressum http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/05-switched/40-cmos/xor-mux.html