BCD adder

Comprehensive study notes, diagrams, and exam preparation for BCD adder.

BCD Adder

Definition

A BCD adder is a combinational logic circuit that adds two 4-bit BCD numbers and produces a valid BCD sum by performing binary addition followed by decimal correction when the binary result exceeds 9 or generates a carry.


Main Content

1. BCD Representation and Need for BCD Addition

  • In BCD, each decimal digit is encoded separately using 4 bits. For example, decimal 7 is 0111, decimal 9 is 1001, and decimal 0 is 0000.
  • Only the binary patterns from 0000 to 1001 are valid BCD codes. The patterns 1010 to 1111 are invalid because they do not represent decimal digits.

A BCD adder is needed because ordinary binary addition does not always produce a valid decimal digit when the inputs are BCD coded. For example:

  • 0101 (5) + 0110 (6) = 1011 in binary, which equals 11 decimal
  • But 1011 is not a valid BCD digit, since BCD digits must be between 0000 and 1001
  • Therefore, the result must be corrected to represent decimal 11 as two BCD digits: 0001 0001

This correction is what makes BCD arithmetic different from pure binary arithmetic.

2. Correction Logic in a BCD Adder

  • After adding two BCD digits, the result may be invalid if it is greater than 9 or if there is a carry out from the 4-bit addition.
  • To fix this, the circuit adds 0110 (decimal 6) to the 4-bit sum whenever correction is required.

The reason for adding 6 is that the binary values 1010 through 1111 are six invalid codes between 10 and 15. Adding 6 shifts the binary sum into a valid BCD range and generates the correct decimal carry to the next digit.

Correction is needed when either of these conditions occurs:

  • The binary sum is greater than 1001
  • A carry is produced from the most significant bit of the 4-bit adder

A common correction condition can be expressed as:

Cout + S3S2 + S3S1 = 1

where:

  • Cout is the carry out from the first adder
  • S3S2 + S3S1 indicates that the sum is 10 or more

This condition is often implemented using AND/OR logic and a second 4-bit adder.

Example:

  • 0111 (7) + 0101 (5) = 1100 (12)
  • Since 1100 is greater than 9, add 0110
  • 1100 + 0110 = 1 0010
  • Final BCD result = 0001 0010 = 12 decimal

3. Structure of a BCD Adder Circuit

  • A BCD adder typically consists of two 4-bit binary adders and a correction logic block.
  • The first adder adds the two BCD digits.
  • The correction logic checks whether the intermediate sum is invalid.
  • If correction is required, the second adder adds 0110 to the intermediate sum.

A simplified structure:

   A3 A2 A1 A0 ----\
                    >---- [4-bit Binary Adder] ---- S3 S2 S1 S0 ----\
   B3 B2 B1 B0 ----/                                              |
                                                                    v
                                                         [Correction Logic]
                                                                    |
                                                                    v
                                                        Add 0110 if needed
                                                                    |
                                                                    v
                                                         [4-bit Adder]
                                                                    |
                                                                    v
                                                          BCD Output

This structure ensures that each decimal digit remains properly represented in BCD form after addition.


Working / Process

1. Add the two BCD digits using a 4-bit binary adder.

The two 4-bit inputs are added just like normal binary numbers. The result may be a valid BCD digit or may exceed the valid range.

2. Check whether correction is necessary.

If the sum is greater than 1001 or if the adder produces a carry out, then the result is not a valid BCD digit and must be corrected.

3. Add 0110 to the invalid sum.

The circuit adds 6 to the intermediate result. This creates the correct BCD digit for the units place and generates a carry to the next decimal digit if needed.

Example:

  • Input: 1001 (9) and 0101 (5)
  • First addition: 1001 + 0101 = 1110 (14)
  • Since 14 is not a valid BCD digit, add 0110
  • 1110 + 0110 = 1 0100
  • Final result: 0001 0100 = 14 decimal

Advantages / Applications

  • Useful in decimal arithmetic systems where exact decimal representation is important, such as calculators and digital watches.
  • Prevents errors that occur when invalid binary codes appear during decimal digit addition.
  • Essential in devices using BCD-based display and output systems, especially seven-segment display drivers and financial processing equipment.

Summary

  • A BCD adder adds decimal digits encoded in binary form and corrects invalid results.
  • It uses binary addition plus an extra correction step by adding 6 when needed.
  • It is mainly used in decimal-oriented digital systems.
  • Important terms to remember: BCD, correction logic, invalid BCD code, decimal carry, 4-bit binary adder