Skip to main content
Mathematics LibreTexts

7.2: Number Bases

  • Page ID
    7608
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Definition:

    A number base is the number of digits or combination of digits that a system of counting uses to represent numbers. A base can be any whole number greater than 0. The most commonly used number system is the decimal system, commonly known as base 10. Its popularity as a system of counting is most likely due to the fact that we have 10 fingers.

    Example \(\PageIndex{1}\):

    The base of any number may be written beside the number. For example, 178 is read as 17 base 8, which is 15 in base 10.

    Conversion from decimal to other bases

    Example \(\PageIndex{2}\): Using positional notation

    Binary is the most commonly used non-base 10 system. It is used for coding in computers. Binary is also known as Base 2. This means it is composed of only 0's and 1's. For example 9 in binary/base 2 is 1001. Let's see how this works.

    Base 10 Base 2 24 23 22 21 20
    1 1 0 0 0 0 1
    9 1001 0 1 0 0 1
    16 10000 1 0 0 0 0

    Column 2 in the table above represents the binary representation of the decimal number shown in column 1. Columns 3-7 show the expansion of base 2. Note that leading zeros are not normally shown. The Binary system works similarly to the same way base 10 does, only smaller, therefore, requires more digits to make up the same number as in base 10. To illustrate, 1610 = 1(101) + 6(100) = 1(24) + 0(23) + 0(22) + 0(21) + 0(20).

    Example \(\PageIndex{3}\):using positional notation

    Look at Base 16, also known as the hexadecimal system, another common base when coding and using computer systems. In this case, we use the digits \(0-9\) and the letters representing two digits \(A(10), B(11), C(12), D(13), E(14), F(15).\)

    Base 10 Base 16 162 161 160
    100 064 0 6 4
    42 02A 0 2 A (10)
    124 07C 0 7 C (12)
    269 10D 1 0 D (13)

     

    Example \(\PageIndex{4}\):Using division by base

    Convert \(1065\) into base \(12.\)

    Solution

    Notice that \begin{align*}1065 &=(88)(12)+9\\&\\ 88&=(7)(12)+4\\ 7&=(0)(12)+7\end{align*}.

    We write the remainders from bottom to top, \(1065=749_{12}\).

     

    Conversion from binary to  octal (base 8) and hexadecimal (base 16)

    Example \(\PageIndex{5}\)

    Convert \(1010\) into base \(8\) and \(16.\)

    Solution

    \(12_8\) and \(A_{16}\)

    Arithmetic in other bases

    Example \(\PageIndex{6}\):

    Addition in Base 2:

    Cheat Table to help with Addition:
    0+0=0
    0+1=1
    1+0=1
    1+1=10

    Let's try it:

    110
    + 101
    1011
    =====

    Check: 1102 = 610
    1012 = 510
    10112 = 1110

    Therefore our addition is correct as 6 + 5 = 11 in base 10.

    Let's try another one:
    101012
    + 111012
    1100102
    ======

    Check: 101012 = 21
    111012 = 29
    1100102 = 50

    Therefore our addition in correct as 21 + 29 = 50 in base 10.

    Example \(\PageIndex{7}\):

    Subtraction in Base 2:

    Cheat table to help with subtraction:

    1-1=0
    0-0=0
    1-0=1
    0-1=1 * This requires a carry 10-1=1. As you will remember, 10 in base 2 is 2.

    Let's try it:
    101112
    - 101012
    000102
    =====

    Check: 101112 = 2310
    101012 = 2110
    000102 = 210

    Therefore, our subtraction is correct as 23 - 21 = in base 10.

    Example \(\PageIndex{8}\):

    Find \(203_5 + 124_5 \)

    \[ \begin{array}{ccc} &  2 & 0 & 3  \\ + & 1 & 2 & 4  \\ \hline & 3 & 3 & 2  \\ \end{array} \] Therefore, \[ 203_5 + 124_5 = 332_5. \]

     

    Practical Uses

    • Coding
    • Time (24 hours) or (60)
    • Baking (Dozen)
    • Imperial or Metric measurement systems

    This page titled 7.2: Number Bases is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Pamini Thangarajah.

    • Was this article helpful?