Computing Library › Classical Logic Gates
Classical Logic Gates

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

Kronos motion — three outputs
ANOT A
01
10

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

python
out = ~a & 1   # bitwise NOT of a single 0/1 bit
out = not a    # logical NOT on a boolean

Roles it plays

Though trivial in function, the inverter is fundamental: it supplies the complement that Boolean algebra and De Morgan conversions constantly require.