Data Representation: Number systems

Number type Description Example
Natural numbers A natural number is a whole number used in counting ℕ = {0,1,2,...}
Integer numbers An integer number is a whole number either positive or negative ℤ = {...,-2,-1,0,1,2,...}
Rational numbers A rational number is any number that can be expressed directly as a fraction ℚ = {7/1,21/7,1/4,2/9,...}
Real numbers A real number is any number that can exist in the real world including irrational numbers e.g. π ℝ = {7,21/7,1/4,√2,π,...}
Ordinal numbers Ordinal numbers are used for giving the position of objects e.g. 1st, 2nd, 3rd, ...

Natural numbers tend to be used for counting, while real numbers are used for measurement.

Units of measurment

Historically the terms kilobyte, megabyte, etc have often been used when kibibyte, mebibyte, etc are meant. These are in fact different. One set uses binary prefixes and works in powers of 2 and the other uses decimal prfixes and works in powers of 10.

Binary Prefixes Decimal Prefixes
Name Symbol Number of bytes Name Symbol Number of bytes
kibibyte KiB 210 = 1024 kilobyte KB 103 = 1000
mebibyte MiB 220 = 1,048,576 megabyte MB 106 = 1,000,000
gibibyte GiB 230 = 1,073,741,824 gigabyte GB 109 = 1,000,000,000
tebibyte TiB 240 = 1,099,511,627,776 terabyte TB 1012 = 1,000,000,000,000

Knowledge check


Questions:
Correct:

Question text


© All materials created by and copyright S.Goff