Base b representation

From CS2800 wiki
(Redirected from Base)

When we write down sequences of digits in decimal (or base 10) notation, we interpret them according to a formula. For example, we interpret the number 1234 as a 1 in the "thousands place", a 2 in the "hundreds place", a 3 in the "tens place", and a 4 in the "ones place". In other words, we interpret the string of digits "1234" as [math]1 \cdot 10^3 + 2 \cdot 10^2 + 3 \cdot 10^1 + 4 \cdot 10^0 [/math].

It is occasionally useful to write a similar formula, but with a different set of possible digits. We have the following definitions:

If [math]d_k, d_{k-1}, \dots, d_1, d_0 [/math] are all natural numbers satisfying [math]0 \leq d_i \lt b [/math] for all [math]i [/math], then the base b interpretation of [math]\href{/cs2800/wiki/index.php/Sequence_notation}{(d_i)} [/math], written [math](d_kd_{k-1}\cdots{}d_1d_0)_b [/math] is given by [math]\href{/cs2800/wiki/index.php/Base}{(d_i)_b} := \sum_{i} d_ib^i [/math]

For example, [math]\href{/cs2800/wiki/index.php/Base}{(732)_{9}} = 7 \cdot 9^2 + 3 \cdot 9^1 + 2 \cdot 9^0 = 596 [/math].

Definition: Digit
numbers [math]d [/math] satisfying [math]0 \leq d \lt b [/math] are called base b digits.
If [math]\href{/cs2800/wiki/index.php/Sequence_notation}{(d_i)} [/math] is a sequence of base [math]b [/math] digits, and if [math]a = (d_i)_b [/math], then we say that [math]\href{/cs2800/wiki/index.php/Sequence_notation}{(d_i)} [/math] is the Base b representation of [math]a [/math]

For example, the base 9 representation of 596 is the sequence of digits [math]d_2 = 7, d_1 = 3, d_0 = 2 [/math] because [math]596 = \href{/cs2800/wiki/index.php/Base}{(732)_9} [/math].

Note that the base is not an intrinsic property of a natural number, but rather is a property of the way we write the number down. It does not make sense to say something like "let [math]n [/math] be a base b number", any more than it makes sense to say "let [math]n [/math] be a number in roman numerals". The object [math]596 [/math] 'is' the same as the object [math]\href{/cs2800/wiki/index.php/Base}{(732)_9} [/math] (and also the object [math]\href{/cs2800/wiki/index.php/Roman_numeral}{DVCI} [/math]); it is just written down in three different ways.