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.
Example \(\PageIndex{2}\):
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}\):
Let's 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}\):
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{5}\):
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 out subtraction is correct as 23 - 21 = in base 10.
Example \(\PageIndex{6}\):
What if we were to make our own number system, that only had even numbers and 1. Let's call it, only even system. What would this look like?
Let us use {1, 2, 4, 6, 8, ... } with multiplication.
1 | 2 | 4 | 6 | 8 | |
1 | 1 | 2 | 4 | 6 | 8 |
2 | 2 | 4 | 8 | 12 | 16 |
4 | 4 | 8 | 16 | 24 | 32 |
6 | 6 | 12 | 24 | 36 | 48 |
8 | 8 | 16 | 32 | 48 | 64 |
If we are only working in a number system that has even numbers and 1, what numbers would be prime?
Examples of prime numbers in the only even number system would be 2, 6, 10, 14, 18, 22. Notice how numbers that are not usually prime become prime as in the base 10 system they would be made up of odd numbers.
In this system is unique prime factorization possible? No, in an only even number system not all numbers would be made up of prime numbers.
The prime divisibility theorem fails.
Counter example:
\(36=(6)(6)=(2)(18)\).
Practical Uses
- Coding
- Time (24 hours) or (60)
- Baking (Dozen)
- Imperial or Metric measurement systems