Skip to main content
Logo image

Section 11.4 Base \(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 describe \(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. But if \(b>10\text{,}\) we use all of the numbers \(0, 1, 2, \dots, 8, 9\) and 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 often use base \(2\text{,}\) \(8\text{,}\) and \(16\text{.}\)
In the video in Figure 11.4.1 we introduce numbers written in bases other than \(2\) and \(10\text{.}\) More details follow.
Figure 11.4.1. Base \(b\) Numbers by Matt Farmer and Stephen Steward

Subsection Base \(b\) Expansion

We generalize the decimal (base 10) and binary (base 2) expansions to other bases as follows.
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.4.2 and Figure 11.4.3 we give examples of numbers in base \(7\) and base \(16\) with their digits, expansions, and the numbers in base \(10\text{.}\)
\(a\) in base \(7\) digits of \(a\) base \(7\) expansion of \(a\) \(a\) in
base \(7\) \(7^3\) \(7^2\) \(7^1\) \(7^0\) base 10
\(1_7\) \(1\) \(1\cdot 1\) \(1\)
\(10_7\) \(1\) \(0\) \(1\cdot 7+0\cdot 1\) \(7\)
\(100_7\) \(1\) \(0\) \(0\) \(1\cdot 7^2+0\cdot 7+0\cdot 1\) \(49\)
\(200_7\) \(2\) \(0\) \(0\) \(2\cdot 7^2+0\cdot 7+0\cdot 1\) \(98\)
\(6200_7\) \(6\) \(2\) \(0\) \(0\) \(6\cdot 7^3+2\cdot 7^2+0\cdot 7+0\cdot 1\) \(341\)
Figure 11.4.2. Numbers in base \(7\text{,}\) their base \(7\) digits, their base \(7\) expansion, and in base \(10\text{.}\) The \(7\) digits used in base \(7\) numbers are \(0\text{,}\) \(1\text{,}\) \(2\text{,}\) \(3\text{,}\) \(4\text{,}\) \(5\text{,}\) and \(6\text{.}\)
\(a\) in base \(16\) digits of \(a\) base \(16\) expansion of \(a\) \(a\) in
base \(16\) \(16^3\) \(16^2\) \(16^1\) \(16^0\) base 10
\(1_{16}\) \(1\) \(1\cdot 1\) \(1\)
\(\mathrm{C}_{16}\) \(\mathrm{C}\) \(12\cdot 1\) \(12\)
\(10_{16}\) \(1\) \(0\) \(1\cdot 16+0\cdot 1\) \(16\)
\(\mathrm{A}0_{16}\) \(\mathrm{A}\) \(0\) \(10\cdot 16+0\cdot 1\) \(160\)
\(\mathrm{FF}_{16}\) \(\mathrm{F}\) \(\mathrm{F}\) \(15\cdot 16+15\cdot 1\) \(255\)
\(100_{16}\) \(1\) \(0\) \(0\) \(1\cdot 16^2+0\cdot 16+0\cdot 1\) \(256\)
\(200_{16}\) \(2\) \(0\) \(0\) \(2\cdot 16^2+0\cdot 16+0\cdot 1\) \(512\)
\(6\mathrm{B}00_{16}\) \(6\) \(\mathrm{B}\) \(0\) \(0\) \(6\cdot 16^3+11\cdot 16^2+0\cdot 16+0\cdot 1\) \(27392\)
Figure 11.4.3. Hexadecimal (base \(16\)) numbers, their base \(16\) digits, their base \(16\) expansion, and in base \(10\text{.}\) The \(16\) symbols used in hexadecimal numbers are \(0\text{,}\) \(1\text{,}\) \(2\text{,}\) \(3\text{,}\) \(4\text{,}\) \(5\text{,}\) \(6\text{,}\) \(7\text{,}\) \(8\text{,}\) \(9\text{,}\) \(\mathrm{A}\text{,}\) \(\mathrm{B}\text{,}\) \(\mathrm{C}\text{,}\) \(\mathrm{D}\text{,}\) \(\mathrm{E}\text{,}\) and \(\mathrm{F}\text{.}\) We have \(\mathrm{A}_{16}=10\text{,}\) \(\mathrm{B}_{16}=11\text{,}\) \(\mathrm{C}_{16}=12\text{,}\) \(\mathrm{D}_{16}=13\text{,}\) \(\mathrm{E}_{16}=14\text{,}\) and \(\mathrm{F}_{16}=15\text{.}\)
We find the decimal representation of a base \(b\) number by evaluating its base \(b\) expansion.

Example 11.4.4. Conversion to decimal representation.

For numbers written in several bases \(b\text{,}\) we write each base \(b\) expansion. Then we evaluate it to find the decimal representation.
  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\)

Problem 11.4.5. 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\)
Suppose a number is written in base \(b\text{,}\) where \(b\) is its base. To convert it to base \(10\text{,}\) follow these steps:
  • 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.
