Binarios.org

BCD Adder Calculator

Add two non-negative decimal integers using the standard 8421 Binary-Coded Decimal (BCD) method. Get the decimal answer, encoded BCD digits, intermediate binary sums, carry propagation, and correction steps.

Add two BCD numbers

Enter decimal integers. The calculator converts each decimal digit to four-bit BCD and simulates addition from right to left.

Enter whole numbers using digits 0–9. Commas and spaces are accepted. Negative numbers and decimal fractions are not supported.

BCD addition result

Decimal sum
97
59 + 38 = 97
First operand in BCD
Second operand in BCD
Result in BCD
Result as a binary integer

Step-by-step calculation

What is BCD addition?

Binary-coded decimal (BCD) represents every decimal digit separately. In the common 8421 BCD format, each digit uses four bits: decimal 0 is 0000, decimal 1 is 0001, and decimal 9 is 1001.

The four-bit patterns from 1010 through 1111 are not valid individual digits in standard 8421 BCD. Consequently, ordinary binary addition sometimes needs a correction before a digit can be carried into the next decimal position.

The BCD correction rule

For each decimal digit, add the two four-bit BCD digits and the incoming carry.

Why add 0110? A four-bit group has 16 possible binary values, but a decimal digit has only 10 valid BCD values. Adding six corrects the invalid digit range and produces the appropriate carry into the next decimal place.

This is the standard correction rule for 8421 BCD addition. Read more about BCD 8421.

Worked example: 59 + 38

Convert each decimal digit to BCD:

Number Tens digit Units digit BCD representation
59 5 = 0101 9 = 1001 0101 1001
38 3 = 0011 8 = 1000 0011 1000

Start with the units digit:

1001  (9)
1000  (8)
----
10001 (17 in ordinary binary)

Add the BCD correction 0110 to the units position.
The units digit becomes 7, and a carry of 1 moves to the tens.

The tens position: 5 + 3 + 1 = 9
No correction is required.

Final decimal result: 97
Final BCD result:     1001 0111

Each group of four bits in 1001 0111 is a valid BCD digit: 1001 represents 9 and 0111 represents 7.

BCD adder calculator: common questions

Is BCD the same as ordinary binary?

No. Ordinary binary encodes the whole integer in base 2. BCD encodes each decimal digit independently using four bits. For example, decimal 12 is binary 1100, but its 8421 BCD representation is 0001 0010.

Why is 1010 not a valid BCD digit?

The four-bit pattern 1010 represents decimal 10 in binary, while one BCD digit can represent only a decimal digit from 0 through 9. The calculator corrects invalid intermediate digit sums before producing the final BCD output.

Does the calculator support very large numbers?

Yes. The calculation uses decimal digit strings and per-digit arithmetic rather than converting the entire input to a JavaScript Number. This avoids ordinary floating-point integer precision limitations. Browser input-length limits may still apply.

Can I enter an already encoded BCD bit string?

This page accepts decimal integers and displays their BCD encodings. It does not currently accept raw BCD bit strings as inputs.