User Tools

Site Tools


oer:amc:topics:numeral_systems:start

Positional Numeral System

The common numeral (or number) system we use for arithmetic is called the decimal system. The name indicates that it is based on powers of 10 or, in short, on the base 10 (English: ten, Latin: decem, Ancient Greek: deka). When we write $652$, we mean $2\cdot 10^0 + 5\cdot 10^1 + 6\cdot 10^2$. When we write $256$, we mean $6\cdot 10^0 + 5\cdot 10^1 + 2\cdot 10^2$.

A numeral is a single or combined symbol representing a number. A digt is an elementary numeral. Example: 652 is a numeral. It consists of the digits (elementary numerals or symbols) '6' (six), '5' (five), and '2' (two). The numeral 256 consists of the same set of digits, but in different order. The order of the digits matter! The position of a decimal place represents a power of 10. The '6' in 652 represents $6 \cdot 10^2 = 600$, whereas '6' in 256 denotes $6 \cdot 10^0 = 6$. The digits symbolize multipliers, the position the powers of 10 to multiply with.

In the decimal system (base 10) ten symbols are necessary to define ten multipliers, e.g. the symbol (aka digit) '5' means 'multiply by five'. The ten elementary symbols used in the decimal system are $\{0,1,2,3,4,5,6,7,8,9\}$. You need as many symbols (multipliers) as the value of the base, e.g. ten symbols in the decimal system (= base 10).

The most striking achievement in modern numeral systems is that the position of a symbol determines the power of 10 it has to be multiplied with. In the example $652$ the symbol $6$ at position 3 from the right has to be multiplied by $10^2$. The position is also known as decimal place.

This principle of base (or radix) and an associated set of digits can be extended to any base. Common numeral systems are:

  • Base 10: decimal
  • Base 2: binary
  • Base 16: hexadecimal

Decimal System, Base $10$

Elementary symbols, multipliers: $\{0,1,2,3,4,5,6,7,8,9\}$

Position $p$ $5$ $4$ $3$ $2$ $1$ $0$ . $-1$ $-2$
Decimal weight $w=10^{p}$ $10^5$ $10^4$ $10^3$ $10^2$ $10^1$ $10^0$ . $10^{-1}$ $10^{-2}$
before decimal point . after decimal point
Digit $a_5$ $a_4$ $a_3$ $a_2$ $a_1$ $a_0$ . $a_{-1}$ $a_{-2}$

Examples

$652_{10} = 2\cdot 10^0 + 5\cdot 10^1 + 6\cdot 10^2 = 2+50+600$

$53.71_{10} = 1 \cdot 10^{-2} + 7 \cdot 10^{-1} + 3 \cdot 10^{0} + 5 \cdot 10^{5} = 0.01+0.7+3+50$

General System, Base $b$

Elementary symbols, multipliers: set of $b$ elements.

Position $p$ $5$ $4$ $3$ $2$ $1$ $0$ . $-1$ $-2$
Decimal weight $w=b^{p}$ $b^5$ $b^4$ $b^3$ $b^2$ $b^1$ $b^0$ . $b^{-1}$ $b^{-2}$
before decimal point . after decimal point
Digit $a_5$ $a_4$ $a_3$ $a_2$ $a_1$ $a_0$ . $a_{-1}$ $a_{-2}$

$\mathrm{Value} = \sum_k a_k b^k$

Binary System, Base $2$

Elementary symbols, multipliers: $\{0,1\}$

Position $p$ $5$ $4$ $3$ $2$ $1$ $0$ . $-1$ $-2$
Decimal weight $w=2^{p}$ $2^5$ $2^4$ $2^3$ $2^2$ $2^1$ $2^0$ . $b^{-1}$ $b^{-2}$
before decimal point . after decimal point
Digit $a_5$ $a_4$ $a_3$ $a_2$ $a_1$ $a_0$ . $a_{-1}$ $a_{-2}$

Examples

$1010_2 = 0\cdot 2^0 + 1 \cdot 2^1 + 0 \cdot 2^2 + 1 \cdot 2^3 = 0\cdot 1 + 1 \cdot 2 + 0 \cdot 4 + 1\cdot 8 = 9_{10}$

$10.11_2 = 2 + 0 + 1/2 + 1/4 = 2 + 0.5 + 0.25 = 2.75_{10}$

Hexadecimal System, Base $16$

Elementary symbols, multipliers: $\{0,1,2,3,4,5,6,7,8,9,A(10),B(11),C(12),D(13),E(14),F(15)\}$

Position $p$ $5$ $4$ $3$ $2$ $1$ $0$ . $-1$ $-2$
Decimal weight $w=16^{p}$ $16^5$ $16^4$ $16^3$ $16^2$ $16^1$ $16^0$ . $16^{-1}$ $16^{-2}$
before decimal point . after decimal point
Digit $a_5$ $a_4$ $a_3$ $a_2$ $a_1$ $a_0$ . $a_{-1}$ $a_{-2}$

Examples

$12_{16} = 2\cdot 16^0 + 1 \cdot 16^1 = 17_{10}$

$\mathrm{E}_{16} = 14_{10}$

$\mathrm{FF_{16}} = 15\cdot 16 + 15 = 255_{10}$

$\mathrm{FFFF_{16}} = 15 \cdot 16^0 + 15 \cdot 16^1 + 15 \cdot 16^2 + 15 \cdot 16^3 = 65535_{10}$

$\mathrm{FFFF_{16}} = 10000_{16} - 1 = 16^4 - 1 = 65536 -1 = 65535_{10}$

Exercises

:!: Hint:
The website https://en.wikiversity.org/wiki/Numeral_systems shows algorithms to convert numeral systems, e.g. Dec to Hex or Dec to Bin.

Convert Hex, Dec, Bin

Hex Dec Bin
$\mathrm{F}$
$\mathrm{AA}$
$\mathrm{55}$
$123$
$1111$
$1111$
$1111$
$00111100$
$11000011$
oer/amc/topics/numeral_systems/start.txt · Last modified: 2024/04/16 19:56 by rolf