Logic Gates: NOT

The NOT logic gate, also called the invertor gate, takes one bit as an input, and outputs the opposite bit: for the input $0$, it outputs $1$, and for $1$, it outputs $0$. This gate acts exactly as the "not" operator in programming does: given the Boolean variable $x$, the symbol: $!x$ (

$!x$
), $\neg x$, or $x'$ (
$x'$
) means "not $x$". You may also use the bitwise $\sim$ (
$\sim$
) operator: $\sim x$.

Below is the NOT gate diagram and truth table.

NOT Gate diagram.

NOT Gate diagram. Miriam Briskman, CC BY-NC 4.0.

Input Output
$x$ $x'$
$0$ $1$
$1$ $0$
NOT truth table