

A resource for students age 1114 who show high promise and love mathematics


Mathematics Concepts 

Numeration systems


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 = c_{1}b^{1} + c_{2}b^{2} + c_{3}b^{3 + … + }c_{n}b^{n} + … ........ Equation (1)
where 0 ≤ c_{i} < b.
This is what is meant when we write N as 0.c_{1}c_{2}c_{3}c_{4}…
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.011_{2} = 0 × 2^{1} + 1 × 2^{2} + 1 × 2^{3} = 0 + 1/4 + 1/8 = 0 + 0.25 + 0.125 = 0.375_{10}.
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.011_{2} = (11/1000)_{2} = 11_{2}/1000_{2} = (3/8)_{10} = 0.375_{10}.
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.375_{10} to base 2 or any other base?
To convert, we need to pick up the coefficients c_{1}, c_{2}, c_{3},…
Consider Equation (1). Multiply by b.
The integer part of the result is the coeffcient c_{1}.
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 c_{2}. If the remaining part is zero, stop; else continue.
Here is why it works.
Consider Equation (1).
bN = c_{1} + q_{1}, where q_{1} = c_{2}b^{1} +c_{3}b^{2} +c_{4}b^{3} + …
bq_{1} = c_{2} + q_{2}
… …
bq_{n1} = c_{n} + q_{n},
where we continue until q_{n} = 0.
Now suppose we are given a fraction M_{10} in base 10 and we wish to convert it to a fraction N in base b.
Then, since N = M_{10},
bM = bM_{10}.
This means, although N is what we are trying to find, since bN = bM_{10}, we can compute the first step of the algorithm, namely,
bM_{10} = bN = c_{1} + q_{1}. That is, we can pick up c_{1} as the integer part of bM_{10}, the fractional part of bM_{10} being q_{1}. We continue by multiplying the fractional part of bM_{10} with b, and so on.
Example:
Convert 0.375_{10} to base 2 and base 5.
2N = 2×0.375 = 0.75 = 0 + 0.75 →→ c_{1} = 0 and q_{1} = 0.75
2q_{1} = 1.5 = 1 + 0.5 →→ c_{2} = 1 and q_{2} = 0.5
2q_{2} = 1 = 1 + 0 →→ c_{3} = 1 and q_{3} = 0.
When a qvalue is 0, we STOP.
So, 0.375_{10} = (0.c_{1}c_{2}c_{3})_{2} = 0.011_{2}.
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.011_{2} = (11/1000)_{2}.
Let us convert (0.375)_{10} to base 5.
N = 0.375
5N = 5×0.375 = 1.875 = 1 + 0.875 →→ c_{1} = 1 and q_{1} = 0.875
5q_{1} = 4.375 = 4 + 0.375 →→ c_{2} = 4 and q_{2} = 0.375
Since q_{2} = N, the computation repeats without ever stoppping, and we get
0.375_{10} = (0.c_{1}c_{2}c_{1}c_{2})_{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.375_{10} as follows:
Repeated Subtraction
Let us proceed via an example by converting 0.375_{10} 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.011_{2}.
Example: Convert 0.375_{10} 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.375_{10} = (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.011_{2} to the corresponding fraction in base 5. From the discussion above, we know how to do this by first converting 0.011_{2} to decimal and then converting the decimal to base 5. But this goes via the decimal. A direct conversion is to multiply 0.011_{2} with 5 expressed in base 2. We get 0.011_{2} ×101_{2} = 1.111_{2}. The integer part is 1. This is the coefficient c_{1} for our fraction in base 5.
CONTINUE WITH THE NONINTEGER PART AND MULTIPLY IT BY 5 EXPRESSED IN BASE 2: 0.111_{2}×101_{2} = 100.011_{2}. The integer part is 4 in base 5. This is the coefficient c_{2} for our fraction in base 5. Continue. But the remaining noninteger part is 0.011_{2} which is what we started with; so the coefficients repeat; and we get 0.011_{2} = (0.1414…)_{5}.
(G.R.T.)
>>
Number of Digits in base b Representation
Ü BACK
MathPath  "BRIGHT AND EARLY"
Send suggestions to webmaster@mathpath.org
Copyright © 2001 MathPath
Last updated  January 20, 2005


 