Theones' complementof abinary numberis defined as the value obtained by inverting all the bits in the binary representation of the number (swapping 0s for 1s and vice versa). The ones' complement of the number then behaves like the negative of the original number in some arithmetic operations. To within a constant (of −1), the ones' complement behaves like the negative of the original number withbinary addition. However, unliketwo's complement, these numbers have not seen widespread use because of issues such as the offset of −1, that negating zero results in a distinct negative zerobit pattern, less simplicity with arithmeticborrowing, etc.
Aones' complement systemorones' complement arithmeticis a system in which negative numbers are represented by the inverse of the binary representations of their corresponding positive numbers. In such a system, a number is negated (converted from positive to negative or vice versa) by computing its ones' complement. An N-bit ones' complement numeral system can only represent integers in the range −(2−1) to 2−1 whiletwo's complementcan express −2to 2−1.
Theones' complement binarynumeral systemis characterized by thebit complementof any integer value being the arithmetic negative of the value. That is, inverting all of the bits of a number (the logical complement) produces the same result as subtracting the value from 0.
Many early computers, including theCDC 6600, theLINC, thePDP-1, and the UNIVAC 1107, use ones' complement notation; the descendants of the UNIVAC 1107, theUNIVAC 1100/2200 series, continue to use it, but the majority of current computers use two's complement.