1
$\begingroup$

I am trying to subtract these two binary numbers:

$ 1110 - 1011$

First I convert 1011 to two's complement by doing 1011 to 0100 and then adding 1 to get 0101. Then I add the first number to the converted two's complement number:

$1110$

$+$ $0101$

$-----$

$0011$

0 + 1 = 1

1 + 0 = 1

1 + 1 = 0 carry 1

carry 1 + 1 + 0 = 0

For a final answer of $0011$ which is 3 in decimal, however, the answer in my book says it should be 2 or 0010...?

$\endgroup$
1
1
$\begingroup$

Your book is wrong and what you are doing is correct.

1110 is 14 in decimal and 1011 is 11 in decimal. Hence the answer should be 3 i.e. 0011

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.