Examples of subtraction using 2s complement
Answers
Answered by
1
In binary, we can subtract using 2's complements.
Example: 4 - 3 = 1 (Decimal).
100 - 11 = 1 (Binary).
The 2's complement of 011 will be 101.
Now, 100 + 101 = 1001.
In 1001, the fourth place is an overflow. We have to ignore it.
Hence, the answer will be 1.
Example: 4 - 3 = 1 (Decimal).
100 - 11 = 1 (Binary).
The 2's complement of 011 will be 101.
Now, 100 + 101 = 1001.
In 1001, the fourth place is an overflow. We have to ignore it.
Hence, the answer will be 1.
Similar questions