1. Examples
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 110 and 101 using 1's complement method
Here A = 110, B = 101. Find A - B = ? using 1's complement First find 1's complement of B = 101
Note : 1's complement of a number is obtained by subtracting all bits from 111. 1's complement of 101 is
Now Add this 1's complement of B to A
Hints : (Move mouse over the steps for detail calculation highlight)Step-1 `=0+0` `=0+0` `=0` `=2xx0+0` `=0_2` `:.` Sum`=0` | Step-2 `=1+1` `=1+1` `=2` `=2xx1+0` `=10_2` `:.` Sum`=0` and carry`=1` | Step-3 `=1+1+0` `=1+1+0` `=2` `=2xx1+0` `=10_2` `:.` 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 000.
So answer is 001
2. Find Subtraction of 10110 and 11101 using 1's complement method
Here A = 10110, B = 11101. Find A - B = ? using 1's complement First find 1's complement of B = 11101
Note : 1's complement of a number is obtained by subtracting all bits from 11111. 1's complement of 11101 is
Now Add this 1's complement of B to A
Hints : (Move mouse over the steps for detail calculation highlight)Step-1 `=0+0` `=0+0` `=0` `=2xx0+0` `=0_2` `:.` Sum`=0` | Step-2 `=1+1` `=1+1` `=2` `=2xx1+0` `=10_2` `:.` Sum`=0` and carry`=1` | Step-3 `=1+1+0` `=1+1+0` `=2` `=2xx1+0` `=10_2` `:.` Sum`=0` and carry`=1` | Step-4 `=1+0+0` `=1+0+0` `=1` `=2xx0+1` `=1_2` `:.` Sum`=1` | Step-5 `=1+0` `=1+0` `=1` `=2xx0+1` `=1_2` `:.` Sum`=1` | |
Here there is no carry, answer is - (1's complement of the sum obtained 11000)
Note : 1's complement of a number is obtained by subtracting all bits from 11111. 1's complement of 11000 is
So answer is -00111
This material is intended as a summary. Use your textbook for detail explanation. Any bug, improvement, feedback then
|