Level 2: Negation
Open the level →Where it fits in the machine →
Task
Goal: build an inverter (NOT) from a single NAND gate.
An inverter flips 0 to 1 and 1 to 0. NAND is an AND-NOT gate: its output is 0 only when both inputs are 1.
The main idea: feed the same signal into both NAND inputs and the gate becomes a NOT. One type of gate is enough to build all the logic in this course.
Path to this level
The competencies this level develops and their formation levels.
Related Materials
- NAND — universal logic gate
- NOT (Inverter) — signal inversion
Solution for self-check
Try building the circuit yourself first. The solution below is a way to check yourself if you're stuck or have already solved it.
What you should get: Input=1 gives 0 on the output, Input=0 gives 1.
NAND has two inputs (A and B) and one output (Q). It outputs 0 only when A=1 and B=1; in all other cases the output is 1.
Feed both inputs the same value:
- Input=1 → A=1, B=1 → Q=0.
- Input=0 → A=0, B=0 → Q=1.
The output is always the opposite of the input. This is NOT.
- Run a wire from Input.Q to NAND.A.
- Run a second wire from Input.Q to NAND.B.
- Connect NAND.Q to Output.D.
Check yourself
Why do we need two wires from one input?
NAND looks at both inputs. When both carry the same value, it behaves as NOT.