 # MAT 112 Integers and Modern Applications for the Uninitiated

## Section11.4Base $$b$$ Numbers

Instead of using base $$10$$ or base $$2\text{,}$$ we can use any other natural number $$b>1$$ as a base. To represent any number in base $$b\text{,}$$ we must specify $$b$$ unique symbols that represent the $$b$$ values from $$0$$ to $$b-1\text{.}$$ Those symbols are the first $$b$$ symbols from the list
\begin{equation*} 0,1,2,3,4,5,6,7,8,9,\mathrm{A},\mathrm{B},\mathrm{C},\dots\text{.} \end{equation*}
When considering bases $$b$$ with $$b\le10\text{,}$$ we use the numbers $$0,1,2,3,\dots,b-1$$ as our $$b$$ unique symbols. However, if $$b>10\text{,}$$ we use all of the numbers $$0, 1, 2, \dots, 8, 9$$ as well as enough capital letters to complete the list of $$b$$ unique symbols. The value of $$\mathrm{A}$$ is the decimal number $$10\text{,}$$ the value of $$\mathrm{B}$$ is the decimal number $$11\text{,}$$ the value of $$\mathrm{C}$$ is the decimal number $$12\text{,}$$ and so on. We do not consider bases greater than $$36$$ where we have $$Z_{36}=35\text{,}$$ so we do not need further symbols. There are many applications of numbers in other bases. In particular, computer related fields frequently use base $$2\text{,}$$ $$8\text{,}$$ and $$16\text{.}$$
In the video in Figure 11.19 introduce numbers represented in bases other than $$2$$ and $$10\text{.}$$ Further details are give below.
Figure 11.20 provides various numbers written in base $$2\text{,}$$ $$3\text{,}$$ $$8\text{,}$$ $$10\text{,}$$ $$12\text{,}$$ and $$16$$ as well as in English and French. When counting in some languages, there are irregularities of words which originate in other number systems. In English, the numbers $$11$$ and $$12$$ do not follow the pattern of the other numbers between $$10$$ and $$20\text{.}$$ In French, the numbers $$11$$ to $$16$$ follow a different pattern than the numbers $$17$$ to $$19\text{,}$$ and the numbers $$30$$ to $$79$$ follow a different pattern than the numbers $$80$$ to $$99\text{.}$$
We generalize the decimal (base 10) expansion to other bases in the following way. Let $$b\in \N$$ with $$b>1\text{.}$$ We can write any number $$a\in\N$$ with $$a\lt b^n$$ in the form
\begin{equation*} a=r_{n-1}b^{n-1}+r_{n-2}b^{n-2}+\dots+r_1 b+r_0\text{,} \end{equation*}
where $$n$$ is the number of digits in the base $$b$$ representation of $$a$$ and $$0\le r_i\lt b$$ for $$i\in\{0,\dots,n-1\}\text{.}$$
To write the number $$a$$ in base $$b\text{,}$$ we extract the digits $$r_0$$ to $$r_{n-1}$$ from the expanded notation. To distinguish numbers in different bases, we add a subscript $$b$$ to the number in base $$b$$ if $$b\ne 10\text{.}$$ So, the number $$a$$ from above would be written as
\begin{equation*} a=(r_{n-1}\dots r_2 r_1 r_0)_b \end{equation*}
in base $$b\text{.}$$ In Figure 11.21 and Figure 11.22 we give examples of numbers in base $$7$$ and base $$16$$ with their digits, expansions, and the numbers in base $$10\text{.}$$
We compute the decimal representation of a base $$b$$ number by evaluating its base $$b$$ expansion.

### Example11.23.Conversion to decimal representation.

Given numbers in various bases $$b\text{,}$$ we convert these numbers to their decimal representations by writing out their base $$b$$ expansions and then evaluating them.
1. $$\displaystyle 1101_2=1\cdot2^3+1\cdot 2^2+0\cdot 2+1 \cdot 1=13$$
2. $$\displaystyle 1101_3=1\cdot3^3+1\cdot 3^2+0\cdot 3+1 \cdot 1=37$$
3. $$\displaystyle 201_3=2\cdot 3^2+0\cdot 3+1 \cdot 1=19$$
4. $$\displaystyle 201_5=2\cdot 5^2+0\cdot 5+1 \cdot 1=51$$
5. $$\displaystyle 201_{16}=2\cdot 16^2+0\cdot 16+1 \cdot 1=513$$
6. $$\displaystyle \mathrm{A}3\mathrm{B}_{16}=10\cdot16^2+3\cdot 16+11 \cdot 1=2619$$

