Article 5H91T Repeating decimals in any base

Repeating decimals in any base

by
John
from John D. Cook on (#5H91T)

My previous post ended with a discussion of repeating binary decimals such as

0.00110011...two = 1/5.

For this post I'll explain how calculations like that are done, how to convert a repeating decimal in any base to a fraction.

First of all, we only need to consider repeating decimals of the form

0.1b, 0.01b, 0.001b, etc.

because every repeating decimal is an integer times an expression like one above. For example,

0.424242... = 42 * 0.010101...

You can think of that example as base 10, but it's equally true in any base that has a 4, i.e. any base greater than 4.

Now suppose we have an expression

zero_one.svg

in base b.

We can see that this expressions is

zero_one_sum.svg

by summing a geometric series.

So going back to our example above,

oh_one_oh_one.svg

If we're working in base 10, this equals 1/99. If we're working in hexadecimal, this is 1/FFhex = 1/255.

I'll finish with a duodecimal example. Suppose we have

0.7AB7AB7AB...twelve

and want to convert it to a fraction. We have

duo_example.svg

Or 1139/1727 in base 10.

The post Repeating decimals in any base first appeared on John D. Cook.wH2UtzZPHqw
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments