Numbers and their Digits in different Bases

This is a sub-page of our page on Interactive Learning Objects.

///////

Related KMR-pages:

Experiment here with anticipating the Digits of a Number with respect to different Bases.
Shift of Basis (in general).

///////

Other relevant sources of information:

Binary to decimal can’t be hard, right?

///////

Representation and Reconstruction of a Presentant with respect to a Background

Representation: \, [ \, p_{resentant} \, ]_{B_{ackground}} \, \mapsto \, \left< \, r_{epresentant} \, \right>_{B_{ackground}}

Reconstruction: \, \left( \, \left< \, r_{epresentant} \, \right>_{B_{ackground}} \, \right)_{B_{ackground}} \mapsto \,\, p_{resentant}

/////// In Swedish:

Representation och Rekonstruktion av en Presentant med avseende på en Bakgrund

Representation: \, [ \, p_{resentant} \, ]_{B_{akgrund}} \, \mapsto \, \left< \, r_{epresentant} \, \right>_{B_{akgrund}}

Rekonstruktion: \, \left( \, \left< \, r_{epresentant} \, \right>_{B_{akgrund}} \, \right)_{B_{akgrund}} \mapsto \,\, p_{resentant}

/////// Back to English:

Representation and Reconstruction of a Number with respect to a Base:

Representation: [ \, n_{umber} \, ]_{B_{ase}} \, \mapsto \, \left< \, d_{igits} \, \right>_{B_{ase}}

Reconstruction: \left( \, \left< \, d_{igits} \, \right>_{B_{ase}} \, \right)_{B_{ase}} \mapsto \,\, n_{umber}

/////// (in Swedish):

Representation och Rekonstruktion av ett Tal med avseende på en Bas:

Representation: [ \, t_{al} \, ]_{B_{as}} \, \mapsto \, \left< \, s_{iffror} \, \right>_{B_{as}}

Rekonstruktion: \left( \, \left< \, s_{iffror} \, \right>_{B_{as}} \, \right)_{B_{as}} \, \mapsto \,\, t_{al}

/////// Back to English:

The Hindu-Arabic Position System:

Choose a fixed n_{umber} and call it the B_{ase} . The d_{igits} of any n_{umber} with respect to this B_{ase} are given by the sequence \left where k + 1 is the number of digits of the n_{umber} with respect to this B_{ase} . Hence we have:

n_{umber} \, \equiv \, d_k B_{ase}^{\,k} + ... + d_2 B_{ase}^{\,2} + d_1 B_{ase}^{\,1} + d_0 B_{ase}^{\,0}.

In order to shorten the expressions let us denote the chosen B_{ase} by B .

Since B^1 \, \equiv \, B and B^0 \equiv 1 \, , we can write:

n_{umber} \, \equiv \, d_k B^k + ... + d_2 B^2 + d_1 B^1 + d_0 B^0 \equiv d_k B^k + ... + d_2 B^2 + d_1 B + d_0.

////////////////////
Experiment here
with trying to anticipate the \, d_{igits} \,
of a selected \, n_{umber} \,
relative to a selected \, B_{ase} \, .
/////////////////////////////////

Representations of numbers in different bases:

Expressions of numbers in different bases

Digits for numbers in different bases:

Digits of numbers in different bases

The numbers a and b represented in the bases x and y :

Numbers a and b in bases x and y

Let us choose the number x as the B_{ase} . For any numbers \, a \, and \, b \, we then have

a \, \equiv \, {\left([\, a \, ]_x \right)}_x \, \equiv \, \cdots + a_3 x^3 + a_2 x^2 + a_1 x^1 + a_0 x^0 , and

b \, \equiv \, {\left([\, b \, ]_x \right)}_x \, \equiv \, \cdots + \, b_3 x^3 + b_2 x^2 + b_1 x^1 + b_0 x^0 \, , and we get:

a+b \, \equiv \, \cdots + (a_3 + b_3) x^3 + (a_2 + b_2) x^2 + (a_1 + b_1) x^1 + (a_0 + b_0) x^0 .

Therefore we have:

[ \, a + b \, ]_x \, \equiv \, [ \, a \, ]_x \, + \, [ \, b \, ]_x ,

and hence:

