Hex NOT Calculator
Bitwise NOT (invert) a hex value at your chosen bit width — every bit flips, so the result depends entirely on how many bits you pick.
Binary, aligned by bit

Built by
Swapnil SanghviFull-Stack Web Developer & WordPress Developer
Swapnil Sanghvi is a full-stack web and WordPress developer, UI designer, and full-time freelancer who builds and maintains Hex Calculator.
Further reading: Bitwise operation — Wikipedia
How to NOT a Hex Value
Write the value out in binary at your chosen bit width, then flip every single bit — 1s become 0s and 0s become 1s. Unlike AND/OR/XOR, there's only one input, so the result depends purely on the value and the bit width you pick.
Hex NOT Example, Step by Step
NOT 0x0F (8-bit) = 0xF0
~0x0F = 0xF0 (at 8-bit width)
0000 1111 ~ --------- 1111 0000
| Step | Description | Result |
|---|---|---|
| Write in binary | 0x0F = 00001111 (8-bit) | 8 bits |
| Flip every bit | each 0 becomes 1, each 1 becomes 0 | 11110000 |
| Convert back to hex | 11110000 = 0xF0 | 0xF0 |
At 16-bit width instead, the same 0x0F would NOT to 0xFFF0 — the extra leading zero bits also flip to 1, since NOT operates on every bit up to the chosen width.
Where Hex NOT Actually Comes Up
Building the Inverse of a Mask
If a mask selects certain bits with 1s, NOTing that mask (at the right bit width) gives you a mask that selects everything except those bits — used together with AND to clear specific bits.
value & ~mask clears masked bits
Computing Two's Complement by Hand
Two's complement negation is NOT the bits, then add 1 — working through NOT as its own step helps when verifying a negation result by hand.
NOT(0x05) + 1 = -5 at 8-bit
Checking Which Bits Are NOT Set
Inverting a status register and checking which bits are now 1 is a quick way to see which flags are currently off, without checking each bit individually.
~status shows all clear flags as 1
Why Use This Calculator Instead of Doing It by Hand
- Shows the result at any of 4 bit widths, since NOT's result depends entirely on width
- Displays aligned binary so you can see every flipped bit
- Runs entirely in your browser — nothing you type gets sent anywhere
- Includes AND, OR, and XOR in the same calculator if you need to switch operations
Limitations
- Results are bit-width dependent — always confirm the selected width matches your actual data type before using the result.
- This is a bitwise inversion, not arithmetic negation — use the Two's Complement Calculator if you need a value's negative.
Frequently Asked Questions
How does bitwise NOT work?
It flips every bit — every 1 becomes 0, and every 0 becomes 1. Unlike AND/OR/XOR, NOT only takes one input.
Why does bit width matter so much for NOT specifically?
Because NOT flips every bit up to the chosen width, the result changes completely depending on width — NOT of 0x0F is 0xF0 at 8-bit, but 0xFFF0 at 16-bit, since the extra leading bits also flip from 0 to 1.
Is NOT the same as negation?
No — NOT flips bits (a bitwise operation), while arithmetic negation changes a value's sign. Two's complement negation is actually NOT plus 1, which is why they're related but not identical — see the Hex Two's Complement Calculator for the arithmetic version.
What's NOT commonly used for?
Building the inverse of a mask — if 0x0F selects the low nibble, NOT 0x0F (at the right bit width) selects everything except the low nibble.