Conversion of fractional decimals to binary using a calculator. Why does this work?

59 Views Asked by At

When I was doing a math exercise that required me to convert fractional decimals into binary, I noticed that 0.75 and 0.875 had similar binary forms, 0.11 and 0.111 respectively. So one thing lead to another and I found that if I multiplied 0.75 with 16 to get 12, then converting 12 with my calculator got me 1100, and in terms of decimals reading from left to right would cancel out the two zeroes leaving me with 11 which is 0.75's binary counterpart if I plugged it with 0. and I tried the same method with 0.875, multiplying it with 16 to get 14 and converting 14 to binary getting 1110 and with the same logic, got me 0.111.

I messed around with the method a bit and noticed a flaw that only so many decimals that multiply with 16 to make whole numbers that can converted in a calculator. Then I noticed that 16 = 2^4 so I decided to try 2^5 and so on with 0.75 and 0.875 and other fractional numbers, this time 0.75 multiplied with 32 which got me 24 and the conversion into binary got me 11000, and 11100 with 0.875 and I continued to try it with higher powers of base 2 each increases the numbers of 0 behind which wouldn't effect the decimals while giving more room for more numbers to be calculated in this method. So I concluded that method using 2^x, x being the the placement of number I should start reading the conversion, multiplied with the fractional decimal I'm trying to convert works but now I'm left wondering why it works, can anyone explain this? Please and thank you, your efforts will be very much appreciated.

1

There are 1 best solutions below

0
On

I'm left wondering why it works, can anyone explain this?

If you are wondering, your math teacher forgot to explain this. Now your pocket calculator paired with your zest for know-why does the same, or even better.
Let's start it simple: In a shop you see a price tag 32,98 for example. What does that mean? The amount to pay sums up $30+2+0,9+0,08$. So the value of each figure depends on the position in relation to the decimal separator. Thus the number on the price tag is a simplification, what means in fact
$3\cdot10^1+2\cdot10^0+9\cdot10^{-1}+8\cdot10^{-2}$, a polynom.

This for the decimal example, now to your binary observations.
Here the base is 2 instead of 10, so numbers are represented in a positional value system as $\sum_i{a_i\cdot b^i}$ with $b=2$. At first glance it looks easy now, only 0 and 1 as numbers, $1+1=10$, shifting the decimal point (or the figures relative to it) stands for -- depending on the direction -- either multiply by 2 or dividing by 2.
IMO that should explain your observations, in case you are still wondering I failed like your math teacher, so as final hint (to explain more details), convertion between different bases is done simplest with the Horner's method.