Skip to main content

Three Ideas of Signed Binary Numbers

Big trilemma!

In early years of digital computing, the computer industry faced a challenge - how to implement signed binary numbers. Competing ideas emerged both at the hardware and mathematical levels. Scientists have split into three camps. The first camp implemented the idea of ones' complement, the second - the idea of two's complement (this idea is the main one today), the third - the idea of sign-with-magnitude.

Comparison Number Systems

8-bit numbers representation

Binary ValueUnsignedSign and Magnitudeones' complementTwo's complement
000000000+0+00
000000011111
..........
01111110126126126126
01111111127127127127
10000000128-0-127-128
10000001129-1-126-127
10000010130-2-125-126
..........
11111110254-126-1-2
11111111255-127-0-1

Signed number representations (Wikipedia)

Other Systems

Google's Protocol Buffers

Resources