Converting a Bicimal to a Fraction (Direct Method)
Copyright © 2008-2013 Exploring Binary
There are several ways to convert a repeating bicimal to a fraction. I’ve shown you the subtraction method; now I’ll show you the direct method, my name for the method that creates a fraction directly, using a numerator and denominator of well-known form.
Converting a Repeating Decimal To a Fraction
A repeating decimal can be written as a fraction with a numerator derived from its digits and a denominator consisting of one or more 9s followed by zero or more 0s. This follows directly from the subtraction method. I’ll show you how to use the direct method to convert decimals, and then I’ll show you how it adapts trivially to convert bicimals.
Pure Repeating Decimals
A pure repeating decimal corresponds to a fraction with a numerator made up of the repeating digits and a denominator made up of as many 9s as there are repeating digits. Let’s take 0.142857 for example. The numerator of the fraction is 142857, and the denominator is six 9s; this makes the fraction 142857/999999, which reduces to 1/7. The subtraction method shows why it works out this way:
106d – d = 142857.142857 – 0.142857
(106 – 1)d = 142857
d = 142857/(106 – 1)
d = 142857/999999
The denominator, 106 – 1, is six 9s. To generalize, if r is the length of the repeating part, then the denominator is 10r – 1; that is, r 9s. The numerator will always be the repeating digits, expressed as an integer.
Mixed Repeating Decimals
A mixed repeating decimal also corresponds to a fraction with a simple pattern, although you need to do a little more work to construct it. The denominator is formed easily: it starts with as many 9s as there are repeating digits, and ends with as many 0s as there are non-repeating digits. The numerator is formed by subtraction: you subtract an integer made of the non-repeating digits from an integer made of the non-repeating digits and repeating digits.
Let’s take 0.42866 for example. The numerator of the fraction is 42866-42 = 42824, and the denominator is three nines followed by two 0s; this makes the fraction 42824/99900, which reduces to 10706/24975. Let’s use the subtraction method to show why it works:
105d – 102d = 42866.866 – 42.866
(105 – 102)d = 42824
102(103 – 1)d = 42824
(103 – 1)102d = 42824
d = 42824/((103 – 1)102)
d = 42824/99900
The denominator is (103 – 1)102. The factor 103 – 1 represents three leading 9s, and the factor 102 represents two trailing 0s. To generalize, if r is the length of the repeating part and p is the length of the non-repeating part, then the denominator is (10r – 1)10p; that is, r 9s followed by p 0s. The numerator will always be the non-repeating and repeating digits minus the non-repeating digits.
Decimals with Whole Parts
A decimal with a whole part, like 17.12 or 312.1378, is handled by treating the whole and fractional parts separately. First, convert the fractional part to a fraction, as above. Then, using the denominator of that fraction, write the whole part as an improper fraction, and then add the two fractions.
For example, let’s convert the pure repeating decimal 17.12 to a fraction. 0.12 = 12/99, and 17 = 1683/99. These add to 1695/99, which reduces to 565/33.
The mixed repeating decimal 312.1378 is done similarly. 0.1378 = 1365/9900, and 312 = 3088800/9900. These add to 3090165/9900, which reduces to 206011/660.
Converting a Repeating Bicimal To a Fraction
At this point you know almost everything you need to know about how to convert a bicimal to a fraction. You do it the same way you convert a decimal to a fraction, except you use a denominator that contains a string of 1s instead of a string of 9s. I’ll demonstrate the procedure with two examples: 0.01 and 0.10010.
0.01 is a pure repeating bicimal with a two-digit repeating cycle. The numerator of the fraction is 1, and the denominator is 11; it converts to 1/11, which is 1/3 in decimal numerals.
0.10010 is a mixed repeating bicimal. It has a three-digit non-repeating prefix and a two-digit repeating cycle; this makes the denominator of the fraction 11000. The numerator is the non-repeating digits and repeating digits minus the non-repeating digits: 10010 – 100 = 1110. The resulting fraction is 1110/11000, which reduces to 111/1100, which is 7/12 in decimal numerals. (See the diagram in the introduction; the purple digits correspond to the non-repeating part, and the red digits correspond to the repeating part.)
Converting a bicimal with a whole part works the same as for decimals, except you form the improper fraction for the whole part using binary multiplication. For example, to convert 101.01, first convert the fractional part to 1/11, and then convert 101 to 1111/11 by multiplying 101 by 11. Add these two fractions to get the answer: 10000/11.
Why It Works
You can show why this method works by using the subtraction method, as we did for decimals. For example, the subtraction method will show you that the denominator is of the form (2r – 1)2p, where r is the length of the repeating part and p is the length of the non-repeating part — in other words, r 1s followed by p 0s.
(Read about the series method, my final article in this series.)