Answer:
-11001
Explanation:
The following steps are performed in order to perform subtraction of the given binary numbers:
Step 1:
Find 2’s complement of the subtrahend. The subtrahend here is 100000
100000
First take 1's complement of 100000
1's complement is taken by inverting 100000
1's complement of 100000 = 011111
Now takes 2's complement by adding 1 to the result of 1's complement:
011111 + 1 = 100000
2's complement of 100000 = 100000
Step 2:
Add the 2's complement of the subtrahend to the minuend.
The number of bits in the minuend is less than that of subtrahend. Make the number of bits in the minuend equal to that of subtrahend by placing 0s in before minuend. So the minuend 111 becomes:
000111
Now add the 2's complement of 100000 to 000111
0 0 0 1 1 1
<u>+ 1 0 0 0 0 0 </u>
1 0 0 1 1 1
The result of the addition is :
1 0 0 1 1 1
Step 3:
Since there is no carry over the next step is to take 2's complement of the sum and place negative sign with the result as the result is negative.
sum = 1 0 0 1 1 1
2's complement of sum:
First take 1's complement of 1 0 0 1 1 1
1's complement is taken by inverting 1 0 0 1 1 1
1's complement of 1 0 0 1 1 1 = 0 1 1 0 0 0
Now takes 2's complement by adding 1 to the result of 1's complement:
0 1 1 0 0 0 + 1 = 0 1 1 0 0 1
Now place the minus sign with the result of 2's complement:
- 0 1 1 0 0 1
Hence the subtraction of two binary numbers (100000)₂ and (111)₂ is
(-011001)₂
This can also be written as:
(-11001)₂