XOR from NOR gates only — universal gates
edge caseone more than the NAND version
Answer
5 NOR gates realising A′ · B + A · B′
Why this example is worth doing
XOR costs five NOR gates against four NAND gates, an asymmetry with a reason: XOR's cheapest factoring is a sum of products, which suits the NAND family. The page closes the topic here, having shown that "universal" is a statement about possibility and never about cost. Which gate to standardise on depends on the shape of the function you are implementing, and this pair of numbers is the smallest honest demonstration of that.
Try your own input in the Universal gates. Rebuild any of the other gates using only NAND, or only NOR, with the gate count.
How the answer is reached
Gate list
| Node | Gate | Inputs |
|---|---|---|
| g1 | nor | A, B |
| g2 | nor | A, g1 |
| g3 | nor | g1, B |
| g4 | nor | g2, g3 |
| g5 | nor | g4, g4 |
NOR-only realisation
A ↓ (A ↓ B) ↓ (A ↓ B ↓ B) ↓ (A ↓ (A ↓ B) ↓ (A ↓ B ↓ B))A′ · B + A · B′— 5 NOR gates, verified by reading the network back out.
Truth table
| # | A | B | A ↓ (A ↓ B) ↓ (A ↓ B ↓ B) ↓ (A ↓ (A ↓ B) ↓ (A ↓ B ↓ B)) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 2 | 1 | 0 | 1 |
| 3 | 1 | 1 | 0 |