Binary NOT Calculator
Use the free Binary NOT Calculator to instantly invert every bit in a binary number. The bitwise NOT operation changes each 0 to 1 and each 1 to 0 while preserving the original bit width. Enter any binary value below to calculate its one’s-complement bit pattern with an instant result.
What Is a Binary NOT Operation?
Binary NOT is a unary bitwise operation that reverses every bit in a binary number. It uses only one input, unlike AND, OR, and XOR, which normally compare two binary values.
For each position, a 0 becomes 1 and a 1 becomes 0. The result keeps the same bit width as the original input, so leading zeros remain important.
0 → 1
1 → 0
1 → 0
0 → 1
1 → 0 Result: 010010
Binary NOT Truth Table
The NOT operation has only two possible one-bit inputs.
| Input Bit | NOT Result |
|---|---|
| 0 | 1 |
| 1 | 0 |
How to Calculate Binary NOT Manually
Start with the complete bit pattern, including any leading zeros that are part of the intended width.
The calculation is performed independently on every position.
Each zero bit is inverted and becomes one.
Each one bit is inverted and becomes zero.
Do not remove leading zeros from the result because they represent inverted bit positions.
Worked Example: NOT 101101
| Position | Input | NOT |
|---|---|---|
| 1 | 1 | 0 |
| 2 | 0 | 1 |
| 3 | 1 | 0 |
| 4 | 1 | 0 |
| 5 | 0 | 1 |
| 6 | 1 | 0 |
More Binary NOT Examples
| Input | Bit Width | NOT Result |
|---|---|---|
0 | 1 bit | 1 |
1 | 1 bit | 0 |
1010 | 4 bits | 0101 |
0000 | 4 bits | 1111 |
1111 | 4 bits | 0000 |
101101 | 6 bits | 010010 |
11110000 | 8 bits | 00001111 |
00000101 | 8 bits | 11111010 |
Why Bit Width Matters in Binary NOT
The result of a NOT operation depends on how many bit positions are included. This is one of the most important points to understand when working with bitwise inversion.
Both original values represent decimal 5 as unsigned binary numbers, but the NOT results differ because one calculation uses four bits and the other uses eight.
Binary NOT and One's Complement
Applying NOT to every bit of a fixed-width binary number produces its one's complement.
For that reason, Binary NOT and one's-complement bit inversion produce the same bit pattern when the same width is used.
Binary NOT vs Two's Complement
Binary NOT should not be confused with two's complement. NOT only flips the bits. Two's complement requires one additional step.
For example, use the 8-bit value 00000101.
Flipping every bit gives 11111010.
Adding 1 produces 11111011, which is the 8-bit two's-complement
representation of -5.
Applying Binary NOT Twice
NOT is its own inverse. If every bit is inverted and then inverted again, the original value returns.
NOT A = 010010
NOT (NOT A) = 101101
This is the bitwise form of double negation.
NOT of All Zeros and All Ones
All zeros
Every 0 becomes 1, so NOT 00000000 = 11111111.
All ones
Every 1 becomes 0, so NOT 11111111 = 00000000.
Binary NOT and Decimal Values
A NOT result can be converted to decimal, but its meaning depends on both the bit width and whether the value is interpreted as unsigned or signed.
If 11111010 is interpreted as an 8-bit signed two's-complement
integer, it represents -6 instead. The bits are identical; only the numerical
interpretation changes.
Fixed-Width Binary NOT Formula
For an unsigned integer x represented using exactly n bits, the fixed-width NOT result can be calculated numerically with:
For example, if x = 5 and the width is 8 bits:
255 - 5 = 250 Therefore: NOT₈(5) = 250 Binary verification: 00000101 → 11111010
Binary NOT vs AND, OR, and XOR
| Operation | Inputs | Main Rule |
|---|---|---|
| NOT | 1 | Flip every bit. |
| AND | 2 | 1 only when both corresponding bits are 1. |
| OR | 2 | 1 when at least one corresponding bit is 1. |
| XOR | 2 | 1 when corresponding bits are different. |
Binary NOT and XOR with an All-Ones Mask
For a fixed bit width, XORing a value with all ones produces the same output as applying NOT.
Every bit differs from 1 exactly when that bit is 0, so the XOR mask flips the complete bit pattern.
Where Is Binary NOT Used?
Programming
Invert bit fields, create complementary masks, manipulate flags, and perform low-level integer operations.
Bitmasks
Reverse selected and unselected positions when creating exclusion or inverse masks.
Embedded Systems
Invert fixed-width hardware registers and control masks in microcontroller applications.
Digital Logic
A NOT gate, also called an inverter, outputs the opposite Boolean state of its input.
Networking
Complemented masks and fixed-width address operations can require binary inversion.
Computer Science
NOT is fundamental to Boolean algebra, bit manipulation, logic gates, and binary representation.
Common Binary NOT Mistakes
NOT of a four-bit value and NOT of an eight-bit representation can produce different binary results.
Leading zeros are real bit positions in a fixed-width operation and must also be inverted.
NOT only flips the bits. Two's complement requires adding 1 after the inversion.
Signed and unsigned interpretations can assign different decimal values to the same bit pattern.
A valid binary bit pattern contains only binary digits.
Related BinaryCon Tools
Continue with complementary binary and bitwise tools.
Binary NOT Calculator FAQs
What is Binary NOT?
What is NOT 0?
NOT 0 = 1.
What is NOT 1?
NOT 1 = 0.
What is NOT 1010?
NOT 1010 = 0101.
What is NOT 101101?
What is NOT 11110000?
Does Binary NOT preserve leading zeros?
Why does bit width matter?
Is Binary NOT the same as one's complement?
Is Binary NOT the same as two's complement?
What happens when NOT is applied twice?
What is NOT of all zeros?
NOT 0000 = 1111.
What is NOT of all ones?
NOT 1111 = 0000.
Can NOT be calculated using XOR?
What is the formula for an unsigned n-bit NOT result?
(2ⁿ - 1) - x.
Why can a NOT result look negative in programming?
Can BinaryCon handle long binary values?
Understand Binary NOT with Confidence
Use BinaryCon to invert binary values, preserve exact bit widths, study one's complement, compare bitwise operations, and verify Binary NOT calculations with clear examples and practical explanations.