1.1 Data Representation

Show All Section Notes

Number systems

1. The Concept of Base

A number system is defined by its base (or radix), which dictates the number of unique digits available and the positional value of each digit.

The Rule: For any system with base $n$, the digits range from $0$ to $n-1$. For example, Base 2 (Binary) uses only $0$ and $1$.

2. Key Systems Comparison

System Base Digits/Symbols Primary Purpose
Denary 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Human-centric calculations.
Binary 2 0, 1 Internal processing (Logic gates/Transistors).
Hexadecimal 16 0-9 and A-F Memory addresses, Color codes (HTML), MAC addresses.

3. Binary (Base 2)

Computers use binary because they are made of electronic circuits that can only exist in two states: High Voltage (1) or Low Voltage (0).

Place Values

Binary values are calculated using powers of 2. For a standard 8-bit byte:

2726252423222120
1286432168421

4. Hexadecimal (Base 16)

Hexadecimal uses 16 symbols. After 9, we use letters to represent values from 10 to 15:

A=10 | B=11 | C=12 | D=13 | E=14 | F=15

Why do we use Hex?

Many students mistakenly think computers "understand" Hex. They do not. We use it for the following human-centric reasons:

  • Readability: It is much easier to read 3F than 00111111.
  • Efficiency: It is faster to type and takes up less screen space.
  • Error Reduction: Humans are less likely to make mistakes when copying Hex compared to long strings of 1s and 0s.
  • Easy Mapping: One Hex digit perfectly represents exactly one nibble (4 bits).

5. Data Storage Units

The IGCSE syllabus requires knowledge of the difference between Base 10 (Metric) and Base 2 (IEC) units:

  • Bit: The smallest unit of data.
  • Byte: 8 bits.
  • Kibibyte (KiB): 1024 bytes ($2^{10}$).
  • Mebibyte (MiB): 1024 KiB ($2^{20}$).
  • Gibibyte (GiB): 1024 MiB ($2^{30}$).