Everything a computer stores is ultimately binary. This outcome covers how numbers, characters and larger structures are represented, and how much space they take.
| Unit | Size | Note |
|---|---|---|
| Bit | A single 0 or 1 | The smallest unit |
| Nibble | 4 bits | Exactly one hexadecimal digit |
| Byte | 8 bits | One ASCII character; 256 possible values |
| KB / MB / GB / TB | ×1 000 each (decimal) | Manufacturers use 1 000; RAM is quoted in powers of 1 024 |
Three number systems appear in the exam: decimal (base 10), binary (base 2) and hexadecimal (base 16). Hex is a shorthand for binary — one hex digit is exactly four bits, which is why colour codes and memory addresses use it.
Example
Decimal 45 to binary: 45 ÷ 2 = 22 r 1 (least significant bit) 22 ÷ 2 = 11 r 0 11 ÷ 2 = 5 r 1 5 ÷ 2 = 2 r 1 2 ÷ 2 = 1 r 0 1 ÷ 2 = 0 r 1 (most significant bit) Read the remainders upwards: 101101 Check: 32 + 8 + 4 + 1 = 45 ✓ Binary 101101 to hex: group in fours from the right 0010 1101 -> 2 D -> 2D
| Type | Typical size | Holds |
|---|---|---|
| Integer | 4 bytes | -2 147 483 648 to 2 147 483 647 |
| Real / Double | 8 bytes | Fractional values, with rounding error |
| Char | 1-2 bytes | One character |
| Boolean | 1 byte | True or False |
| String | 1 byte per char + overhead | Text of any length |
💡 Exam Tip
'a' - 'A' = 32 in ASCII, which is why adding or subtracting 32 converts case. Exam questions love this.