
Decimal Adder (BCD)
Adds decimal digits in BCD, correcting by +6 when a digit exceeds 9.
Description
An adder that keeps results in binary-coded-decimal form. Financial and display systems compute directly in decimal to avoid rounding. Add as 4-bit binary; if the digit exceeds 9 (or carries), add 6 to correct it.
- Valid BCD digits are 0000–1001; binary sums can reach 1111.
- If the sum is 1010–1111 or produces a carry, add 0110 (6).
- The correction generates the proper decimal carry to the next digit.
- What: An adder that keeps results in binary-coded-decimal form.
- Why: Financial and display systems compute directly in decimal to avoid rounding.
- How: Add as 4-bit binary; if the digit exceeds 9 (or carries), add 6 to correct it.
- Where: Calculators, point-of-sale, instruments with decimal displays.
- When: When decimal accuracy and direct display matter more than density.
- Analogy — Like an odometer that must skip the 'fake' numbers: binary counts 10–15 too, but decimal has no such digits, so adding 6 jumps over the six illegal codes back onto a valid digit.
At a glance
What
An adder that keeps results in binary-coded-decimal form.
Why
Financial and display systems compute directly in decimal to avoid rounding.
How
Add as 4-bit binary; if the digit exceeds 9 (or carries), add 6 to correct it.
Where
Calculators, point-of-sale, instruments with decimal displays.
When
When decimal accuracy and direct display matter more than density.
Think of it like…
Like an odometer that must skip the 'fake' numbers: binary counts 10–15 too, but decimal has no such digits, so adding 6 jumps over the six illegal codes back onto a valid digit.
The +6 correction
- Valid BCD digits are 0000–1001; binary sums can reach 1111.
- If the sum is 1010–1111 or produces a carry, add 0110 (6).
- The correction generates the proper decimal carry to the next digit.
Why add 6
| Binary sum | Decimal | Action |
|---|---|---|
| 0–1001 | 0–9 | valid, no fix |
| 1010–1111 | 10–15 | add 0110, carry out |
| carry set | >15 | add 0110, carry out |
Black-box view
Inputs on the left → outputs on the right · particles show signal direction
Underlying 4-bit binary add
▶ live simulatorCarry out = 1 · the glowing column is the full-adder stage currently computing; carry ripples right→left.
The 5 Whys
- 1
Why a BCD adder? To compute in decimal without binary conversion.
- 2
Why avoid conversion? Decimal fractions don't always map exactly to binary.
- 3
Why does +6 fix it? It skips the 6 invalid 4-bit codes (1010–1111).
- 4
Why generate a decimal carry? So multi-digit decimal addition chains correctly.
- 5
Root cause: BCD trades density for exact, display-ready decimal arithmetic.
Cheat sheet
Working principle
- Add as 4-bit binary; if the digit exceeds 9 (or carries), add 6 to correct it.
- An adder that keeps results in binary-coded-decimal form.
Key facts
- Valid BCD digits are 0000–1001; binary sums can reach 1111.
Why it exists
- Root cause: BCD trades density for exact, display-ready decimal arithmetic.