Review of Basic Number Representations and Arithmetic Algorithms
Sign-and-Magnitude (SM) System
A signed integer x is represented in the SM system by a pair
(Xs, Xm),
where
Xs
is the
sign
and
Xm
is the
magnitude
(positive integer). The two values of the sign
(+, -) are represented by a binary variable, where traditionally 0 corresponds to
-t-and 1 to-.
The magnitude can be represented by any system for the representation of
positive integers. If a conventional radix-r system is used, the range of signed
integers, for n digits in the representation of the magnitude, is
0 ___< X m ~___
r n - 1 1.11
Note that
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.