Method : 15's complement subtraction steps :
1. At first, find 15's complement of the B(subtrahend).
2. Then add it to the A(minuend).
3. If the final carry over of the sum is 1, then it is dropped and 1 is added to the result.
4. If there is no carry over, then 15's complement of the sum is the final result and it is negative.
1. Find Subtraction of 1B06 and 77C using 15's complement method
Here A = 1B06, B = 077C.
Find A - B = ? using 15's complement
First find 15's complement of B = 077C
Note : 15's complement of a number is obtained by subtracting all bits from FFFF.
15's complement of 077C is
Now Add this 15's complement of B to A
Hints : (Move mouse over the steps for detail calculation highlight)
Step-1 `=6+3` `=6+3` `=9` `=16xx0+9` `=9_16` `:.` Sum`=9` | Step-2 `=0+8` `=0+8` `=8` `=16xx0+8` `=8_16` `:.` Sum`=8` |
Step-3 `=B+8` `=11+8` `=19` `=16xx1+3` `=13_16` `:.` Sum`=3` and carry`=1` | Step-4 `=1+1+F` `=1+1+15` `=17` `=16xx1+1` `=11_16` `:.` Sum`=1` and carry`=1` |
The left most bit of the result is called carry and add it to the rest part of the result 1389.
So answer is 138A
2. Find Subtraction of B06 and C7C using 15's complement method
Here A = B06, B = C7C.
Find A - B = ? using 15's complement
First find 15's complement of B = C7C
Note : 15's complement of a number is obtained by subtracting all bits from FFF.
15's complement of C7C is
Now Add this 15's complement of B to A
Hints : (Move mouse over the steps for detail calculation highlight)
Step-1 `=6+3` `=6+3` `=9` `=16xx0+9` `=9_16` `:.` Sum`=9` | Step-2 `=0+8` `=0+8` `=8` `=16xx0+8` `=8_16` `:.` Sum`=8` |
Step-3 `=B+3` `=11+3` `=14` `=16xx0+14` `=E_16` `:.` Sum`=E` | |
Here there is no carry, answer is - (15's complement of the sum obtained E89)
Note : 15's complement of a number is obtained by subtracting all bits from FFF.
15's complement of E89 is
So answer is -176
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then