Ones' complement

The One's complement is an operation that can be done to binary numbers. It is obtained by swapping all the bits in the number, that is, replacing 1 with 0, or 0 with 1. In many systems, this is used to represent the inverse of a number. One of the big problems that occur when using One's complement is that the number zero has two representations, either all 0's or all 1's. Using 4 digits both 0000 and 1111 represent zero. This problem can be solved by using Two's complement.

Category:Binary arithmetics