Why is $(1.01011100 ∗ ∗)_2 \times 2^{E} - (1.01011000 ∗ ∗)_2 \times 2^{E} = (1.00 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗)_2 \times 2^{E-6}$

34 Views Asked by At

I'm taking a numerical analysis course. This is one of the examples in my professor's notes:
"Suppose we have 10 bits of precision and \begin{gather} x = (1.01011100 ∗ ∗)_2 × 2^{E}, \end{gather} \begin{gather} y = (1.01011000 ∗ ∗)_2 × 2^{E} \end{gather} where the $*$ stands for inaccurate bits (i.e. garbage) that say were generated in previous floating point computations. Then, in this 10 bit precision arithmetic \begin{gather} z = x − y = (1.00 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗)_2 × 2^{E−6} \end{gather} We end up with only 2 bits of accuracy in z. Any further computations using z will result in an accuracy of 2 bits or lower!"

I'm confused about why the exponent ends up being $E-6$ as well as how you determine how many garbage bits end up in the final answer? For example, why couldn't the answer have been $(1.0000 ∗ ∗ ∗ ∗ ∗ ∗)_2 × 2^{E−6}$?

1

There are 1 best solutions below

0
On BEST ANSWER

When you do the subtraction you have $$\ \ \ \ 1.01011100**\\ -\underline{1.01011000**}\\ \ \ \ \ 0.00000100**$$ You now normalize the number by multiplying the mantissa by $2^6$ to make the leading $1$ be in the ones place. That means you need to reduce the exponent by $6$ to keep the value the same. When you do that you bring in six more bits of $*$.