Contents

Digital Electronics
Number Systems
Logic Gates
Boolean Algebra
Combinational Circuits
Sequential Circuits
Memory & PLDs
Digital System Design
Other Topics
Other Subjects
Section Progress67%

10 of 15 articles

BCD Code

Binary coded decimal, valid and invalid BCD, BCD addition.

Darshan N
Updated: 7 April 2026
12 min read

The Binary Coded Decimal (BCD) format stores each decimal digit as a 4-bit binary group. It is used in digital clocks, calculators, cash registers, and seven-segment display drivers like the 74LS47 BCD-to-seven-segment decoder.

BCD Code (8421 BCD)BCD Digit Encoding TableDecimal BCD Code Valid? 0 0000 Yes 1 0001 Yes 2 0010 Yes 3 0011 Yes 4 0100 Yes 5 0101 Yes 6 0110 Yes 7 0111 Yes 8 1000 Yes 9 1001 Yes - 1010 No (invalid) - 1011..1111 No (invalid)6 out of 16 4-bit patterns are invalidBCD Addition with CorrectionAdd normally. If sum > 9 or carry occurs,add 6 (0110) to correct the result.Example: BCD 5 + BCD 85 = 0101, 8 = 10000101 + 1000 = 11011101 > 1001 → add 6: 1101+0110= 1|0011 → carry=1, BCD digit=3Result: 0001 0011 = BCD 13 ✓IC: 74LS47 (BCD to 7-seg, active-low)Vcc=5V, tpd=40ns, sinks 40mA/segment74HC4511: CMOS, 3–15V, latch enable
Figure 1: BCD valid codes and BCD addition with correction factor

Core Concept

BCD uses the 8421 weighting — the four bit positions have weights 8, 4, 2, 1 respectively. Only the ten patterns 0000 through 1001 are valid. The six patterns 1010 through 1111 are invalid BCD codes and must never appear in a correctly operating BCD system.

BCD is inefficient in storage. A single decimal digit needs 4 bits in BCD but only 3.32 bits in pure binary. However, BCD eliminates decimal-to-binary conversion errors and is standard in financial systems, frequency counters, digital panel meters, and LCD/LED display drivers. The 74LS47 BCD-to-seven-segment decoder accepts a 4-bit BCD input and drives seven-segment displays with active-low outputs, sinking up to 40 mA per segment at 5V.

BCD addition requires a correction step. After adding two BCD digits normally, if the sum exceeds 9 (1001) or if a carry-out occurs, add 6 (0110) to the lower nibble. This skips the six invalid codes and produces the correct BCD result with a carry into the next decade. The 74LS83 can perform this operation when combined with correction logic.

Boolean Expression

The BCD correction condition is: add 0110 if (sum > 9) OR (carry-out = 1). The carry-out flag for BCD addition is set when the corrected sum generates a carry. For a multi-digit BCD number, each 4-bit group is processed independently with carry propagation between groups.

Example
Given:
  Add BCD 47 + BCD 36

Formula / Rule:
  Add digit by digit (units then tens).
  If sum > 9 or carry, add 6 to that digit.

Step by step:

  Units digit: 7 + 6 = 13
  BCD: 0111 + 0110 = 1101
  1101 > 1001, so add 0110:
  1101 + 0110 = 1|0011
  Lower digit = 0011 = 3, carry = 1

  Tens digit: 4 + 3 + 1(carry) = 8
  BCD: 0100 + 0011 + 0001 = 1000
  1000 <= 1001, no correction needed.
  Digit = 1000 = 8, carry = 0

Final Answer:
  BCD 47 + BCD 36 = BCD 83  (0111 0011)
  Decimal check: 47 + 36 = 83 ✓
Exam Tip: A very common GATE trap is forgetting to add the correction factor of 6 when a carry-out occurs even if the raw sum is 9 or less. If the binary addition of two BCD digits produces a carry-out, add 6 regardless of the digit value. Also remember: BCD 9 + BCD 9 = 0001 0001 0010 in BCD (which is 18), not 10010 (which is 18 in binary but not valid BCD format).

Key Properties

  • 8421 BCD: weights are 8, 4, 2, 1 for bit positions 3, 2, 1, 0
  • Valid codes: 0000 to 1001 (decimal 0 to 9); 10 out of 16 patterns
  • Invalid codes: 1010 to 1111 (decimal 10 to 15); 6 unused patterns
  • BCD addition correction: add 0110 when sum > 9 or carry-out occurs
  • 74LS47 BCD-to-seven-segment decoder: 5V TTL, tpd = 40 ns, active-low outputs, 40 mA sink
  • 74HC4511: CMOS BCD decoder with latch enable, 3–15V supply, modern replacement
  • Packed BCD stores two decimal digits per byte (upper nibble + lower nibble)

Quick Revision

  • BCD: each decimal digit encoded as 4 binary bits
  • Valid range: 0000 to 1001; codes 1010–1111 are invalid
  • BCD wastes 6 out of 16 possible 4-bit codes
  • Addition correction: add 6 if sum > 9 or carry generated
  • Used in: digital clocks, calculators, seven-segment displays, financial hardware
  • 74LS47 decodes BCD to active-low seven-segment; 74HC4511 is the CMOS version
  • Packed BCD: two digits per byte; used in x86 DAA (Decimal Adjust after Addition) instruction
  • Exam trap: adding two BCD numbers and reporting the raw binary sum without applying the +6 correction — this is the most frequent BCD arithmetic error in GATE

BCD Code Quiz

Test your understanding of Binary Coded Decimal encoding and BCD addition rules.

Question 1 of 3

Q1.Which of the following 4-bit patterns is an invalid BCD code?