NOR from NAND — universal gates

corecrossing between the families

Answer

4 NAND gates realising A′ · B′

Why this example is worth doing

Building one universal gate out of the other takes four gates, which is the price of crossing between the NAND and NOR families. The page notes that no real design does this — you pick a family and stay in it — but that the construction matters as a proof: it shows the two families have exactly the same expressive power, so the choice between them is an engineering one and never a question of what can be built.

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

Gate list — columns Node, Gate, Inputs
NodeGateInputs
g1nandA, A
g2nandB, B
g3nandg1, g2
g4nandg3, g3

NAND-only realisation

A ↑ A ↑ (B ↑ B) ↑ (A ↑ A ↑ (B ↑ B))A′ · B′4 NAND gates, verified by reading the network back out.

Truth table

Truth table — columns #, A, B, A ↑ A ↑ (B ↑ B) ↑ (A ↑ A ↑ (B ↑ B))
#ABA ↑ A ↑ (B ↑ B) ↑ (A ↑ A ↑ (B ↑ B))
0001
1010
2100
3110

Compare with

Open this example in the Universal gates

The field arrives filled in with this example’s input.

Note:

Notation this page assumes

  • Symbols: · is AND, + is OR, ⊕ is XOR, a prime or an overline is NOT. The field also takes ∧ ∨ ¬ ~ ! & | and the words.
  • Operator precedence, tightest first: NOT, then AND (including juxtaposition), then XOR/XNOR, then NAND/NOR, then OR, then IMPLIES, then IFF.
  • Gate symbols follow whichever standard the header toggle is set to: ANSI/IEEE Std 91-1984 distinctive shapes, or IEC 60617-12 rectangles.

Sources

  • Sheffer, “A Set of Five Independent Postulates for Boolean Algebras” (1913)
  • Shannon, “A Symbolic Analysis of Relay and Switching Circuits” (1938)