Converting from Base 10 to Binary

G

Guest

Guest
I can convert integers and fixed decimals, but I need to convert 5/7 to binary.

How do you convert an irrational number to binary?

Thanks!
 
5/7 is not irrational.

5/7 = 0.714285 714285 ...

0.714285 714285 714285 ... = 0b0.101101 101101 101101 ...

That is the repeating pattern.
 
Hello, everyone!

Do you want to see a truly primitive way to convert decimals?


We know that: \(\displaystyle \L\,\frac{5}{7}\:=\:0.714285...\)

Assume that it equals a binary "decimal": .\(\displaystyle 0.7142857\,\cdots\;=\;0.abcdefgh\,\cdots\)

Multiply both sides by 2.
. . On the left, multiply as usual.
. . On the right, the "decimal point" moves one place to the right.

We have: \(\displaystyle \:1.42857\,\cdots\;=\;a.bcdefgh\,\cdots\)
. . Hence: .\(\displaystyle \fbox{a\,=\,1}\)

Remove the integers from the equation: \(\displaystyle \:0.428571\,\cdots\;=\;0.bcdefgh\,\cdots\)

Multiply both sides by 2: \(\displaystyle \:0.857142\,\cdots \;=\;b.cdefgh\,\cdots\)
. . Hence: .\(\displaystyle \fbox{b\,=\,0}\)

Remove the integers from the equation: \(\displaystyle \:0.857142\,\cdots \;=\;0.cdefgh\,\cdots\)

Multiply both sides by 2: \(\displaystyle \:1.714285\,\cdots\;=\;c.defgh\,\cdots\)
. . Hence: .\(\displaystyle \fbox{c\,=\,1}\)

Remove the integers from the equation: \(\displaystyle \:0.714285\,\cdots\;=\;0.defgh\,\cdots\)

But this decimal is identical to the one we started with.
. . Hence, the pattern repeats itself.


Therefore: \(\displaystyle \L\:\frac{5}{7}\;=\;0.\overline{101}_{_2}\)

 
Top