Two NAND gates in a chain — circuit to expression

exam standardreads back as A·B + C̄

Answer

C′ + A · B (output column 10101011)

Why this example is worth doing

A circuit whose read-back expression is simpler than the drawing suggests: two NANDs in series come out as A·B + C̄, an AND, an inverter and an OR. That gap is the reason this direction of the tool exists. Analysis is not just transcription — once you have the expression you can re-minimise it and discover that the given circuit is not the cheapest one for its own function. The page pipes the result straight into the simplifier and reports the gate-count difference.

Try your own input in the Logic circuit → expression. Wire up gates and read the Boolean expression and truth table back out.

How the answer is reached

Gate list

Gate list — columns Node, Gate, Inputs
NodeGateInputs
g1nandA, B
g2nandg1, C

Quine–McCluskey

Prime implicants — Quine–McCluskey
#Term
1C′
2A · B
Minimum cover — Quine–McCluskey
#Cover
1C′ + A · B
Warning:

2 term(s), 3 literal(s); 2 essential prime implicant(s).

Truth table

Truth table — columns #, A, B, C, F
#ABCF
00001
10010
20101
30110
41001
51010
61101
71111

Compare with

Open the Logic circuit → expression

This input is entered in the tool itself — it is too rich for a link to carry.

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

  • Shannon, “A Symbolic Analysis of Relay and Switching Circuits” (1938)
  • ANSI/IEEE Std 91-1984, Graphic Symbols for Logic Functions