Jump to content

Ones' complement

From Simple English Wikipedia, the free encyclopedia
Revision as of 23:59, 2 February 2020 by Brantmeierz (talk | changes) (Brantmeierz moved page One's complement to Ones' complement: Proper name)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.