The NOT logic gate, also known as the invertor gate, takes one bit as an input, and outputs the opposite bit: for the input $0$, it outputs $1$, and for the input of $1$, it outputs $0$. This gate acts exactly as the "not" operator in programming does: given the Boolean variable x, then: !x means "not x". You may also use the bitwise ~ operator: ~x.
Below is the graphical ("black-box") representation of the NOT gate, one way in which we can build it with transistors, and the truth table for this gate.
NOT Gate: black-box representation. Miriam Briskman, CC BY-NC 4.0.
One way to build a NOT Gate from transistors. Created by Tim Mathias, CC BY-SA 4.0, via Wikimedia Commons.
Input | Output |
---|---|
x | x' |
$0$ | $1$ |
$1$ | $0$ |