1

I would like to know why 5.8, in decimal 101.11001100..., in binary, a recurring decimal?

richardaum
  • 279
  • 1
  • 3
  • 12
  • http://sandbox.mc.edu/~bennet/cs110/flt/dtof.html – lab bhattacharjee Dec 15 '13 at 14:45
  • Do long division for $58/10$ in base $2$. I.e. for $111010_2/1010_2$ (or $11101_2/101_2$). – Carsten S Dec 15 '13 at 14:46
  • @Richard: See Infinite Binary Fractions at http://cs.furman.edu/digitaldomain/more/ch6/dec_frac_to_bin.htm – Amzoti Dec 15 '13 at 14:48
  • Apart from the links supplied,

    let $\displaystyle S=(0.11001100\cdots)_2$

    $$\displaystyle\implies 16S=(1100.11001100\cdots)_2$$

    $$\displaystyle\implies 16S-S=(1100)_2\implies 15S=12 $$

    – lab bhattacharjee Dec 15 '13 at 14:50
  • Since you have been given the answer, it may also be instructive to cheat a little: Multiply $0.110011001100\ldots$ (binary) by $5$ (binary $101$) and verify that you get $4$ (binary $100$). The exact form of the answer may surprise you, but it shouldn't. – Harald Hanche-Olsen Dec 15 '13 at 14:53

2 Answers2

3

interesting question. so cut out inessentials first, as with food preparation. the integer part $5$ is irrelevant. you have $0.8 = \frac45$ cut out the $4$ as irrelevant because powers of two map into left or right shifts in base $2$ notation.

so the essence of your question concerns $\frac15$

first you must find $inf\{n \in \mathbb{N}\ : 5 \mid 2^n -1\})$. by inspection this is $4$. so your binary fraction must have period $4$. it is easy to see the relevant expansion is: $$ \frac15= 3\sum_{k=1}^{\infty} \frac1{2^{4k}} $$

i.e. $$ 0.0011001100110011... $$ hence by shifing two places leftwards, you have $$ \frac45=0.11001100110011... $$ and if you are really that bothered: $$5.8 = 101.110011001100... $$

you can see that the obvious possibility of expressing the reciprocal of any odd integer in binary implies that $$ \forall m \in \mathbb{N}, inf\{n \in \mathbb{N}\ : 2m+1 \mid 2^n -1\}) $$ always exists.

can you prove this algebraically? there is some interesting stuff going on here which concerns the fact that $2$ is never a zero divisor in the finite ring: $$ \frac{\mathbb{Z}}{(2m+1)\mathbb{Z}} = \mathbb{Z}_{2m+1} $$

David Holden
  • 18,040
-1

As to the left of the decimal point, each position represents ones, tens, hundreds, etc., each position to the right represents tenths, hundredths, and so on. 5.8 is another way of saying five and eight tenths, or simplified, five and four fifths.

In binary, similarly, positions to the right of the decimal point (binary point?) represent halfs, quarters, eighths and so on. So how do you convert four fifths to binary? Pretty much the same way you convert integers into binary, except by using multiplication instead of division:

Take the number, multiply it by two. If the result is greater than or equal to one, the next digit in the binary number is one, otherwise it's zero.

If that numbers exactly one, you're done, otherwise take the remainder and repeat.

No matter how many times you iterate this process on 4/5, you'll never get rid of that remainder:

4/5 * 2 = 8/5 -> 1 + 3/5
3/5 * 2 = 6/5 -> 1 + 1/5
1/5 * 2 = 2/5 -> 0 + 2/5
2/5 * 2 = 4/5 -> 0 + 4/5  -> at this point everything repeats.

Thus you get the recurring decimal.

elbie
  • 1