The symbols \(0,1,2\dots,9,A,B,C,\dots,Z\) are commonly used to represent numbers in bases from \(2\) through \(36\text{.}\) But one may choose other symbols, as in seen in the example below.

Example 11.4.6. Eridean numbers.

On the fictional world Erid base six numbers with the symbols \(\ell\text{,}\) \(\mathrm{I}\text{,}\) \(\mathrm{V}\text{,}\) \(\mathbf{\mathbf{+}}\text{,}\) \(\lambda\text{,}\) \(\eridfive\) are used. We get:
\(\ell = 0\) \(\mathrm{I} = 1\) \(\mathrm{V} = 2\) \(\mathbf{+} = 3\) \(\lambda = 4\) \(\eridfive = 5\)
\(\mathrm{I}\ell = 6\) \(\mathrm{I}\mathrm{I} = 7\) \(\mathrm{I}\mathrm{V} = 8\) \(\mathrm{I}\mathbf{+} = 9\) \(\mathrm{I}\lambda = 10\) \(\mathrm{I}\eridfive =11\)
\(\mathrm{V}\ell = 12\) \(\mathrm{V}\mathrm{I} = 13\) \(\mathrm{V}\mathrm{V} = 14\) \(\mathrm{V}\mathbf{+} = 15\) \(\mathrm{V}\lambda = 16\) \(\mathrm{V}\eridfive =17\)
\(\mathbf{+}\ell = 18\) \(\mathbf{+}\mathrm{I} = 19\) \(\mathbf{+}\mathrm{V} = 20\) \(\mathbf{+}\mathbf{+} = 21\) \(\mathbf{+}\lambda = 22\) \(\mathbf{+}\eridfive = 23\)
\(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\)
\(\mathrm{I}\ell\ell = 36\) \(\mathrm{I}\ell\mathrm{I} = 37\) \(\mathrm{I}\ell\mathrm{V} = 38\) \(\mathrm{I}\ell\mathbf{+} = 39\) \(\mathrm{I}\ell\lambda = 40\) \(\mathrm{I}\ell\eridfive =41\)

Subsection Counting in base \(b\)

