One's Complement Calculator
This one's complement calculator lets you find the one's complement to convert negative decimal values to binary. It also converts a decimal number to binary and its one's complement.
Two's complement11010110how computers actually store signed integers
One's complement11010101
Sign and magnitude10101010
Unsigned reading of those bits214
HexadecimalD6
Range at 8 bits-128 to 127
Why two’s complement won
| Zero | one representation, not two |
| Addition | works unchanged for signed values |
| Range | one extra negative value (-128) |
| Negation | flip the bits and add 1 |
The rule
one's complement flips the bits; two's adds 1 to that
Three ways to store a sign
Sign and magnitude uses the top bit as a sign flag. One's complement flips every bit. Both suffer from two zeros — positive and negative — and need special-case addition.
Two's complement adds one to the one's complement. It has a single zero, and ordinary binary addition works correctly across signs with no extra logic. That is why essentially every processor uses it.