### Problem11.24.Convert from base $$18$$ to base $$10$$.

Give the base $$18$$ expansion of $$99GD872_{18}$$ and covert $$99GD872_{18}$$ to decimal representation.
Solution.
In base {18} we use the characters $$0\text{,}$$$$1\text{,}$$$$2\text{,}$$$$3\text{,}$$$$4\text{,}$$$$5\text{,}$$$$6\text{,}$$$$7\text{,}$$$$8\text{,}$$$$9\text{,}$$$$A\text{,}$$$$B\text{,}$$$$C\text{,}$$$$D\text{,}$$$$E\text{,}$$$$F\text{,}$$$$G\text{,}$$$$H$$ for the digits. The values of these are
 $$0_{18} = 0$$ $$1_{18} = 1$$ $$2_{18} = 2$$ $$3_{18} = 3$$ $$4_{18} = 4$$ $$5_{18} = 5$$ $$6_{18} = 6$$ $$7_{18} = 7$$ $$8_{18} = 8$$ $$9_{18} = 9$$ $$A_{18} = 10$$ $$B_{18} = 11$$ $$C_{18} = 12$$ $$D_{18} = 13$$ $$E_{18} = 14$$ $$F_{18} = 15$$ $$G_{18} = 16$$ $$H_{18} = 17$$
So as the base 18 expansion of $$99GD872{18}$$ we get
$$99GD872_{18}$$$$= 9\cdot{18}^6 + 9\cdot{18}^5 + 16\cdot {18}^4 + 13\cdot{18}^3 + 8\cdot{18}^2 + 7\cdot{18} + 2\cdot 1 \text{.}$$
Evaluating the expression on the right yields the decimal representation of $$99GD872_{18}\text{:}$$
$$99GD872_{18}$$ $$= 9\cdot{18}^6 + 9\cdot{18}^5 + 16\cdot {18}^4 + 13\cdot{18}^3 + 8\cdot{18}^2 + 7\cdot{18} + 2\cdot 1$$$$= 324874280$$
So to convert a number in base $$b$$ representation, where $$b$$ to base $$10$$ representation we
• write down the base $$b$$ expansion, which consists of the digits of the base $$b$$ representation converted to decimal and the place values, which are the powers of $$b$$
• evaluate this expression to obtain the base $$10$$ representation.
Try yourself.

### Checkpoint11.25.Other base less than $$10$$ to base $$10$$.

Give the expanded base $$9$$ form of $$548725_{9}\text{.}$$ Enter all digits in decimal form, that is, for $$A$$ enter $$10\text{.}$$
$$\cdot 9^6 +$$ $$\cdot 9^5 +$$ $$\cdot 9^4 +$$ $$\cdot 9^3 +$$ $$\cdot 9^2 +$$ $$\cdot 9+$$ $$\cdot 1$$
Give $$548725_{9}$$ in decimal representation.
In Checkpoint 11.26 do the same for a base greater than $$10\text{.}$$ Recall that $$\mathrm{A}$$ in the base $$b$$ representation is a $$10$$ in the base $$b$$ expansion, $$\mathrm{B}$$ in the base $$b$$ representation is a $$11$$ in the base $$b$$ expansion, $$\mathrm{C}$$ in the base $$b$$ representation is a $$12$$ in the base $$b$$ expansion, and so on.

### Checkpoint11.26.Other base greater than $$10$$ to base $$10$$.

Give the expanded base $$19$$ form of $$89BDIG5_{19}\text{.}$$ Enter all digits in decimal form, that is, for $$A$$ enter $$10\text{.}$$
$$\cdot 19^6 +$$ $$\cdot 19^5 +$$ $$\cdot 19^4 +$$ $$\cdot 19^3 +$$ $$\cdot 19^2 +$$ $$\cdot 19+$$ $$\cdot 1$$
Give $$89BDIG5_{19}$$ in decimal representation.