Method : 1's complement subtraction steps :
1. At first, find 1'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 1's complement of the sum is the final result and it is negative.
1. Find Subtraction of 402 and 314 using 7's complement method
Here A = 402, B = 314.
Find A - B = ? using 7's complement
First find 7's complement of B = 314
Note : 7's complement of a number is obtained by subtracting all bits from 777.
7's complement of 314 is
Now Add this 7's complement of B to A
Hints : (Move mouse over the steps for detail calculation highlight)
Step-1 `=2+3` `=2+3` `=5` `=8xx0+5` `=5_8` `:.` Sum`=5` | Step-2 `=0+6` `=0+6` `=6` `=8xx0+6` `=6_8` `:.` Sum`=6` |
Step-3 `=4+4` `=4+4` `=8` `=8xx1+0` `=10_8` `:.` Sum`=0` and carry`=1` | |
The left most bit of the result is called carry and add it to the rest part of the result 065.
So answer is 066
2. Find Subtraction of 342 and 614 using 7's complement method
Here A = 342, B = 614.
Find A - B = ? using 7's complement
First find 7's complement of B = 614
Note : 7's complement of a number is obtained by subtracting all bits from 777.
7's complement of 614 is
Now Add this 7's complement of B to A
Hints : (Move mouse over the steps for detail calculation highlight)
Step-1 `=2+3` `=2+3` `=5` `=8xx0+5` `=5_8` `:.` Sum`=5` | Step-2 `=4+6` `=4+6` `=10` `=8xx1+2` `=12_8` `:.` Sum`=2` and carry`=1` |
Step-3 `=1+3+1` `=1+3+1` `=5` `=8xx0+5` `=5_8` `:.` Sum`=5` | |
Here there is no carry, answer is - (7's complement of the sum obtained 525)
Note : 7's complement of a number is obtained by subtracting all bits from 777.
7's complement of 525 is
So answer is -252
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then