Σm(0,1,2,5,6,7) as a NAND-only network — universal gates

exam standardthe mechanical SOP-to-NAND conversion

Answer

7 NAND gates realising A′ · B′ + B · C′ + A · C

Why this example is worth doing

The end-to-end conversion on a real function: minimise to SOP, then replace every AND and the final OR with a NAND. It works because the double bubbles introduced between the two levels cancel — which is the whole trick, and why any two-level SOP maps to NAND-NAND with no change in gate count. The page walks it on the cyclic example from the K-map pages so the input is already familiar.

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
nanandA, A
nbnandB, B
ncnandC, C
t1nandna, nb
t2nandA, C
t3nandB, nc
outnandt1, t2, t3

NAND-only realisation

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

Truth table

Truth table — columns #, A, B, C, ((A ↑ A ↑ (B ↑ B)) · (A ↑ C) · (B ↑ (C ↑ C)))′
#ABC((A ↑ A ↑ (B ↑ B)) · (A ↑ C) · (B ↑ (C ↑ C)))′
00001
10011
20101
30110
41000
51011
61101
71111

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)