Arithmetic Circuits
247
Figure 7.20 Four-bit adder-subtractor.
This binary number is going to be (10011) 2 . On the other hand, if we do BCD addition, we would
expect the answer to be (0001 1001) BCD . And if we restrict the output bits to the minimum required, the
answer in BCD would be (1 1001) BCD . Table 7.1 lists the possible results in binary and the expected
results in BCD when we use a four-bit binary adder to perform the addition of two BCD digits. It is
clear from the table that, as long as the sum of the two BCD digits remains equal to or less than 9, the
four-bit adder produces the correct BCD output.
The binary sum and the BCD sum in this case are the same. It is only when the sum is greater than
9 that the two results are different. It can also be seen from the table that, for a decimal sum greater
than 9 (or the equivalent binary sum greater than 1001), if we add 0110 to the binary sum, we can
get the correct BCD sum and the desired carry output too. The Boolean expression that can apply the
necessary correction is written as
C = K + Z 3 Z 2 + Z 3 Z 1
(7.17)
Equation (7.17) implies the following. A correction needs to be applied whenever K = 1. This takes
care of the last four entries. Also, a correction needs to be applied whenever both Z 3 and Z 2 are ‘1’.
This takes care of the next four entries from the bottom, corresponding to a decimal sum equal to
Précédent

- 266/741

Suivant