Digital Logic Design: Shovon Roy Lecturer, Dept. of CSE, BUBT

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Digital Logic Design

CSE-205 Lecture: BCD Adder

Shovon Roy
Lecturer, Dept. of CSE, BUBT
What is BCD Adder?
• A 4-bit binary adder.
• Adds two 4-bit digits having a BCD.
• Resulting format 4-bit output digit.
• Sum exceeding decimal value of 9, a carry’s
generated.
Conversion and Coding

Coding
Conversion (using BCD code
for each digit)
Functions of BCD Adder
• A 4-bit BCD code’s used to represent 0 to 9
digits.
• Adding BCD numbers using BCD addition.
• Adding 6 with the sum while exceeding 9 and
generating a carry.
• By adding 6 to the sum, make an invalid digit
valid.
Table 4.5: Derivation of BCD adder
Why ADD 6 to the Result?
In examining the contents of the table, it becomes
apparent that when the binary sum is equal to or less
than 9 (1001), the cor responding BCD number is
identical, and therefore no conversion is needed. When
the binar y sum is g reater than 1001, we obtain an
invalid BCD representation. The addition of binar y 6
(0110) to the binary sum converts it to the correct BCD
representation and also produces an output carr y as
required.
Algorithm for BCD Adder

• If sum is up to 9
– Use the regular adder

• If the sum > 9


– Use the regular adder and add 6 to the result
When Is The Result <= 9

Corresponding BCD number is identical,


so no need to add 6
When Is The Result > 9

Corresponding BCD number is not


identical, so we need to add 6 for valid
BCD number
When Is The Result > 9

C=K

Corresponding BCD number is not


identical, so we need to add 6 for valid
BCD number
When Is The Result > 9

C = K + Z8 Z 4

Corresponding BCD number is not


identical, so we need to add 6 for valid
BCD number
When Is The Result > 9

C = K + Z8 Z 4 + Z 8 Z 2

Corresponding BCD number is not


identical, so we need to add 6 for valid
BCD number
When Is The Result > 9
Corresponding
BCD number is
not identical, so
we need to add 6
for valid BCD
number

Z8 Z2
C = K + Z8 Z 4 +
Z8 Z2

Z8 Z4 When any of these


is true the result is
K greater than 9 and
we need to add 6 to
the result. We get C
as 1.
4 bit BCD Adder 0 1 1 1 0 1 1 0

A3 A2 A1 A0
A= 0 1 1 0
B= 0 1 1 1
B3 B2 B1 B0
0 1 1 0 1
1

0
C = K + Z8 Z 4 +
Z8 Z2
1 1
1 1 0 1

1 0 0 1 1
C

You might also like