Page 478 - DSP Integrated Circuits
P. 478
11.2 Conventional Number Systems 463
A normalized value is in the range 1 < x < 1. Hence, the binary point is placed
immediately to the right of XQ. If the need arises, the number range can be
changed by moving the binary point. In the signed-magnitude representation
numbers having the same magnitude are represented by the same binary word,
except for the sign bit. For example, we have
(+0.828125) 10 = (0.110101) SM
(-0.828125) 10 = (1.110101) SM
(0) 10 = (0.000000) SM or (1.000000) SM
-W d +l
All values lie in the range -l + Q<x<l-Q where Q = 2 . There are as
many negative numbers as positive numbers. Notice that zero can be represented
as either +0 or —0. This may complicate the implementation of an ALU since two
checks for two different zeros have to be made. The values +1 and —1 can not be rep-
resented. A major disadvantage of the signed-magnitude representation is that
addition and subtraction depend on the signs of the operands. These operations are
more complicated to implement compared to one's-complement, two's-complement,
and binary offset representations. Multiplication, and division by a power of two,
can easily be done by shifting the fractional part of the binary word.
11.2.2 Complement Representation
One of the main advantages of a complement representation is that addition and
subtraction can be performed without regard of the sign of the operands. Positive
numbers are in one's-complement, two's-complement, and binary offset represen-
tations represented by the same number as in the signed-magnitude representa-
tion. Negative numbers are represented by
where R is to be determined shortly.
If a positive, x, and a negative number, y, are to be added, the negative num-
ber is represented by the complement, (R —y). Hence,
If y > x, then the negative result -(y - x) is in the correct complemented form
R - (y - x) and there is no need to make any corrections. However, if x > y, then the
correct result should be (x - y) but the actual result is R - (y - x) = R + (x - y).
Hence, the error term R must be eliminated. This can be done without any costs in
terms of extra operations if the value ofR is selected properly.
It is in practice important that it is easy to compute the complement of a
value. We define the complement of a single digit xi as

