User Rating 0.0
Total Usage 0 times
0 / 1024 bits
Only 0 and 1 allowed. Max 1024 bits.
Pad to:
Input Bits
Inverted Bits
Inverted Binary
Original Decimal (unsigned)
Inverted Decimal (unsigned)
Inverted Hexadecimal
Inverted Octal
Two's Complement (signed)
Bit Length
History
Is this tool helpful?

Your feedback helps us improve.

About

Bitwise inversion (NOT operation) flips every bit in a binary word: each 0 becomes 1 and each 1 becomes 0. The result is the one's complement of the input. This operation underpins error-detection checksums, subnet mask derivation in networking, and two's complement arithmetic used by every modern CPU. A single misflipped bit in a checksum or bitmask can corrupt packet routing or cause signed-integer overflow. This tool processes arbitrary-length binary strings - not capped at 32 or 64 bits - and reports the inverted output alongside its decimal and hexadecimal equivalents computed via BigInt arithmetic.

Limitation: the decimal and hexadecimal conversions treat the binary string as an unsigned integer. For signed interpretation, consult the two's complement row in the results panel, which assumes the leading bit is the sign bit. Pro tip: when inverting subnet masks, verify your input is a contiguous block of 1s followed by 0s - non-contiguous masks are technically valid in older RFCs but rejected by most modern routers.

binary inverter bit flip ones complement bitwise NOT binary converter bit manipulation

Formulas

The bitwise NOT operator inverts each bit independently. For a binary string B of length n:

NOT(B) = B 111...1n

Equivalently, for each bit position i:

bi = 1 bi

The unsigned decimal value of the inverted string is:

D = n1i=0 bi 2i

For two's complement (signed interpretation with n-bit width):

Two's Comp(B) = NOT(B) + 1

Where B is the original binary input, bi is the bit at position i (LSB = 0), n is the total bit count, and D is the resulting unsigned decimal value.

Reference Data

Bit WidthMax Unsigned ValueNOT(0) ResultCommon UseOne's Complement Range (Signed)
4 bits (nibble)151111Hex digit, BCD−7 to +7
8 bits (byte)25511111111ASCII, subnet octets−127 to +127
12 bits4095111111111111ADC resolution−2047 to +2047
16 bits (word)655351111111111111111TCP/UDP checksum, UCS-2−32767 to +32767
24 bits16777215111...1 (24)RGB color, audio sample−8388607 to +8388607
32 bits (dword)4294967295111...1 (32)IPv4 address, int32−2147483647 to +2147483647
48 bits281474976710655111...1 (48)MAC address -
64 bits (qword)18446744073709551615111...1 (64)int64, memory address−9.22×1018 to +9.22×1018
128 bits3.40×1038111...1 (128)IPv6, UUID, AES key -
256 bits1.16×1077111...1 (256)SHA-256 hash -
512 bits1.34×10154111...1 (512)SHA-512 hash -
1024 bits~10308111...1 (1024)RSA key (legacy) -

Frequently Asked Questions

They are mathematically identical for fixed-width operands. NOT(B) = B 1...1. The distinction is contextual: NOT is a unary operator (one operand), while XOR is binary (two operands). Hardware implementations may differ in gate count, but the truth table output is the same for a full-width mask of 1s.
Interpretation depends on the number system. As an unsigned 8-bit integer, 11111111 equals 255. Under two's complement signed convention, the same bit pattern represents −1. This tool displays both: the unsigned decimal and the two's complement signed value so you can choose the correct interpretation for your context.
The tool inverts exactly the bits you provide without padding. If you enter 5 bits, you get 5 inverted bits. The decimal and hex outputs reflect the actual bit length. If you need a standard-width result (e.g., 8 or 16 bits), use the padding presets to zero-extend your input before inversion.
A subnet mask like 255.255.255.0 in binary is 24 ones followed by 8 zeros. Inverting it yields the wildcard mask: 8 zeros followed by 8 ones (0.0.0.255). Cisco ACLs use wildcard masks instead of subnet masks. Enter the 32-bit binary subnet mask here and the inverted output is your wildcard mask.
Yes, but you must provide the two's complement binary form yourself. For example, −5 in 8-bit two's complement is 11111011. Inverting gives 00000100, which is 4 unsigned - consistent with the identity NOT(x) = x 1 in two's complement.
Yes. NOT(NOT(B)) B for any binary string. This is because each bit is flipped twice, returning to its original state. This property is used in error-checking: if a round-trip inversion does not match the original, a transmission error occurred.