<<< Signed Integers     Index     1's complement integers >>>

6. Signed Magnitude Data Types


  • Leftmost position represents a negative sign when set equal to 1.

  • The remaining bits in the number indicate the magnitude (or absolute value).

  • A consequence of this representation is that there are two ways to represent zero:

    • 00000000 (0) and

    • 10000000 (-0).

  • Unfortunately, this type of encoding would require a cumbersome hardware to do arithmetic addition.

  •  

    8 bit signed magnitude:
    Binary value Signed magnitude interpretation Unsigned interpretation
    00000000 0 0
    00000001 1 1
    ... ... ...
    01111111 127 127
    10000000 -0 128
    ... ... ...
    11111111 -127 255

<<< Signed Integers     Index     1's complement integers >>>