NOT Gate (Inverter)
The NOT gate, or inverter, outputs the logical complement of its single input, turning 1 into 0 and 0 into 1.
What it does
The NOT gate, called an inverter, has one input and one output. It produces the complement: a 1 becomes 0 and a 0 becomes 1. In a diagram it is a triangle with a small bubble on the output; the bubble alone denotes inversion.
Truth table
| A | NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |
Algebraic form
Inversion is written with a bar over the variable or a prime, as A' or NOT A. Two inversions cancel: NOT(NOT A) = A, the involution law. The inverter is the source of every bubble seen on other gate symbols.
How it is built
A CMOS inverter is the simplest static gate: one p-channel transistor pulling the output high and one n-channel transistor pulling it low, controlled by the same input. It is the reference cell against which other gates are sized.
In code
out = ~a & 1 # bitwise NOT of a single 0/1 bit
out = not a # logical NOT on a boolean
Roles it plays
- Producing complemented signals needed by other logic.
- Restoring and sharpening logic levels as a buffer with inversion.
- Building oscillators and delay chains from odd numbers of inverters.
- Forming active-low control from active-high signals.
Though trivial in function, the inverter is fundamental: it supplies the complement that Boolean algebra and De Morgan conversions constantly require.