Primary
Ones' Complement ○|Definition|1st|20251119205401-00-⌔
Ones’ complement
The ones’complement of a binary number is the value obtained by inverting (flipping) all the bits in the number (that is, changing each 1 to a 0 and each 0 to a 1). The name “ones’ complement”1 refers to the fact that such an inverted value, if added to the original, would always produce an”all ones”number (the term” complement ” refers to such pairs of mutually additive inverse numbers, here in respect to a non-0 base number). This mathematical operation is primarily of interest in computer science, where it has varying effects depending on how a specific computer represents numbers.
A ones’complement system or ones’ complement arithmetic is 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 while two’s complement can express −2 to 2 −1. It is one of three common representations for negative integers in binary computers, along with two’s complement and sign-magnitude.
The ones’ complement binary numeral system is characterized by the bit complement of 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, e.g., the UNIVAC 1101, CDC 160, CDC 1604, CDC 6600, LINC, DEC PDP-1, UNIVAC 1107, and their successors, used ones’complement arithmetic. Successors of the CDC 6600 continued to use ones’ complement arithmetic until the late 1980s along with the descendants of the UNIVAC 1107 (the UNIVAC 1100/2200 series), but all modern computers use two’s complement.
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original Footnotes
Knuth, Donald E. (1982). “4.1. Positional Number Systems”. The Art of Computer Programming, Volume 2: Seminumerical Algorithms (3rd ed.). Reading, Mass: Addison-Wesley. pp. 203–204. ISBN 0-201-03801-3. Detail-oriented readers and copy editors should notice the position of the apostrophe in terms like ‘two’s complement’and’ones’complement’: A two’s complement number is complemented with respect to a single power of 2, while a ones’ complement number is complemented with respect to a long sequence of 1s. ↩
Secondary
• • •