a + b \, \equiv \, \left( \, [ \, a \, ]_x \, \right)_x \, + \, \left( \, [ \, b \, ]_x \, \right)_x \, \equiv \, \left( \, [ \, a + b \, ]_x \, \right)_x \, \equiv \, \left( \, [ \, a \, ]_x \, + \, [ \, b \, ]_x \, \right)_x \,

as it should be.

If we choose the number \, y \, as the \, B_{ase} \, we have analogously:

a \, \equiv \, {\left( \, [ \, a \, ]_y \, \right)}_y \equiv \, \cdots + a'_3 y^3 + a'_2 y^2 + a'_1 y^1 + a'_0 y^0 .

b \, \equiv \, {\left( \, [\, b \, ]_y \, \right)}_y \, \equiv \, \cdots + \, b'_3 y^3 + b'_2 y^2 + b'_1 y^1 + b'_0 y^0 .

The numbers twelve and eleven in the bases ten and three:

Numbers twelve and eleven in bases ten and three

Since \, t_{welve} \, \equiv 1 \, {t_{en}}^1 + 2 \, o_{ne} \, , we have

[ \, t_{welve} \, ]_{t_{en}} \, = \, \left< \, 12 \, \right>_{t_{en}} \ , and since

t_{welve} \, \equiv \, 1 \, {t_{hree}}^2 + 1 \, {t_{hree}}^1 + 0 \, o_{ne} \, , we have

[ \, t_{welve} \, ]_{t_{hree}} \, = \, \left< \, 110 \, \right>_{t_{hree}} .

In the same way we have:

\, e_{leven} \, \equiv 1 \, {t_{en}}^1 + 1 \, o_{ne} \, , and thus [ \, e_{leven} \, ]_{t_{en}} \, = \, \left< \, 11 \, \right>_{t_{en}} \, , as well as

\, e_{leven} \, \equiv 1 \, {t_{hree}}^2 + 0 \, {t_{hree}}^1 + 2 \, o_{ne} \, , and thus \, [ \, e_{leven} \, ]_{t_{hree}} = \left< \, 102 \,\right>_{t_{hree}} .

From the observations above, we can compute

[t_{welve} + e_{leven}]_{t_{en}} \equiv \left<\, 12 \; + \, 11 \, \right>_{t_{en}} \equiv \left<\, 23 \, \right>_{t_{en}}\; , and

[t_{welve} + e_{leven}]_{t_{hree}} \equiv \left<\, 110 \; + \, 102 \,\right>_{t_{hree}} \equiv \left<\, 212 \,\right>_{t_{hree}} \; .

Now, since:

2 \, {t_{en}}^1 + 3 \, o_{ne} \equiv 2 \, {t_{hree}}^2 + 1 \, {t_{hree}}^1 + 2 \, o_{ne} \equiv t_{wentyThree} \; , we have

\left(\left<\, 23 \,\right>_{t_{en}}\right)_{t_{en}} \equiv \left(\left< \, 212 \, \right>_{t_{hree}}\right)_{t_{hree}} \equiv t_{wentyThree} \, .

///////

Getting rid of the carry problem

Idea: When we want to compute a certain operation, say \, a + b \times c , we can always choose a base that is big enough, so that carrying out the operation will involve no “carry problems”, i.e., no “overflow” of digits within any power of the base. In fact, for any given finite sequence of binary operations/computations, there is a smallest natural number \, B , such that the choice of \, B \, as a basis for the computation involves no carrying of any digits across different powers of \, B .

Hence, with this definition, each computation involving ‘plus’ and ‘times’ induces a ring homomorphism on the polynomial ring presented by the symbols of the operation/computation, i.e., the Base chosen for it and the digits involved in it.

Representation: [ \, aN_{umber} \, ]_B = \left< \, i_{ts}d_{igits} \, \right>_B

Reconstruction: \left( \, [ \, aN_{umber} \, ]_B \, \right)_B = t_{he}N_{umber}

///////

Numbers and Bases as x- and y-axes and digits as (x, y) coordinates

///////

