XOR gate using transmission gates: 8 transistors, live
A transmission gate XOR is a 2-to-1 mux of transmission gates with B as the select: when B = 0 it passes A to the output, and when B = 1 it passes NOT A. Two inverters make NOT A and NOT B, so the whole gate is eight transistors, against twelve for the static CMOS XOR.
The trick is reading XOR as a controlled inverter: A XOR 0 = A and A XOR 1 = NOT A. So the circuit does not compute anything new, it steers. One transmission gate connects A to Y and is on while B = 0 (its NMOS gated by NOT B, its PMOS by B); the other connects NOT A to Y and is on while B = 1. Exactly one of them conducts for every input, so Y is always driven and never floats. Because each transmission gate pairs an NMOS with a PMOS, both a 0 and a 1 pass at full strength, which a single NMOS pass transistor cannot do. Swap which gate gets A and which gets NOT A and the same eight transistors make an XNOR. The same structure as a plain multiplexer is the transmission gate mux; the fully complementary design, with its pull-up and pull-down networks, is the CMOS XOR gate. Textbooks also show six-transistor pass-gate XORs that save another inverter; this page builds the eight-transistor version because every transistor in it is a plain switch the simulator can show.
Open this circuit in the lab →
What you need
- 2× CMOS inverter (2 transistors each): NOT A and NOT B
- 2× transmission gate (NMOS + PMOS): one passes A while B = 0, the other passes NOT A while B = 1
Step by step
- Place VDD, GND, inputs
AandB, and a probeY. - Build a CMOS inverter on A (NOT A) and one on B (NOT B).
- Transmission gate from A to Y: NMOS gated by NOT B, PMOS gated by B.
- Transmission gate from NOT A to Y: NMOS gated by B, PMOS gated by NOT B.
- Toggle the inputs: Y is 1 exactly when A and B differ.
Transmission gate XOR truth table
| A | B | Gate that conducts | Y = A XOR B |
|---|---|---|---|
| 0 | 0 | A to Y (B = 0) | 0 |
| 0 | 1 | NOT A to Y (B = 1) | 1 |
| 1 | 0 | A to Y (B = 0) | 1 |
| 1 | 1 | NOT A to Y (B = 1) | 0 |
All four rows are checked on the live circuit, which is made of transistors only, before the page is built; Y is driven on every row. The XOR gate's symbol and truth table are on the XOR gate page, and the same function from logic gates is the XOR from four NAND gates.
You can also read the full theory in the lesson on the transmission gate. Prefer to build it yourself from scratch? Open the digiwleea lab and place the gates on the canvas, or start from the logic gate simulator.
More builds: Gates from transistors (CMOS)
All 247 build guides, by topic
Each of these is one step from a transistor to a working CPU. Build every gate from CMOS transistors and work all the way up in the free digiwleea lab, with the free theory reference alongside.
Open the XOR gate from transmission gates in the lab →Frequently asked
How do you make an XOR gate using transmission gates?
Use two transmission gates as a 2-to-1 mux selected by B: one passes A to the output when B = 0, the other passes NOT A when B = 1. Two CMOS inverters supply NOT A and NOT B.
How many transistors are in a transmission gate XOR?
Eight in this design: four for the two inverters and four for the two transmission gates. The static CMOS XOR uses twelve, and an XOR built from four NAND gates uses sixteen.
Why does a transmission gate XOR work?
XOR with B = 0 leaves A unchanged and XOR with B = 1 inverts it, so choosing between A and NOT A with B as the select gives A XOR B.
How do you make an XNOR gate with transmission gates?
Use the same eight transistors but swap the data inputs: pass NOT A when B = 0 and A when B = 1.
Why use transmission gates instead of single pass transistors for XOR?
A single NMOS passes a weak 1 and a single PMOS a weak 0. A transmission gate puts both in parallel, so the output reaches full 0 and full 1 levels.