In: Computer Science
The result of subtracting the following two signed binary
numbers on an eight bit machine is
10110011
- 01101001
let,A=10110011 and B=01101001
A - B,we can write this->A + ( 2's complement of B)
Now,find 2's complement of B:
First convert B into 1's complement i.e. all 0's change to 1's and all 1's change to 0's
Result of 1's complement of B = 10010110
Now add 1 to the result of 1's complement.
we get 2's complement after adding 1,i.e. 2's complement of B=10010111
Now we have to do binary addition with A,
10110011
10010111
1 01001010
In result we get carry that means number is positive we have to cancel the carry.
Final result after Subtracting A and B = 01001010
plss like if u like my answer and any doubt free to ask.