7.2: Number Bases
( \newcommand{\kernel}{\mathrm{null}\,}\)
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
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
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
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
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) |
Convert
Solution
Notice that
We write the remainders from bottom to top,
Conversion from binary to octal (base 8) and hexadecimal (base 16)
Convert
Solution
Arithmetic in other bases
Example
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
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
Find
Practical Uses
- Coding
- Time (24 hours) or (60)
- Baking (Dozen)
- Imperial or Metric measurement systems