- BCD Definition: BCD (Binary Coded Decimal) is defined as a coding system where each decimal digit is represented by a four-bit binary number.
- BCD Conversion: Conversion involves finding the decimal equivalent of the BCD codes and then converting that decimal to any required number system.
- BCD Addition: BCD addition requires adding binary numbers and adjusting results greater than 9 by adding 6.
- BCD addition requires adding binary numbers and adjusting results greater than 9 by adding 6.: BCD subtraction can be done using methods like 1’s complement and 9’s complement to get accurate results.
- Why Add 6 in BCD Addition: Adding 6 helps to correct the result by skipping invalid BCD states from 10 to 15, ensuring a valid BCD output.
BCD, or Binary Coded Decimal, is an encoding in which each decimal digit has its own four-bit code.
Decimal uses the digits 0 through 9. In BCD, their codes run from 0000 through 1001. The remaining six four-bit patterns are not decimal digit codes. A one-digit decimal value needs one four-bit BCD group. A two-digit value needs two groups, with one group for each digit. The Binary Coded Decimal representation therefore preserves the decimal digit boundaries. The following BCD example shows how this differs from an ordinary binary numeral.
For decimal (12)10, the Binary coded decimal representation is 0001 0010. The left group encodes decimal digit 1, and the right group encodes decimal digit 2.
The table compares ordinary binary and BCD representations for decimal values 0 through 15.
For a single decimal digit, the four-bit BCD code has the same bit pattern as the corresponding unsigned binary value. From decimal 10 onward, BCD uses a separate four-bit group for each decimal digit. Ordinary binary instead represents the value as one base-2 numeral.
| Decimal number | Binary number | Binary Coded Decimal(BCD) |
| 0 | 0000 | 0000 |
| 1 | 0001 | 0001 |
| 2 | 0010 | 0010 |
| 3 | 0011 | 0011 |
| 4 | 0100 | 0100 |
| 5 | 0101 | 0101 |
| 6 | 0110 | 0110 |
| 7 | 0111 | 0111 |
| 8 | 1000 | 1000 |
| 9 | 1001 | 1001 |
| 10 | 1010 | 0001 0000 |
| 11 | 1011 | 0001 0001 |
| 12 | 1100 | 0001 0010 |
| 13 | 1101 | 0001 0011 |
| 14 | 1110 | 0001 0100 |
| 15 | 1111 | 0001 0101 |
BCD Addition
BCD addition starts with binary addition for each four-bit decimal digit group. A correction step then converts any invalid group into a valid BCD digit. Use these three steps for BCD Addition.
- Add the corresponding four-bit groups using binary addition. For example:

