BinaryCon Binary Converter

Binary 1’s Complement

Result

Binary 1’s Complement

Compute the 1’s complement of a binary number.

Example: 1010

Definition: Computes the ones' complement (bitwise inversion) of the provided binary string.

Operation

One's complement: invert every bit (0→1, 1→0). For N-bit value x, ones_complement = (~x) & (2^N-1).
Example (4-bit): 1010 → 0101