← All tools
// Number

NOT Calculator online

Bitwise NOT — one's complement — Binary, Hex, Decimal, ASCII

NOT Calculator
by
CHUNKY
MUNSTER

How to Use NOT Calculator

  1. Enter a single value — decimal, hex, binary, octal, or ASCII text.
  2. Set Input Base or leave on Auto Detect.
  3. Choose a Bit Width — the result is masked to this many bits so you get an unsigned positive value.
  4. Click Calculate NOT — results appear in Binary, Octal, Decimal, Hex and ASCII.

Bitwise NOT (also written as ~) flips every bit of the value: every 0 becomes 1 and every 1 becomes 0. This is also called the one's complement of a number. The result depends on the bit width — NOT 0 for 8 bits gives 11111111 (255), for 32 bits gives 4294967295.

NOT Truth Table

Input NOT Output
01
10

One's Complement vs Two's Complement

One's complement (~N) flips all bits. Two's complement (~N + 1) flips all bits and adds 1 — this gives the negative of N in signed arithmetic. Modern CPUs use two's complement for signed integers, so -N in code equals ~N + 1.

Use Cases for Bitwise NOT

Frequently Asked Questions

What is bitwise NOT?

Bitwise NOT (~) flips every bit: 0 becomes 1 and 1 becomes 0. For signed integers, ~N = -(N+1). For unsigned values it gives the one's complement.

Why does NOT 0 equal -1?

In two's complement (the standard for signed integers), all bits set to 1 represents -1. NOT 0 flips all zeros to ones, which equals -1 in signed representation.

What bit width should I choose?

Choose the bit width that matches your hardware context: 8-bit for bytes, 16-bit for short integers, 32-bit for standard integers (most common), 64-bit for long integers.

What is the difference between one's complement and two's complement?

One's complement flips all bits (~N). Two's complement flips all bits and adds 1 (~N + 1 = -N). Two's complement is used by virtually all modern hardware for signed integers.

See also: NAND Calculator, NOR Calculator, XOR Calculator, Bitwise Calculator.