Notation Reference
A'means NOT AA * Bmeans A AND BA + Bmeans A OR B- A 2-input NAND gate computes:
(A * B)'
In rendered math below, AND is written as \(A \cdot B\) and NOT as \(A'\).
1) NOT gate from NAND
Goal
Target function: Z = NOT(A) = A'
NAND identity used
Tie both NAND inputs to the same signal \(A\):
Since \(A \cdot A = A\), we get:
This implements NOT using a single NAND.
Wiring Diagram
Truth Table
| A | A | A * A | (A * A)' | |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | |
| 1 | 1 | 1 | 0 |
2) AND gate from NAND
Goal
Target function: Z = A * B
Algebraic derivation
Start from NAND and apply De Morgan's law:
Invert both sides:
Simplify the left side:
You can also prove the final form directly (De Morgan):
NAND-only construction
A NAND gate already gives \((A \cdot B)'\). An AND gate is just “NAND then NOT”:
Wiring Diagram
3) OR gate from NAND
Goal
Target function: Z = A + B
Algebraic derivation
Start by inserting double-negations:
Apply De Morgan's law to rewrite OR in terms of NAND structure:
So \(A + B = (A' \cdot B')'\). That is: invert A, invert B, then NAND the results.
NAND-only construction
We already built an inverter from NAND: \(A' = \text{NAND}(A,A)\). So:
Wiring Diagram
Summary
Continue adding sections (XOR, XNOR, MUX, etc.) using the same pattern: Goal → Algebra → NAND-only wiring → Truth table