One's Complement Calculator - Binary, Decimal and Hex
One's complement (binary)
1101 0101
The bitwise NOT of the input, padded to the chosen bit width.
One's complement (decimal)213
One's complement (hex)D5
Input as binary0010 1010
Input as decimal42
Input as hex2A
▸
One's complement of 42 in 8 bits is 213 (1101 0101).
In 8-bit one's complement, the complement of 42 is 213 (0xD5).
Adding the original and its complement always gives 255 (all 1s), which equals 2^8 - 1.
One's complement is simply bitwise NOT: every 0 becomes 1 and every 1 becomes 0.
8-bit one's complement can represent signed integers from -127 to +127 (it has two zeros: 0000 0000 and 1111 1111).
Next stepFor modern signed-integer arithmetic, two's complement (add 1 to one's complement) is the standard because it eliminates the double-zero problem.