We will study how unsigned integer numbers are represented inside a computer next
Important fact:
|
Universal way to represent unsigned integer values:
This way to represent numeric values is cultural independent !!!
The Ancient Romans use (some) of the letters of the alphabet to represent numeric values:
I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII, XIII, XIV, XV, .... I = one V = five X = ten L = fifty C = one hundred D = five hundred M = one thousand |
The Chinese use the following characters (symbols) represent numeric values:
The Egyptians use the following characters (symbols) represent numeric values:
= 1 | = 10 | = 100 | = 1000 | ||||
= 10000 | = 100000 | = 1000000 |
2 types of representation systems for (unsigned) integers:
|
In non-positional representation:
|
Example: Roman Numbers
I = one V = five X = ten L = fifty C = hundred |
In positional representation:
|
Example: Decimal Numbers
in 12 the value of the digit 2 is two in 24 the value of the digit 2 is twenty |
Diadvantage:
|
Example: Romans do not perform additions like this:
MVL + CXII ------- |
Addition can be performed easily in a positional representation