Page 77 - Engineering Digital Design
P. 77
48 CHAPTER 2 / NUMBER SYSTEMS, BINARY ARITHMETIC, AND CODES
to the BCD magnitude according to Eq. (2.11). Thus,
-0101 1001.0010 0100) BCD = (1 01011001.0010 0100) 5CD,25 M.
2.6.3 Diminished Radix Complement Representation
The diminished radix complement N( r-\)c of a number N r having n digits is obtained by
n
N (r-i) C=r -N r-l, (2.15)
where, according to Eq. (2.12), A^ (r_ 1)C + 1 = N rC. Therefore, it follows that
N (r-i) C = N r.
This means the diminished radix complement of a number is the digits complement of
that number as expressed by Algorithm 2.7. The range of representable n digit numbers in
n l
1
diminished radix complement is —(r ~ — 1) through +(r"~ — 1) for radix r.
Algorithm 2.7: A^-nc «~ Nr
(1) Replace each Uigit a- t of N r by r — 1 — a t or
(2) Complement each digit by N r as in Table 2.6.
In the binary and decimal number systems the diminished radix complement represen-
tations are the 1's complement and 9's complement, respectively. Thus, 1's complement is
the binary digits complement given by A^c = $2, while the 9's complement is the decimal
digits complement expressed as N$c = N\Q. Examples of eight-bit 1's complements are
shown in Table 2.7 together with their corresponding 2's complement representation for
comparison. Notice that in 1 's complement there are two representations for zero, one for
+0 and the other for —0. This fact limits the usefulness of the 1 's complement representation
for computer arithmetic.
Shown in Table 2.8 are examples of 10's and 9's complement representations in n digits
numbering from 3 to 8. Notice that leading O's are added to the number on the left to meet
the n digit requirement.
Table 2.8 Examples of 10's and 9's complement
representation
Number n 10's Complement 9's Complement
0 5 [1JOOOOO 99999
3 3 997 996
14.59 6 9985.41 9985.40
225 4 9775 9774
21.456 5 78.544 78.543
1827 8 99998173 99998172
4300.50 7 95699.50 95699.49
69.100 6 930.900 930.899