- Check each four-bit sum and its carry-out. A group from 0000 through 1001 is valid only when that group did not also produce a carry-out.
- If a four-bit sum exceeds 1001 or produces a carry-out, add decimal 6, whose binary value is (0110)2. Pass any resulting carry to the next decimal digit group. In case 1, the sum is (1111)2, so adding (0110)2 produces the valid BCD result for decimal 15.
The correction produces two valid BCD groups: 0001 0101, which encodes decimal 15.
In case 2, the binary sum 0110 already encodes decimal 6, so it needs no correction.
Adding 6 skips the six invalid four-bit patterns from 1010 through 1111 and carries into the next BCD digit group.
The following examples apply the same BCD addition test.
Example:1
Add 0101, or decimal 5, to 0110, or decimal 6.
The corrected BCD result is 0001 0001, which encodes decimal 11.
Example:2
Add BCD 0001 0001, or decimal 11, to 0010 0110, or decimal 26.
The result 0011 0111 encodes decimal 37. Both four-bit result groups, , are no greater than (9)10, so neither group needs a correction.
BCD Subtraction
Several complement methods can perform BCD Subtraction. The first method below uses bitwise one’s complement with BCD correction logic. The second uses decimal 9’s complement. A related method uses 10’s complement. The 9’s- and 10’s-complement methods are usually easier for hand calculation. The examples show how each BCD Subtraction method handles the sign and digit corrections.
Method of BCD Subtraction : 1
The first BCD Subtraction method follows the 1’s compliment approach and the correction table below:
- Invert every bit of the BCD subtrahend to form its one’s complement.
- Add the complemented subtrahend to the minuend using binary addition. Call this intermediate operation adder 1.
- Inspect the end-around carry, or EAC. EAC = 1 indicates a nonnegative result, so add that carry back at the right. EAC = 0 indicates a negative result, so complement the intermediate groups. Apply the table’s group corrections in adder 2.
| carry of individual groups | EAC = 1 | EAC = 0 |
| 1 | Transfer real result of adder 1 and add 0000 in adder 2 | Transfer 1’s compliment result of adder 1 and add 1010 in adder 2 |
| 0 | Transfer real result of adder 1 and add 1010 in adder 2 | Transfer 1’s compliment result of adder 1 and add 0000 to adder 2 |
- Discard any carry produced by the correction within an individual four-bit group.
The following examples apply this BCD subtraction procedure to positive and negative results.
Example: – 1
Subtract BCD 0010 0001 0110, or decimal 216, from BCD 0101 0100 0001, or decimal 541.
- The one’s complement of 0010 0001 0110 is 1101 1110 1001. Add it to 0101 0100 0001 in adder 1.
- Propagate carries between four-bit groups during the binary addition. Here EAC = 1, so the result is positive and the adder 1 groups pass to adder 2.
- Add the end-around carry to the rightmost intermediate group, changing 1010 to 1011. Because this group had no local carry, add the table correction 1010. The four-bit result is 0101.
- Discard the carry produced by that four-bit correction.
- The middle intermediate group had a local carry, so add 0000. Its result remains 0010.
- The left intermediate group also receives the 0000 correction. Its result remains 0011.
- Reading the corrected groups from left to right gives BCD 0011 0010 0101, or decimal 325.

Therefore,
Check the encoded values in decimal.
Because 541 − 216 = 325, the BCD Subtraction result is correct.
Example: – 2
Subtract BCD 0101 0001, or decimal 51, from BCD 0100 1001, or decimal 49.
- Complement the subtrahend and add it to the minuend. Here EAC = 0, so the result is negative.
- Complement the adder 1 group 0111 to get 1000. For the rightmost group, add the table correction 1010. The four-bit result is 0010 after its carry is discarded.
- For the left group, account for the carry shown in the intermediate calculation, complement the group and add 0000. The corrected magnitude is BCD 0000 0010.
- The decimal check is 49 − 51 = −2, so the negative BCD result has magnitude 0000 0010.

Method of BCD Subtraction: 2
The 2nd method uses the decimal 9’s-complement procedure for BCD subtraction.
- Read the decimal digits represented by the Binary Coded Decimal (BCD) groups.
- Form the 9’s complement of every subtrahend digit, then add that value to the minuend.
- If the addition produces an end carry, add it to the low-order digit. With no end carry, take the 9’s complement of the sum and mark the result as negative.
The following example uses two decimal digits.
Calculate BCD (0101 0001) − (0010 0001), which is decimal 51 − 21.
- The BCD groups represent decimal 51 and 21. The two-digit 9’s complement of the subtrahend is 99 − 21 = 78.
- Add the complemented value to the minuend: 51 + 78 = 129.
- The leading 1 is the end carry. Add it to 29, giving 29 + 1 = 30 as the BCD Subtraction result.
- Encode decimal 30 as two BCD groups. The final result is 0011 0000:

For 10’s-complement BCD subtraction, add the subtrahend’s 10’s complement to the minuend. Discard an end carry for a nonnegative result. If no end carry appears, take the 10’s complement of the sum and mark the result as negative.
BCD Conversion
For BCD conversion, split the code into four-bit groups and convert each valid group from 0000 through 1001 to one decimal digit. The resulting decimal value can then be rewritten in another base. The BCD code is not the same as an ordinary binary numeral, so preserve its four-bit digit boundaries. For base-2 place values, see the binary number system.





