2.9 BCD ADDITION
In the case of BCD addition, the BCD number is first converted to its binary form prior to performing the addition operation. The resulting binary nibbles are converted to their corresponding BCD digits, and the arithmetic operation is then performed. The addition of two BCD numbers is complicated because of the fact that the resulting sum can be greater than 9, which means that corrections need to be applied. Let us consider two BCD numbers, represented by U = U3U2U1U0 and V = V3V2V1V0. If U + V is less than or equal to 9, the process of addition is the same as that of the binary addition of unsigned numbers. But if the sum is greater than 9, we need to add the BCD equivalent of 6 (i.e., 0110) to the first result to get the answer desired. The following examples illustrate BCD addition and the corrections required to obtain the results expected.
Figure 2.7 shows additional examples of the addition of BCD numbers and the adjustment required to obtain the correct BCD numbers.
Get Introduction to Digital Systems: Modeling, Synthesis, and Simulation Using VHDL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.