What is BCD Adder in Computer Architecture?

Computer ArchitectureComputer ScienceNetwork

BCD adder refers to a 4-bit binary adder that can add two 4-bit words of BCD format. The output of the addition is a BCD-format 4-bit output word, which defines the decimal sum of the addend and augend and a carry that is created in case this sum exceeds a decimal value of 9. Therefore, BCD adders can implement decimal addition.

Construction of BCD Adder

Sum of Binary Digits
Sum of BCD Digits

K
Z8
Z4
Z2
Z1
C
S8
S4
S2
S1
Decimal
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
1
0
0
0
0
1
0
2
0
0
0
1
1
0
0
0
1
1
3
0
0
1
0
0
0
0
1
0
0
4
0
0
1
0
1
0
0
1
0
1
5
0
0
1
1
0
0
0
1
1
0
6
0
0
1
1
1
0
0
1
1
1
7
0
1
0
0
0
0
1
0
0
0
8
0
1
0
0
1
0
1
0
0
1
9
0
1
0
1
0
1
0
0
1
0
10
0
1
0
1
1
1
0
0
1
1
11
0
1
1
0
0
1
0
0
0
0
12
0
1
1
0
1
1
0
0
0
1
13
0
1
1
1
0
1
0
1
1
0
14
0
1
1
1
1
1
0
1
1
1
15
1
0
0
0
0
1
0
1
0
0
16
1
0
0
0
1
1
0
1
0
1
17
1
0
0
1
0
1
1
0
1
0
18
1
0
0
1
1
1
1
0
1
1
19

In this table, K is the carry. The subscripts below the letter Z define the weights. The weights, according to the table, are 8, 4, 2, and 1. These weights can be allotted to the four bits in BCD code. The first column contains the binary sum as in the outputs of a 4-bit binary adder.

The second column contains the output sum of two decimal numbers that are represented in BCD. If the binary sum is less than or equal to 1001, then the corresponding BCD number is identical, and therefore, there is no need for conversion.

The decimal numbers in BCD are inserted by operating one 4-bit binary adder and by implementing arithmetic operations one digit at a time. It can make a binary sum, the first addition is implemented on the low-order pair of BCD digits.

In case the output is equal to or higher than 1010, it can be set right by inserting 0110 to the binary sum. This can make an output carry necessarily for the next pair of significant numbers.

Therefore, the consecutive high-order pair of numbers along with input-carry is inserted to create their binary sum. In case this output is higher than or equal to 1010, it is set right by inserting 0110. This procedure is repeated just before each decimal digit is added.

It helps change the logic circuit that identifies the needed corrections. When the binary sum has an output carry K = 1, a correction is needed. Different six combinations are beginning from 1010 to 1111 that needed corrections have a 1 in position Z8. It can differentiate them from binary 1000 and 1001, which also receive a 1 in position Z8, it is defined that either Z4 or Z2 should have a 1.

The following Boolean function can define the condition for a correction and an output carry −

C = K + Z8Z4 + Z8Z2

In case C = 1, 0110 is added to the binary sum and an output-carry is supported for the next stage.

raja
Published on 30-Jul-2021 13:04:07
Advertisements