Figure 11.4.7 provides several numbers written in base \(2\text{,}\) \(3\text{,}\) \(8\text{,}\) \(10\text{,}\) \(12\text{,}\) and \(16\) and 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{.}\)
English French binary (base 2) ternary (base 3) octal (base 8) decimal (base 10) dozenal (base 12) hexa-decimal (base 16)
zero zéro \(\mathrm{0}_2\) \(\mathrm{0}_3\) \(\mathrm{0}_8\) \(\mathrm{0}\) \(\mathrm{0}_{12}\) \(\mathrm{0}_{16}\)
one un \(\mathrm{1}_2\) \(\mathrm{1}_3\) \(\mathrm{1}_8\) \(\mathrm{1}\) \(\mathrm{1}_{12}\) \(\mathrm{1}_{16}\)
two deux \(\mathrm{10}_2\) \(\mathrm{2}_3\) \(\mathrm{2}_8\) \(\mathrm{2}\) \(\mathrm{2}_{12}\) \(\mathrm{2}_{16}\)
three trois \(\mathrm{11}_2\) \(\mathrm{10}_3\) \(\mathrm{3}_8\) \(\mathrm{3}\) \(\mathrm{3}_{12}\) \(\mathrm{3}_{16}\)
four quatre \(\mathrm{100}_2\) \(\mathrm{11}_3\) \(\mathrm{4}_8\) \(\mathrm{4}\) \(\mathrm{4}_{12}\) \(\mathrm{4}_{16}\)
five cinq \(\mathrm{101}_2\) \(\mathrm{12}_3\) \(\mathrm{5}_8\) \(\mathrm{5}\) \(\mathrm{5}_{12}\) \(\mathrm{5}_{16}\)
six six \(\mathrm{110}_2\) \(\mathrm{20}_3\) \(\mathrm{6}_8\) \(\mathrm{6}\) \(\mathrm{6}_{12}\) \(\mathrm{6}_{16}\)
seven sept \(\mathrm{111}_2\) \(\mathrm{21}_3\) \(\mathrm{7}_8\) \(\mathrm{7}\) \(\mathrm{7}_{12}\) \(\mathrm{7}_{16}\)
eight huit \(\mathrm{1000}_2\) \(\mathrm{22}_3\) \(\mathrm{10}_8\) \(\mathrm{8}\) \(\mathrm{8}_{12}\) \(\mathrm{8}_{16}\)
nine neuf \(\mathrm{1001}_2\) \(\mathrm{100}_3\) \(\mathrm{11}_8\) \(\mathrm{9}\) \(\mathrm{9}_{12}\) \(\mathrm{9}_{16}\)
ten dix \(\mathrm{1010}_2\) \(\mathrm{101}_3\) \(\mathrm{12}_8\) \(\mathrm{10}\) \(\mathrm{A}_{12}\) \(\mathrm{A}_{16}\)
eleven onze \(\mathrm{1011}_2\) \(\mathrm{102}_3\) \(\mathrm{13}_8\) \(\mathrm{11}\) \(\mathrm{B}_{12}\) \(\mathrm{B}_{16}\)
twelve douze \(\mathrm{1100}_2\) \(\mathrm{110}_3\) \(\mathrm{14}_8\) \(\mathrm{12}\) \(\mathrm{10}_{12}\) \(\mathrm{C}_{16}\)
thirteen treize \(\mathrm{1101}_2\) \(\mathrm{111}_3\) \(\mathrm{15}_8\) \(\mathrm{13}\) \(\mathrm{11}_{12}\) \(\mathrm{D}_{16}\)
fourteen quatorze \(\mathrm{1110}_2\) \(\mathrm{112}_3\) \(\mathrm{16}_8\) \(\mathrm{14}\) \(\mathrm{12}_{12}\) \(\mathrm{E}_{16}\)
fifteen quinze \(\mathrm{1111}_2\) \(\mathrm{120}_3\) \(\mathrm{17}_8\) \(\mathrm{15}\) \(\mathrm{13}_{12}\) \(\mathrm{F}_{16}\)
sixteen seize \(\mathrm{10000}_2\) \(\mathrm{121}_3\) \(\mathrm{20}_8\) \(\mathrm{16}\) \(\mathrm{14}_{12}\) \(\mathrm{10}_{16}\)
seventeen dixsept \(\mathrm{10001}_2\) \(\mathrm{122}_3\) \(\mathrm{21}_8\) \(\mathrm{17}\) \(\mathrm{15}_{12}\) \(\mathrm{11}_{16}\)
twenty vingt \(\mathrm{10100}_2\) \(\mathrm{202}_3\) \(\mathrm{24}_8\) \(\mathrm{20}\) \(\mathrm{18}_{12}\) \(\mathrm{14}_{16}\)
sixty soixante \(\mathrm{111100}_2\) \(\mathrm{2020}_3\) \(\mathrm{74}_8\) \(\mathrm{60}\) \(\mathrm{50}_{12}\) \(\mathrm{3C}_{16}\)
eighty quatrevingt \(\mathrm{1010000}_2\) \(\mathrm{2222}_3\) \(\mathrm{120}_8\) \(\mathrm{80}\) \(\mathrm{68}_{12}\) \(\mathrm{50}_{16}\)
ninety quatrevingt-dix \(\mathrm{1011010}_2\) \(\mathrm{10100}_3\) \(\mathrm{132}_8\) \(\mathrm{90}\) \(\mathrm{76}_{12}\) \(\mathrm{5A}_{16}\)
hundred cent \(\mathrm{1100100}_2\) \(\mathrm{10201}_3\) \(\mathrm{144}_8\) \(\mathrm{100}\) \(\mathrm{84}_{12}\) \(\mathrm{64}_{16}\)
Figure 11.4.7. Selected numbers in English, French, and bases \(2\text{,}\) \(3\text{,}\) \(8\text{,}\) \(10\text{,}\) \(12\text{,}\) \(16\)
The interactive tool in Figure 11.4.8 lets you explore how counting in other bases works.
Figure 11.4.8. Counting in other bases. Click on one of the numbers 2, 3, 4, …, to change the base. Click on +1, …, +10, … to increment both the representation of the number in the chosen base and base 10. Click on set to 0 to reset the numbers to \(0\text{.}\) Numbers without subscripts are understood to be in base 10 representation.