9. Numeral systems
Exercises
Base number
Numeral systems are named according to their base number. The base number also determines the types of numbers that can be formed in the numeral system.
The base number tells which numbers the numeral system contains
If the base number of a numeral system is the natural number [[$ <em>n $]], the following numbers can be part of the numeral system: [[$ 0,1, 2, 3, ..., n-1 $]]
The most common numeral system is the decimal system. The base number of the decimal system is 10, and the numbers 0 ... 9 appear in it. In the decimal system, each number can be written using a scientific expression. In calculators, the decimal system is denoted by the abbreviation DEC.
Example 1
The number 374 can be written in the form
[[$ 3 \cdot 100 + 7 \cdot 10 + 4 \cdot 1 \qquad $]] or [[$ \qquad 3 \cdot 10^2 + 7 \cdot 10^1 + 4 \cdot 10^0 $]]-Subscripts
The binary system (BIN) is commonly used in computer science. Computers can handle only two different states: a de-energized state or an energized state. These states can be described with the numbers 0 and 1. The base number of the binary system is 2, and its only numbers are 0 and 1. In a binary system, each number can be represented as the power of number 2. The position of zero or one indicates how large the number is.
power form | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
value | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 |
Subscripts in numbers
The numeral system that is used can be expressed by using a subscript: 1012 (binary) or 510 (decimal)
Note! Because the decimal system is the most common numeral system, its numbers do not normally require the use of a subscript.
Example 2
Convert the binary number 101101 to the decimal system.
[[$ \begin{align} & 1 \cdot 2^5 + 0 \cdot 2^4 + 1 \cdot 2^3 + 1 \cdot 2^2 + 0 \cdot 2^1 + 1 \cdot 2^0 \\ & = 1 \cdot 32 + 0 \cdot 16 + 1 \cdot 8 + 1\cdot4 + 0\cdot2 + 1\cdot1 \\ & =32 + 8 + 4+ 1 \\ & = 45 \end{align} $]]Answer: 1011012 = 4510
Example 3
Convert the number 83 from the decimal system into the binary system.
- Let us first take the largest power of two that is [[$ \leq 83. \text{ } 2^6 = 64 \leq 83 $]].
- Subtract this from the variable[[$ 83-64 = 19 $]].
- The maximum power of two, which is[[$ \leq 19 $]], is [[$ 2^4 = 16 $]].
- Subtract this from the variable number[[$ 19-16 = 3 $]].
- The maximum power of two, which is [[$ \leq 3 $]], is [[$ 2^1 = 2 $]].
- [[$ 3-2 = 1 $]], so the last power of the two is [[$ 2^0 = 1 $]].
- Powers [[$ 2^6, 2^4, 2^1 $]] and [[$ 2^0 $]] will be replaced by a number 1 in the binary format and the places between them will be filled with zeros.
-
The binary number is 1010011