User Tools

Site Tools


oer:amc:topics:numeral_systems:start

This is an old revision of the document!


Positional Numeral System

The common numeral system we use for calculation is called decimal system, which means it is based on powers of 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$.

Ten symbols are necessary to define ten multipliers, e.g. the symbol (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\}$.

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 digit.

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.1713294932.txt.gz · Last modified: 2024/04/16 19:15 by rolf