1

I know that if we multiply the fraction by 2 repetitively and take out the integer part every time, we will get the binary form. But why does this method work? Why should we multiply by 2 for the fractional part(since the general procedure to convert decimal to binary is to divide by two)?

kakkarot
  • 113
  • What do you mean by "the general procedure to convert decimal to binary is to divide by two"? – joriki Aug 06 '15 at 07:06
  • @joriki I meant the Long division method. – kakkarot Aug 06 '15 at 07:09
  • 1
    We are trying to express the fraction in terms of $\frac{1}{2}$, $\frac{1}{2^2}$, $\frac{1}{2^3}$ and so on. That is why, in order to obtain the '0' or '1' multiplier, we successively multiply by 2 – Shailesh Aug 06 '15 at 08:12
  • Can you please explain your answer? – kakkarot Aug 06 '15 at 09:35
  • OK, here is a similar question and an answer. If this is not OK, I will try to explain in a more intuitive way. – Shailesh Aug 06 '15 at 09:41
  • Sorry, forgot to add the link http://math.stackexchange.com/questions/1262109/why-do-we-divide-or-multiply-by-2-when-converting-binary – Shailesh Aug 06 '15 at 09:52

1 Answers1

2

Let the decimal be $0.d_1d_2d_3...$. When we are trying to express it in binary, we want to express it as $\frac{a_1}{2} + \frac{a_2}{2^2} + \frac{a_3}{2^3} + ...$ Now, if the original fraction is more than $\frac{1}{2}$, we want $a_1 = 1$, otherwise $a_1 = 0$. The best way to check that is to as to multiply LHS by $2$. If you get an integer part 1, put $a_1 = 1$, otherwise $a_1 = 0$. We have taken care of the first digit. The same process is continued. You can either drop the integers on the LHS multiplications, or keep them and put a '1' when they switch to odd. Hope this helps as an intuitive answer.

Shailesh
  • 3,908