Four NAND gates wired as the classic XOR — circuit to expression
introreads back as A ⊕ B
Answer
A′ · B + A · B′ (output column 0110)
Why this example is worth doing
The four-NAND XOR, and the circuit most likely to appear as an unlabelled schematic in an exam with "find the output expression" underneath. Traced node by node it produces a formidable-looking nest of complements which collapses to A ⊕ B. The tool shows the expression at every internal node rather than only at the output, because the marks are for the intermediate labels, and it flags that this is a known circuit by name once the function is identified.
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
| Node | Gate | Inputs |
|---|---|---|
| g1 | nand | A, B |
| g2 | nand | A, g1 |
| g3 | nand | g1, B |
| g4 | nand | g2, g3 |
Quine–McCluskey
| # | Term |
|---|---|
| 1 | A′ · B |
| 2 | A · B′ |
| # | Cover |
|---|---|
| 1 | A′ · B + A · B′ |
2 term(s), 4 literal(s); 2 essential prime implicant(s).
Truth table
| # | A | B | F |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 2 | 1 | 0 | 1 |
| 3 | 1 | 1 | 0 |