What if the output always did the opposite?
Imagine a switch that works backwards.
When the input is ON, the output becomes OFF. When the input is OFF, the output becomes ON.
The NOT gate has one simple job: it reverses the input and produces the opposite binary value.
Imagine a switch that works backwards.
When the input is ON, the output becomes OFF. When the input is OFF, the output becomes ON.
A NOT gate has only one input and one output.
The small circle on the gate symbol shows that the signal is inverted.
A light sensor can detect whether it is bright outside.
If the sensor input is 1 because daylight is present, the NOT gate produces 0 and the lamp stays off.
If the sensor input is 0 because it is dark, the NOT gate produces 1 and the lamp switches on.
A truth table shows every possible input and the output produced by the gate.
| A | X |
|---|---|
| 0 | 1 |
| 1 | 0 |
The input is labelled A and the output is labelled X.
This means: X contains the opposite Boolean value to A.
A NOT gate receives the input A = 0. What is the output X?
Input 1 produces output 1.
Input 1 produces output 0.