Use this bitwise NOT calculator (or complement calculator) to flip every bit in an integer. Enter a number and see the result instantly with full binary representation.
Bitwise NOT calculator
Using the calculator
Enter your number and select an input format: Decimal, Hex, Binary, or Octal. You can also type prefixes directly (0xFF for hex, 0b1010 for binary, or 0o17 for octal) and the tool will auto-detect the format.
The result displays in all formats simultaneously: decimal (signed and unsigned), hexadecimal, octal, and a 32-bit binary representation with spaces every 8 bits for readability.
How bitwise NOT works
Bitwise NOT (also called the one's complement) inverts every bit in a number. Each 0 becomes 1 and each 1 becomes 0. Since the tool performs the NOT on all 32 bits of a two's complement integer, it will also switch positive numbers to negative and vice versa.
In JavaScript and most programming languages, the formula is:
\sim x = -(x+1)
Bitwise NOT example
\sim 44 = -45
In binary, 44 is represented as:
00000000000000000000000000101100
Applying NOT flips every bit to:
11111111111111111111111111010011
This represents -45 in two's complement notation.
Why does the result look "off by one"?
Two's complement notation doesn't have a "negative zero" - it uses that bit pattern for an extra negative number instead. To interpret a negative two's complement number: invert all the bits mentally, add 1, then negate. So ~44 gives us -(44+1) = -45.
This is why bitwise NOT of any number n equals -(n+1) - it's a consequence of how two's complement represents negative integers.
