nLab radix notation

Radix notation

Radix notation

Idea

At least in classical mathematics, every real number may be written in base nn for any natural number n2n \geq 2 (binary for n=2n = 2, decimal for n=10n = 10, etc), which can be generalized to fractional n>1n \gt 1 (especially n=e2.718n = \mathrm{e} \approx 2.718) and beyond.

For integers, this idea goes back to the Old Babylonians using base 6060 (around 2000 BCE), perfected in the Gupta Empire using base 1010 (around 400), and popularized in Europe by Fibonacci? (in 1202). For arbitrary real numbers, these were first used by Abu'l-Hasan al-Uqlidisi? (around 952) and popularized by Simon Stevin? (in 1585). This notation (in base 1010) is now ubiquitous, and (despite the technical difficulties of doing so rigorously) serves as a de facto definition of the real numbers in elementary mathematics.

Radix notation in base 22 is the basis of floating point arithmetic?, the fast but imprecise method of calculation with real numbers usually used in modern computing.

Definition

Given a natural number n2n \geq 2, let [n][n] be the set of natural numbers (including zero) strictly less than nn: [n]={0,1,2,,n2,n1}[n] = \{0, 1, 2, \ldots, n - 2, n - 1\}; in this context, an element of [n][n] is called a digit (in base nn). Let \mathbb{Z} be the set of integers: ={,2,1,0,1,2,}\mathbb{Z} = \{\ldots, -2, -1, 0, 1, 2, \ldots\}; in this context, an element of \mathbb{Z} is called a place value. Then a function from \mathbb{Z} to [n][n] is a doubly-infinite sequence of digits, one digit for each place value. Such a sequence a=(a i) i:a = (a_i)_{i\colon{\mathbb{Z}}} defines a doubly-infinite series of rational numbers:

<i<a in i. \sum_{-\infty \lt i \lt \infty} a_i n^{-i} .

This series converges (to a real number) if and only if there is a place value NN such that a i=0a_i = 0 for all i<Ni \lt N. That is, we can write the series as

i=N a in i. \sum_{i = N}^\infty a_i n^{-i} .

In this way, a sequence of digits (finite on one end, infinite on the other) represents a nonnegative real number.

As a representation of real numbers, this is almost unique. Specifically, two distinct sequences aa and bb of digits represent the same real number (meaning that the sums of the series are equal) if and only if there is some place value mm such that

  • a i=b ia_i = b_i for every place value i<mi \lt m,
  • a m=b m+1a_m = b_m + 1 (or the reverse), and
  • a i=n1a_i = n - 1 for every i>mi \gt m while b i=0b_i = 0 for every i>mi \gt m.

In this case, the sequence with 00s is generally considered standard. The real numbers arising in this way are precisely the positive nn-adic rational? numbers, that is the rational numbers that are positive integer multiples of n mn^{-m} for some integer mm (the same mm as above).

In classical mathematics, every nonnegative real number may be represented in this way. Given such a number xx and a place value ii, let a ia_i be the remainder? modulo nn of the floor of xn ix n^i: that is, a ixn imodna_i \coloneqq \lfloor{x n^i}\rfloor \mod n; then x= ia in ix = \sum_i a_i n^{-i}. (For nn-adic rational xx, this will produce the representation with 00s; to automatically produce the other representation, use a i=(xn i1)modna_i = (\lceil{x n^i} - 1\rceil) \mod n.) The number 00 is represented only by a sequence of all 00s.

Given nn unique symbols for the nn digits, the real number represented by a sequence of digits may be written by, beginning at the smallest place value whose digit is nonzero, writing the symbols in order, with a dot (or comma), called the radix point, between place value 00 and place value 11 (and padding zeroes after the radix point if the first nonzero digit has not yet been reached). Of course, the sequence is still infinite and cannot be written down, but we may write any finite portion. The nn-adic rationals can be represented exactly by leaving out the infinitely repeating digit 00; arbitrary rational numbers may be represented exactly by a bar over a list of digits that repeats infinitely. (It is a theorem that every non-nn-adic rational number can be uniquely represented in this way; in fact, only rational numbers can be so represented.) A subscript may be used to indicate the base nn (with a default base 1010 in practice). Finally, a negative real number is written by writing its absolute value after a minus sign.

Generalizations

Given any number nn (not necessarily a natural number), still called the base, and any set DD of numbers, whose elements are called digits, we may consider finite or infinite sequences of digits, indexed by integers (still called place values). Such a sequence should include a smallest place value NN as part of its data (since 00 may not be one of the digits), so the place values are all (or perhaps only some) of the integers iNi \geq N. Then the infinite series

i=N a in i \sum_{i=N}^\infty a_i n^{-i}

still converges to a real number.

If n2n \geq 2 is a natural number and DD is [n][n], then we recover the representation above of all nonnegative real numbers, unique except for the positive nn-adic rationals. More generally, if n>1n \gt 1 is any real number and DD is [n][\lceil{n}\rceil], then we get a representation of all nonnegative real numbers, which (for non-integer nn) is never unique (although in practice one uses the last sequence in lexicographic ordering).

If n2n \geq 2 is a natural number and DD is [n]+1={1,2,3,,n1,n}[n] + 1 = \{1, 2, 3, \ldots, n - 1, n\}, then we get a representation of all positive real numbers (but not 00 unless we allow the empty list of digits). If n=1n = 1 and DD is again [n]+1={1}[n] + 1 = \{1\}, then every infinite sequence gives a divergent series, but the finite sequences represent all positive integers, uniquely up to a shift? of place value; this is called tally notation. In the other direction, if n3n \geq 3 is a natural number and DD is a set of nn consecutive integers that includes both 1-1 and 11, then we get a representation of all real numbers (positive, negative, and zero), which is unique except for a few rational numbers (in the case of n=3n = 3 and so D={1,0,1}D = \{-1, 0, 1\}, those which are half of a power of 1/31/3); this is called balanced radix notation.

