Binary Coded Decimal SUBTRACTION
Binary Coded Decimal SUBTRACTION
(subtraction)
GROUP-2
Arshmah Ajmal | Esha Maham | Tahreem Fatima
Kinza Rizwan | Khadija
CONTENTS
5. Conversion:
Convert the final BCD result back to
decimal for presentation or further use.
RULES OF BCD SUBTRACTION
1. Borrowing in BCD:
Borrowing is necessary in BCD subtraction when the subtracted digit is greater than the
subtracting digit. Borrowing in BCD is similar to decimal subtraction but is done in groups of 4
bits.
2. Handling Borrow:
When borrowing is required, subtract 1 from the higher-order BCD digit from which the borrow
is made. If the higher-order digit is 0, continue borrowing until a non-zero digit is found.
After borrowing, adjust the digit from which the borrow was made by adding 10 in BCD. This
compensates for the borrow.
RULES OF BCD SUBTRACTION
5. Significance of 4-Bit Groups:
In BCD, each group of 4 bits corresponds to a decimal digit. When borrowing or adjusting, it is
done on a 4-bit basis.
BCD subtraction can yield negative results. If the result is negative, it may be necessary to
handle this condition based on the requirements of the application.
Before performing BCD subtraction, ensure that the numbers are represented in BCD form.
Convert decimal numbers to BCD if needed.
1000 1010=
-128 + 0 + 0 + 0 + 8 + 0 + 2= - 118
Example Using a 4-bit string.
Convert 1101 (13)10 to it’s negative.
Note : 9's complement of a number is obtained by subtracting all bits from 999
9's complement of 599 is
9 9 9
- 5 9 9
4 0 0
Example 1: 984-599
2. Add `984` and `400` using BCD addition