How do I solve 1100.010 - 1000.111 (in binary)?

313 Views Asked by At

1100.010 is 12,25 in decimal and 1000.111 is 8.875.

Subtracting one from the other directly I get:

 1100.010
-1000.111
----------
 0101.111

Which is wrong. It works when I use two's complement on the second number though.

What did I do wrong? The answer should be 0011.011

1

There are 1 best solutions below

1
On BEST ANSWER

You should get $100.000-0.100-0.001=011.100-0.001=011.011$. The method for doing this is much like it is for base 10 - if the number on the top is less than the number on the bottom, pick up 1 (in base 10 you pick up 9) from the number to the right.

Instead you did $100.000+0.100+0.001=100.101$.

Edit: actually you didn't quite do that, you also had an extra $0.010$ - I am not sure where that came from.