How to convert this number:
$$(-1)\times1.625\times2^{35}$$
To this notation:
$$−5.5834\times10^{10}$$
What are the rules for the conversion?
This is taken from a Youtube video about single-precision floating point IEEE 754 representation standard.
How to convert this number:
$$(-1)\times1.625\times2^{35}$$
To this notation:
$$−5.5834\times10^{10}$$
What are the rules for the conversion?
This is taken from a Youtube video about single-precision floating point IEEE 754 representation standard.
In general, any number $x$ is equal to $10^{\log_{10} x}$. In particular, for your number:
$$1.625×2^{35} = 10^{\log_{10} \left( 1.625\cdot2^{35}\right)}.$$
You can use this to put your number in the form your want. Start by taking the base-10 logarithm of $1.625\cdot 2^{35}$:
$$\begin{align} \log_{10}\left( 1.625×2^{35} \right)& = \log_{10} 1.625 + 35\cdot \log_{10} 2 \\ &= 0.2108534 + 35\cdot 3.3219809 \\ &= 10.7468 \end{align} $$
And then the answer is:
$$\begin{align} 10^{10.7469032} & =10^{0.7469032} \cdot 10^{10} \\ & = 5.5834575\cdot 10^{10} \end{align} $$
The best way to calculate the logarithm and the inverse logarithm ($10^x$) is with a digital computer of some type, maybe a pocket calculator. For example, how do you find out that $\log_{10} 1.625 \approx 0.2108$? You put 1.625 into your calculator and push the log button; you calculate $10^{0.7469032}$ similarly.
Let's convert $2^{35}$ first : $$2^{35}=10^{35\cdot \log_{10}(2)}\approx10^{35\cdot 0.30103}\approx 10^{10.53605}$$ $$\approx 10^{0.53605}\cdot 10^{10}\approx 3.436\cdot 10^{10}$$ We used a table of 'common logarithms' providing the decimals of $\log_{10}(x/100)$ with the results :
The result is nearly : $$-1.625\cdot 3.436\cdot 10^{10}\approx -5.5835\cdot 10^{10}$$
Of course most scientific calculators will give you directly the exact result : $$-1.625×2^{35}=-55834574848$$ You may verify this with a (reduced) table of powers of $2$ noticing that $-1.625=-\frac {13}8$ getting : $$-\frac {13}{2^3}2^{35}=-13\cdot 2^{32}=-13\cdot 4\cdot\bigl(2^{10}\bigr)^3=-52\cdot1024^3$$