info prev up next book cdrom email home

Base (Number)

A Real Number $x$ can be represented using any Integer number $b$ as a base (sometimes also called a Radix or Scale). The choice of a base yields to a representation of numbers known as a Number System. In base $b$, the Digits 0, 1, ..., $b-1$ are used (where, by convention, for bases larger than 10, the symbols A, B, C, ...are generally used as symbols representing the Decimal numbers 10, 11, 12, ...).

Base Name
2 Binary
3 Ternary
4 Quaternary
5 Quinary
6 Senary
7 Septenary
8 Octal
9 Nonary
10 Decimal
11 Undenary
12 Duodecimal
16 Hexadecimal
20 Vigesimal
60 Sexagesimal


Let the base $b$ representation of a number $x$ be written

\begin{displaymath}
(a_n\,a_{n-1}\,\ldots\,a_0.\,a_{-1}\,\ldots)_b,
\end{displaymath} (1)

(e.g., ${123.456}_{10}$), then the index of the leading Digit needed to represent the number is
\begin{displaymath}
n\equiv \left\lfloor{\log_b x}\right\rfloor ,
\end{displaymath} (2)

where $\left\lfloor{x}\right\rfloor $ is the Floor Function. Now, recursively compute the successive Digits
\begin{displaymath}
a_i=\left\lfloor{r_i\over b^i}\right\rfloor ,
\end{displaymath} (3)

where $r_n\equiv x$ and
\begin{displaymath}
r_{i-1}=r_i-a_ib^i
\end{displaymath} (4)

for $i=n$, $n-1$, ..., 1, 0, .... This gives the base $b$ representation of $x$. Note that if $x$ is an Integer, then $i$ need only run through 0, and that if $x$ has a fractional part, then the expansion may or may not terminate. For example, the Hexadecimal representation of 0.1 (which terminates in Decimal notation) is the infinite expression $0.19999\ldots_h$.


Some number systems use a mixture of bases for counting. Examples include the Mayan calendar and the old British monetary system (in which ha'pennies, pennies, threepence, sixpence, shillings, half crowns, pounds, and guineas corresponded to units of 1/2, 1, 3, 6, 12, 30, 240, and 252, respectively).


Knuth has considered using Transcendental bases. This leads to some rather unfamiliar results, such as equating $\pi$ to 1 in ``base $\pi$,'' $\pi=1_\pi$.

See also Binary, Decimal, Hereditary Representation, Hexadecimal, Octal, Quaternary, Sexagesimal, Ternary, Vigesimal


References

Abramowitz, M. and Stegun, C. A. (Eds.). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, p. 28, 1972.

Bogomolny, A. ``Base Converter.'' http://www.cut-the-knot.com/binary.html.

Lauwerier, H. Fractals: Endlessly Repeated Geometric Figures. Princeton, NJ: Princeton University Press, pp. 6-11, 1991.

mathematica.gif Weisstein, E. W. ``Bases.'' Mathematica notebook Bases.m.



info prev up next book cdrom email home

© 1996-9 Eric W. Weisstein
1999-05-26