Examples

Here are some representations of well-known real numbers in well-known radixes:

NumberDecimal ( n = 10 n = 10 , D = [ 10 ] D = [10] Binary ( n = 2 n = 2 , D = { 0 , 1 } D = \{0, 1\} )Positive binary ( n = 2 n = 2 , D = { 1 , 2 } D = \{1, 2\} )Natural ( n = e n = \mathrm{e} , D = { 0 , 1 , 2 } D = \{0, 1, 2\} )Ternary ( n = 3 n = 3 , D = { 0 , 1 , 2 } D = \{0, 1, 2\} )Balanced ternary ( n = 3 n = 3 , D = { 1 , 0 , 1 } D = \{-1, 0, 1\} , writing - for 1 -1 )Tally ( n = 1 n = 1 , D = { 1 } D = \{1\} )
0 0 0 0 (or 0 -0 ) 0 0 (or 0 -0 ) 0 0 (nonce symbol, or empty list) 0 0 (or 0 -0 ) 0 0 (or 0 -0 ) 0 0 0 0 (nonce symbol, or empty list)
1 1 1 1 (or 0 . 9 ¯ 0.\overline{9} ) 1 1 (or 0 . 1 ¯ 0.\overline{1} ) 1 1 (as a finite list, or 0 . 1 ¯ 0.\overline{1} with padding 0 0 , or 0.0 2 ¯ 0.0\overline{2} ) 1 1 (or 0.2121111212001 0.2121111212001\ldots , etc) 1 1 (or 0 . 2 ¯ 0.\overline{2} ) 1 1 1 1
2 2 2 2 (or 1 . 9 ¯ 1.\overline{9} ) 10 10 (or 1 . 1 ¯ 1.\overline{1} ) 2 2 (as a finite list, or 1 . 1 ¯ 1.\overline{1} , or 0 . 2 ¯ 0.\overline{2} with padding 0 0 ) 2 2 (or 1.2121111212001 1.2121111212001\ldots , etc) 2 2 (or 1 . 2 ¯ 1.\overline{2} ) 2 2 11 11
e \mathrm{e} 2.7182818284590 2.7182818284590\ldots 10.10110111111 10.10110111111\ldots 1.21221222222 1.21221222222\ldots 10 10 (or 2.121111212001 2.121111212001\ldots , etc) 2.2011011212211 2.2011011212211\ldots 10 . 0111 0 0 10.{-}0111{-}{-}0{-}0{-}\ldots (not possible)
3 3 3 3 (or 2 . 9 ¯ 2.\overline{9} ) 11 11 (or 10 . 1 ¯ 10.\overline{1} ) 11 11 (as a finite list, or 2 . 1 ¯ 2.\overline{1} , or 1 . 2 ¯ 1.\overline{2} ) 10.020011200001 10.020011200001\ldots (etc) 10 10 (or 2 . 2 ¯ 2.\overline{2} ) 10 10 111 111
π \pi 3.14159265358979 3.14159265358979\ldots 11.001001000011 11.001001000011\ldots 2.112112111122 2.112112111122\ldots 10.101002020002 10.101002020002 (etc) 10.010211012222 10.010211012222\ldots 10.011 111 000 10.011{-}111{-}000{-}\ldots (not possible)
1 / 2 1/2 0.5 0.5 (or 0.4 9 ¯ 0.4\overline{9} ) 0.1 0.1 (or 0.0 1 ¯ 0.0\overline{1} ) 0.1 0.1 (as a finite list with padding 0 0 , or 0.0 1 ¯ 0.0\overline{1} with padding 0 0 , or 0.00 2 ¯ 0.00\overline{2} ) 0.1021200201202 0.1021200201202\ldots (etc) 0 . 1 ¯ 0.\overline{1} 0 . 1 ¯ 0.\overline{1} (or 1 . ¯ 1.\overline{-} )(not possible)
1 / 3 1/3 0 . 3 ¯ 0.\overline{3} 0.0 10 ¯ 0.0\overline{10} 0.00 21 ¯ 0.00\overline{21} (with padding 0 0 ) 0.021012102010201 0.021012102010201\ldots (etc) 0.1 0.1 (or 0.0 2 ¯ 0.0\overline{2} ) 0.1 0.1 (not possible)
1 -1 1 -1 (or 0 . 9 ¯ -0.\overline{9} ) 1 -1 (or 0 . 1 ¯ -0.\overline{1} ) 1 -1 (as a finite list, or 0 . 1 ¯ -0.\overline{1} with padding 0 0 , or 0.0 2 ¯ -0.0\overline{2} ) 1 -1 (or 0.2121111212001 -0.2121111212001\ldots , etc) 1 -1 (or 0 . 2 ¯ -0.\overline{2} ) 1 -1 1 -1

Foundational issues

In constructive mathematics, it is not generally true that every real number has a radix expansion. However, one does have the following results:

Fred Richman considered a number system (a noncancellable rig) of nonnegative decimal sequences in which 0.9¯<10.\overline{9} \lt 1; the usual rig of nonnegative real numbers is a subrig; see Richman 1999. Although Richman is a prominent constructivist, the development was not (and probably cannot be made) constructive.

Usenet legend Alexander Abian?, before branching into speculative physics, advocated polemically that the real numbers should be defined as finite or infinite sequences of decimal digits; see Abian 1981. While not favoured by most mathematicians due to the inelegance of the definitions and proofs, this is the form in which the real numbers are often presented to elementary students.

References

Last revised on February 12, 2024 at 17:57:17. See the history of this page for a list of all contributions to it.