[Math] How to convert from scientific binary form to decimal

binarydecimal-expansion

I have the following number written in binary scientific notation:
$$1.1111111111111111111111111111111111111111111111111111\cdot2^{1023}$$
There are 53 ones in the binary number. I know that this number when converted into decimal system is represented as
$$1.7976931348623157\cdot10^{308}$$
I can't see to figure out how to do the conversion without going through the algorithm of converting binary to decimal using multiplication by two and adding current digit, as in:
$$111_2 = 7_{10}$$
$$2\cdot(2\cdot((2\cdot0)+1)+1)+1=7$$

Best Answer

The exponents go negative to the right of the decimal. The first one to the right of the decimal is in the $2^{-1}$ place, the next one is in the $2^{-2}$ place, and so on.

So, for example, $1.111_2 = 2^0 + 2^{-1} + 2^{-2} + 2^{-3} = 1.875 = 2 - 0.125 = 2-2^{-3}.$

Now just apply the same argument to your number to give

$$(1.\underbrace{111.....1}_{52\text{ times}})_2 = 2 - 2^{-52}.$$

Then it's just manipulating the exponents in the $2$s:

$$(2^1 - 2^{-52})\cdot2^{1023} = 2^{1024} - 2^{971} \approx 2^{1024} \doteq 1.79769313 \cdot 10^{308}.$$