(A·B·C·D)′ — De Morgan's laws

coren-input generalisation

Answer

A′ + B′ + C′ + D′

Why this example is worth doing

The four-input generalisation, included because the two-input statement leaves students unsure whether the law extends. It does, to any arity, by induction on the associativity of AND: the complement of a product of n terms is the sum of the n complements. The page states the general form with an index and then makes the hardware point that a 4-input NAND is one gate, not a chain of 2-input NANDs, so the algebraic flattening corresponds to a real reduction in gate count and delay.

Try your own input in the De Morgan’s laws. Push a negation through any expression and see both forms side by side.

How the answer is reached

Negation pushed inwards

(A · B · C · D)′A′ + B′ + C′ + D′De Morgan swaps the operator as the bar passes through it.

Truth table

Truth table — columns #, A, B, C, D, F
#ABCDF
000001
100011
200101
300111
401001
501011
601101
701111
810001
910011
1010101
1110111
1211001
1311011
1411101
1511110

Compare with

Open this example in the De Morgan’s laws

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.
  • In a minterm index the first variable is the most significant bit, so over [A, B, C] minterm 5 is A·B̄·C.

Sources

  • De Morgan, Formal Logic (1847)
  • Boole, An Investigation of the Laws of Thought (1854)