Binary subtraction : $0.1000 - 0.1001$

56 Views Asked by At

I have the following subtractrion to do: $0.1000 - 0.1001$, the result is $-0.0001$, but I don't know how to obtain it.

This is my attempt:

$$\begin{array}{lcl} 0. & \not{1}^0 & \not0^1 & \not0^1 & ^10 & - \\ 0. & 1 & 0 & 0 & 1 & = \\ \hline ?. & ? & 1 & 1 & 1 \end{array} $$

in the $?$ I don't know what to insert.

In which way the first bit after the dot can receive a $1$ from left, if there is only $0.$ before it?

And however my way seems far away from the real result.

Please can you help me? Thanks!

2

There are 2 best solutions below

0
On BEST ANSWER

The method you are using does not even work for decimal numbers, so I don't understand why you are trying that.

Always subtract the smaller value from the larger then make it negative if you had to swap the order.

On another note, if for some reason you need to do this method, you might be dealing with two's complement, in which case the two ? will be 1, but if you are asking a question like this I doubt that is relevant.

0
On

Hint. The first number is smaller than the second. So reverse the order of subtraction instead and remember to multiply the result by $-1.$