1. For 984 and 599, Find BCD Subtraction using 10's complement
Solution:
`984-599` BCD subtraction using `10's` complement
Steps for BCD subtraction using `10's` complement
For `A-B`
1. Take `10's` complement for B
2. Add it to A using BCD addition
3. If addition is invalid BCD then add 6
4. If carry then add it to the next bits
5. In final result, if carry is occured then it is ignored and if
there is no any carry over, then take `10's` complement of the result and it is negative.
1. Take `10's` complement for `599`
Note : 10's complement of a number is 1 added to it's 9's complement number.
Step-1: 9's complement of 599 is obtained by subtracting each digit from 9
Step-2: Now add 1 to the 9's complement to obtain the 10's complement :
400 + 1 = 401
2. Add `984` and `401` using BCD addition
BCD code for 984 : | 1001 | 1000 | 0100 |
BCD code for 401 : | 0100 | 0000 | 0001 |
|
Addition : | 1101 | 1000 | 0101 |
If Invalid BCD then add 6 : | 0110 | | |
|
Addition : | 10011 | 1000 | 0101 |
BCD value : | 13 | 8 | 5 |
The left most bit of the result is 1, called carry and it is ignored.
So final answer of BCD Subtraction is `385`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then