Level 2: Negation
Task
Build a NOT gate from a NAND. When the input is 1, the output should be 0.
Build an inverter (NOT) from a single NAND gate.
Solution
NAND has two inputs (A and B) and one output (Q). The NAND rule: output is 0 only when BOTH inputs are 1; in all other cases output is 1.
How to get NOT? Simply feed the SAME signal to both NAND inputs.
1. Run a wire from Input.Q to NAND.A. 2. Run another wire from Input.Q to NAND.B.
Now both NAND inputs always get the same value: - If Input=1 → both NAND inputs=1 → NAND outputs 0. - If Input=0 → both inputs=0 → NAND outputs 1.
The output is always the opposite of the input — this is the NOT operation. 3. Connect NAND output (Q) to Output input (D).