Page 256 - ARM 64 Bit Assembly Language
P. 256
Non-integral mathematics 245
8.2.2 Implications
Theorem 1 implies that any binary fraction can be expressed exactly as a decimal fraction
in radix point notation, but Theorem 2 implies that there are decimal fractions which can-
not be expressed exactly in binary radix point notation using a finite number of bits. Every
fraction (when expressed in lowest terms) which has a non-zero power of five in its denom-
inator cannot be represented in binary with a finite number of bits. Another implication is
that some fractions can not be expressed exactly in either binary or decimal. For example,
let B = 30 = 2 ∗ 3 ∗ 5. Then any number with denominator 2 3 5 terminates in base 30.
k 1 k 2 k 3
However if k 2 = 0, then the fraction will terminate in neither base two nor base ten, because
three is not a prime factor of ten or two.
Another implication of the theorem is that the more prime factors we have in our base, the
more fractions we can express exactly using radix point notation. For instance, the smallest
base that has two, three, and five as prime factors is base 30. Using that base, we can exactly
express fractions in radix notation that cannot be expressed in base ten or in base two with a
finite number of digits. For example, in base 30, the fraction 11 will terminate after one di-
15
1 1
vision since 15 = 3 5 . To see what the number will look like, let’s extend the hexadecimal
system of using letters to represent digits beyond 9. So we get this chart for base 30:
0 10 → 0 30 1 10 → 1 30 2 10 → 2 30 3 10 → 3 30 4 10 → 4 30
5 10 → 5 30 6 10 → 6 30 7 10 → 7 30 8 10 → 8 30 9 10 → 9 30
10 10 → A 30 11 10 → B 30 12 10 → C 30 13 10 → D 30 14 10 → E 30
15 10 → F 30 16 10 → G 30 17 10 → H 30 18 10 → I 30 19 10 → J 30
20 10 → K 30 21 10 → L 30 22 10 → M 30 23 10 → N 30 24 10 → O 30
25 10 → P 30 26 10 → Q 30 27 10 → R 30 28 10 → S 30 29 10 → T 30
Since 11 = 22 , the fraction can be expressed precisely as 0.M 30 . Likewise, the fraction 13 is
15 30 45
3 1
0.28 10 but terminates in base 30. Since 45 = 3 5 , this number will have three or fewer digits
following the radix point. To compute the value, we will have to raise it to higher terms. Using
2
30 as the denominator gives us:
13 260
=
45 900
Now we can convert it to base 30 by repeated division. 260 = 8 with remainder 20. Since 20 <
30
30, we cannot divide again. Therefore, 13 in base 30 is 0.8K.
45
Although base 30 can represent all fractions that can be expressed in base two and base ten,
there are still fractions that cannot be represented in base 30. For example, 1 has the prime
7