Do the following subtraction by 2s complement -
(a) 6-10
Please show the steps also
Answers
Answered by
0
Explanation:
(6)10 = (110)2
(10)10 = ( 1010)2
(i.e,) 110 - 1010
Minuend = 110
Subtrahend = 1010
Adjust word size of both,
.. minuend = 0110
subtrahend= 1010
find the 1' s complement of subtrahend ( 1010),
(i,e) 0101
now add the minuend with the 1's complement of subtrahend....
0110
0101 +
1011
there is no carry , so we can just leave in the way as it is....
To check whether the answer is,
simple subtract the numbers...
0110
1010 -
1 0100
here we get carry one, but as we were using 2 ' s complement method I don't want to consider the carry.... so ignore it....
we got the answer as 0100 thay represent 4 ,
but actually 6-10= -4
thus, complement of the answer,
1011... which we already got earlier..
Hope it helps you ❤️
Attachments:
Similar questions