\, (m + m') \times (n + n') \, = \, = \, \left( \, [ \, (m + m') \times (n + n') \, ]_B \, \right)_B \, = \, = \, \left( \, [ \, (m + m') \, ]_B \times [ \, (n + n') \, ]_B \, \right)_B \, = \, = \left( \, \left< \, ( \displaystyle\sum_{i=1}^{B-1} (m_i + m'_i) b^i) \times (\displaystyle\sum_{j=1}^{B-1} (n_j + n'_j) b^j) \, \right>_B \, \right)_B \, = \, = \left( \, \left< \, ( \displaystyle\sum_{i=1}^{B-1} m_i b^i + \displaystyle\sum_{i=1}^{B-1} m'_i b^i) \times (\displaystyle\sum_{j=1}^{B-1} n_j b^j + \displaystyle\sum_{j=1}^{B-1} n'_j b^j) \, \right>_B \, \right)_B \, = \, = \left( \, \left< \, \displaystyle\sum_{i+j=k}^{k=B-1} ( m_i b^i \times n_j b^j + m_i b^i \times n'_j b^j + m'_i b^i \times n_j b^j + m'_i b^i \times n'_j b^j ) \, \right>_B \, \right)_B \, = \, = \left( \, \left< \, (\displaystyle\sum_{i+j=k}^{k=B-1} m_i n_j b^{i+j} + \displaystyle\sum_{i+j=k}^{k=B-1} m_i n'_j b^{i+j} + \displaystyle\sum_{i+j=k}^{k=B-1} m'_i n_j b^{i+j} + \displaystyle\sum_{i+j=k}^{k=B-1} m'_i n'_j b^{i+j} ) \, \right>_B \, \right)_B \, = \, = \, \left( \, [ \, m n \, ]_B + [ \, m n' \, ]_B + [ \, m' n \, ]_B + [ \, m' n' \, ]_B \, \right)_B \, = \, = \, \left( \, [ \, m n + m n' + m' n + m' n' \, ]_B \, \right)_B \, =

\, = \, m n + m n' + m' n + m' n' .

///////

The Base-Shift formula for Numbers

It is often useful to have a symbolic name for the operation of shifting the \, B_{ase} \, of a \, n_{umber} \, from \, {B_{ase}}_1 \, to \, {B_{ase}}_2 \,. This operation will be called \, B_{aseShift} \, and its action on a given \, n_{umber} \, will be written in three different ways:

i) \, {[ \, B_{aseShift} \, ]}_{{B_{ase}}_2}^{{B_{ase}}_1} \, or

ii) \, {[ \, n_{umber} \, ]}_{{B_{ase}}_2}^{{B_{ase}}_1} \, if the \, B_{aseShift} \, operation is clear from the context, or

iii) \, {[\,\,\,]}_{{B_{ase}}_2}^{{B_{ase}}_1} \, if both the \, n_{umber} \, and the \, B_{aseShift} \, operation are clear from the context.

A Base-Shift Diagram for Numbers:
A Base-Shift diagram for Numbers

Numbers are naturally related to Music:

Numbers  are Naturally Related to Music

///////
/// INTRO ON CATEGORY THEORY
///////

Related KMR-pages:

Category Theory
Limits and Colimits

///////

Examples:

///////

Product and coproduct of 2 and 3 in the category \, \mathbf{S_{ets}} \, :

Product and coproduct of two and three

///////

Product and coproduct of 4 and 6 in the ”divisible by” category \, \langle \, {\mathbb {N}}^+ \, | \, \rangle \, :

The factor (= ”divisible by”) category

///////

The universal property of the lcm of a finite set of \, n_{umbers} \in {\mathbb {N}}^+ \, :

Universal property of 27740 relative to 1, 2, 3, ..., 12 (yellow)

The least common multiple (lcm) of the numbers \, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 \,
is \, 27740 . Hence, every natural number \, n \geq 1 \, that is divisible by all of the numbers \, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 \, must be divisible by \, 27740 , which is indicated by the red arrow in the diagram. The uniqueness of this arrow is obvious since there is at most one arrow between any two numbers \, m \, and \, n \, , an arrow being present if and only if \, m \, divides \, n \, or vice versa.

Hence, the limit of a finite set of positive natural numbers
is given by their least common multiple.

For more on this category, see Category of natural numbers with divisbility which describes the op-category of \, \langle \, {\mathbb {N}}^+ \, | \, \rangle , that is the category that arises from \, \langle \, {\mathbb {N}}^+ \, | \, \rangle by reversing the direction of each of its arrows.

///////

Leave a Reply

Your email address will not be published. Required fields are marked *