Skip to content
Tactiverge

Digital logic

NOT gate (inverter)

Also called: NOT · inverter · complement · Ā

Definition

A NOT gate has one input and outputs its opposite: 0 becomes 1 and 1 becomes 0.

Picture it

Inverters turn active-low signals, such as a button with a pull-up that reads 0 when pressed, into active-high ones. Bitwise NOT flips every bit in a word, which is the first step of negating a two's-complement number.

The maths

Y = NOT A (written Ā or A′)
SI units used in this entry
QuantityUnitSymbol
ratiodimensionless1

Worked example

In 8 bits, what is NOT 0b0011 0101 in binary and in unsigned decimal?

  1. Flip every bit: 1100 1010
  2. 128 + 64 + 8 + 2 = 202
  3. Check: 255 − 53 = 202

Answer1100 1010 = 202.

✓ The number in this answer is recomputed from scratch by an automated test.

logic tester

Logic gate tester

Y = 1

Y = A ⊕ B

Truth table for XOR; the current row is marked.
ABY
000
011
101 ◀ now
110
XOR with A = 1, B = 0 gives Y = 1.

Ideal gates: no propagation delay. 1 = true = high, 0 = false = low.

Common misconceptions

  • Misconception: In Python ~53 is −54, because Python ints are unbounded two's complement; mask with & 0xFF for 8 bits.
  • Misconception: Applying NOT twice gives back the original signal.