22
Digital Electronics
Table 2.2 Excess-3 code equivalent of decimal numbers.
Decimal number Excess-3 code Decimal number Excess-3 code
0
0011
5
1000
1
0100
6
1001
2
0101
7
1010
3
0110
8
1011
4
0111
9
1100
its four-bit binary equivalent. It may be mentioned here that, if the addition of ‘3’ to a digit
produces a carry, as is the case with the digits 7, 8 and 9, that carry should not be taken
forward. The result of addition should be taken as a single entity and subsequently replaced
with its excess-3 code equivalent. As an example, let us find the excess-3 code for the decimal
number 597:
• The addition of ‘3’ to each digit yields the three new digits/numbers ‘8’, ‘12’ and ‘10’.
• The corresponding four-bit binary equivalents are 1000, 1100 and 1010 respectively.
• The excess-3 code for 597 is therefore given by: 1000 1100 1010 = 100011001010.
Also, it is normal practice to represent a given decimal digit or number using the maximum number
of digits that the digital system is capable of handling. For example, in four-digit decimal arithmetic,
5 and 37 would be written as 0005 and 0037 respectively. The corresponding 8421 BCD equivalents
would be 0000000000000101 and 0000000000110111 and the excess-3 code equivalents would be
0011001100111000 and 0011001101101010.
Corresponding to a given excess-3 code, the equivalent decimal number can be determined by
first splitting the number into four-bit groups, starting from the radix point, and then subtracting
0011 from each four-bit group. The new number is the 8421 BCD equivalent of the given
excess-3 code, which can subsequently be converted into the equivalent decimal number. As an
example, following these steps, the decimal equivalent of excess-3 number 01010110.10001010 would
be 23.57.
Another significant feature that makes this code attractive for performing arithmetic operations is
that the complement of the excess-3 code of a given decimal number yields the excess-3 code for 9’s
complement of the decimal number. As adding 9’s complement of a decimal number B to a decimal
number A achieves A – B, the excess-3 code can be used effectively for both addition and subtraction
of decimal numbers.
Example 2.3
Find (a) the excess-3 equivalent of (237.75) 10 and (b) the decimal equivalent of the excess-3 number
110010100011.01110101.
Solution
(a) Integer part = 237. The excess-3 code for (237) 10 is obtained by replacing 2, 3 and 7 with the
four-bit binary equivalents of 5, 6 and 10 respectively. This gives the excess-3 code for (237) 10
as: 0101 0110 1010 = 010101101010.
Précédent

- 44/741

Suivant