BCD Addition and Subtraction in Excess-3 Code
Below, we will see how the excess-3 code can be used to perform addition and subtraction operations on BCD numbers.
Addition
The excess-3 code can be very effectively used to perform the addition of BCD numbers. The steps to be followed for excess-3 addition of BCD numbers are as follows:
1. The given BCD numbers are written in excess-3 form by adding ‘0011’ to each of the four-bit groups.
2. The two numbers are then added using the basic laws of binary addition.
3. Add ‘0011’ to all those four-bit groups that produce a carry, and subtract ‘0011’ from all those four-bit groups that do not produce a carry during addition.
4. The result thus obtained is in excess-3 form.
Subtraction
Subtraction of BCD numbers using the excess-3 code is similar to the addition process discussed above. The steps to be followed for excess-3 substraction of BCD numbers are as follows:
1. Express both minuend and subtrahend in excess-3 code.
2. Perform subtraction following the basic laws of binary subtraction.
3. Subtract ‘0011’ from each invalid BCD four-bit group in the answer.
4. Subtract ‘0011’ from each BCD four-bit group in the answer if the subtraction operation of the relevant four-bit groups required a borrow from the next higher adjacent four-bit group.
5. Add ‘0011’ to the remaining four-bit groups, if any, in the result.
6. This gives the result in excess-3 code.