A resource for students age 11-14
who show high promise and love mathematics

Mathematics Concepts

### Fractions in base b

It is sufficient to consider fractions having values less than 1. Just as an integer in base b is represented in terms of powers of b, a fraction N in base b is represented in terms of the negative powers of b:
N = c1b-1 + c2b-2 + c3b-3 + … + cnb-n + … ........ Equation (1)
where 0 ≤ ci < b. This is what is meant when we write N as 0.c1c2c3c4
The period in the fraction is called a radix point - it is the decimal point for decimal fractions.

Converting a fraction given in any base to a corresponding fraction in base 10 is easy.
For instance, 0.0112 = 0 × 2-1 + 1 × 2-2 + 1 × 2-3 = 0 + 1/4 + 1/8 = 0 + 0.25 + 0.125 = 0.37510.
This is often called the Expansion Method.
There is another way also to do this. That is to write the binary fraction as a ratio. For instance 0.0112 = (11/1000)2 = 112/10002 = (3/8)10 = 0.37510.

Converting a decimal fraction to a binary fraction or a fraction in another base, requires more steps. There are three methods - Repeated Multiplication, Repeated Subtraction, and the Ratio Method. The first two methods are, respectively, analogous to the Repeated Division and Repeated Subtraction algorithms for converting integers between different bases.

Repeated Multiplication
How do we convert 0.37510 to base 2 or any other base?
To convert, we need to pick up the coefficients c1, c2, c3,…
Consider Equation (1). Multiply by b.
The integer part of the result is the coeffcient c1.
If the remaining part is zero, we are finished.
If the remaining part is not zero, multiply that by b.
The integer part of the result is c2. If the remaining part is zero, stop; else continue.

Here is why it works.
Consider Equation (1).
bN = c1 + q1, where q1 = c2b-1 +c3b-2 +c4b-3 + …
bq1 = c2 + q2
…   …
bqn-1 = cn + qn,
where we continue until qn = 0.

Now suppose we are given a fraction M10 in base 10 and we wish to convert it to a fraction N in base b.
Then, since N = M10,
bM = bM10.
This means, although N is what we are trying to find, since bN = bM10, we can compute the first step of the algorithm, namely, bM10 = bN = c1 + q1. That is, we can pick up c1 as the integer part of bM10, the fractional part of bM10 being q1. We continue by multiplying the fractional part of bM10 with b, and so on.

Example:
Convert 0.37510 to base 2 and base 5.
2N = 2×0.375 = 0.75 = 0 + 0.75 →→ c1 = 0 and q1 = 0.75
2q1 = 1.5 = 1 + 0.5 →→ c2 = 1 and q2 = 0.5
2q2 = 1 = 1 + 0 →→ c3 = 1 and q3 = 0.
When a q-value is 0, we STOP.
So, 0.37510 = (0.c1c2c3)2 = 0.0112.

We proceed in the same manner if the decimal fraction is expressed as a ratio.
Thus for 0.375 = 3/8
(3/8)×2 = 6/8 = 0 + 6/8, so the integer part is 0. Peel it off, the fraction remaining is 6/8.
(6/8)×2 = 12/8 = 1 + 4/8, so the integer part is 1. The fraction remaining is 4/8.
(4/8)×2 = 9/8 = 1 + 0. Take these integer parts and write them from the radix point in the order we obtained them.
So, again, (3/8)10= 0.0112 = (11/1000)2.

Let us convert (0.375)10 to base 5.
N = 0.375
5N = 5×0.375 = 1.875 = 1 + 0.875 →→ c1 = 1 and q1 = 0.875
5q1 = 4.375 = 4 + 0.375 →→ c2 = 4 and q2 = 0.375
Since q2 = N, the computation repeats without ever stoppping, and we get
0.37510 = (0.c1c2c1c2)5 = (0.1414…)5.

Notice that multiplication by the base b shifts the radix point (of the fraction in base b) to the right, exposing the integer part on the left of the radix point.

Having understood the principle behind the algorithm, we can now simply compute the binary version of the fraction 0.37510 as follows:

Repeated Subtraction
Let us proceed via an example by converting 0.37510 to binary. Consider the negative powers of 2.
2-1 = 0.5
2-2 = 1/4 = 0.25
2-3 = 1/8 = 0.125
… …

Determine the largest of these fractions that does not exceed 0.375.
Since 0.25 < 0.375 < 0.5, the fraction we need is 0.25.
Then 0.375 = 0.25 + 0.125
0.125 = 0.125 +0
So 0.375 = 1×2-2 + 1×2-3 = 0×2-1 + 1×2-2 + 1×2-3 = 0.0112.

Example: Convert 0.37510 to base 5.
Consider the negative powers of 5.
5-1 = 1/5 = 0.2
5-2 = 1/25 = 0.04
5-3 = 1/125 = 0.008
5-4 = 1/625 = 0.0016
Determine the largest of these fractions that does not exceed 0.375.
Since 0.375 > 0.2, the fraction we need is 0.2.
Then 0.375 = 0.2 + 0.175
0.175 = 0.04 + 0.135
But 0.135 > 0.04. So we subtract 0.04 again.
0.135 = 0.04 + 0.095. Subtract 0.04 again.
0.095 = 0.04 + 0.055
0.055 = 0.04 + 0.015
Now 0.04 > 0.015 > 0.008
0.015 = 0.008 + 0.007
0.007 = 4 ×0.0015 + 0.0006
… …
Thus 0.375 = 1 × 5-1 + 4× 5-2 +1 × 5-3 + 4× 5-4 + …

Clearly, the Repeated Subtraction method for fractions is easy to understand but messy to carry out. Therefore, we shall omit giving the (simple) theory of this method.

The Ratio Method
This is another way to convert a decimal fraction to binary. Here we first express the fraction as a ratio. Thus 0.37510 = (375/1000)10 = (111111111/11111011000)2 and then do the division in binary.

Comparison of the three methods
It is clear that Repeated Multiplication is the easiest at least for computing by hand. The ratio method would be easy except for the division that has to be carried out in the new base. The Repeated subtraction method distinguished base 2 in that only one subtraction was needed in each step of obtaining a digit of the binary fraction.

Converting a fraction between bases
Now that we know how to convert a fraction from DECIMAL to any other base, how about converting a fraction from any integer base to any other integer base? The case we presented is a special case, namely, from decimal fraction to fraction in any base.

Let us consider converting 0.0112 to the corresponding fraction in base 5. From the discussion above, we know how to do this by first converting 0.0112 to decimal and then converting the decimal to base 5. But this goes via the decimal. A direct conversion is to multiply 0.0112 with 5 expressed in base 2. We get 0.0112 ×1012 = 1.1112. The integer part is 1. This is the coefficient c1 for our fraction in base 5.
CONTINUE WITH THE NON-INTEGER PART AND MULTIPLY IT BY 5 EXPRESSED IN BASE 2: 0.1112×1012 = 100.0112. The integer part is 4 in base 5. This is the coefficient c2 for our fraction in base 5. Continue. But the remaining non-integer part is 0.0112 which is what we started with; so the coefficients repeat; and we get 0.0112 = (0.1414…)5.

(G.R.T.)

>>  Number of Digits in base b Representation

Ü BACK

MathPath - "BRIGHT AND EARLY"

Send suggestions to webmaster@mathpath.org