What you'll learn
This revision guide covers how computers store and represent all types of data using binary digits. You'll learn to convert between number systems, understand how text and images are encoded digitally, and calculate storage requirements. These concepts are fundamental to understanding how all computer systems function and regularly appear in Paper 1 of the Pearson Edexcel International IGCSE Computer Science examination.
Key terms and definitions
Binary — a number system using only two digits (0 and 1), also known as base 2, used by all digital computers to represent data and instructions
Bit — the smallest unit of data in computing, representing a single binary digit that can be either 0 or 1
Byte — a group of 8 bits, the standard unit for measuring data storage and memory
Hexadecimal — a base 16 number system using digits 0-9 and letters A-F, commonly used as a shorthand for binary values
ASCII — American Standard Code for Information Interchange, a 7-bit character encoding standard representing 128 characters including letters, numbers and symbols
Unicode — an extended character encoding system supporting over 1 million characters from multiple languages and symbol sets worldwide
Pixel — the smallest addressable element in a digital image, short for "picture element"
Metadata — descriptive information about data, such as image dimensions, colour depth, creation date and file format
Core concepts
Binary number system
Computers use binary because electronic circuits have two stable states: on (1) and off (0). Each binary digit position represents a power of 2, reading from right to left.
Converting binary to denary:
- Write the place values: 128, 64, 32, 16, 8, 4, 2, 1
- Multiply each binary digit by its place value
- Add all the results together
Example: 10110101
- (1×128) + (0×64) + (1×32) + (1×16) + (0×8) + (1×4) + (0×2) + (1×1)
- 128 + 32 + 16 + 4 + 1 = 181
Converting denary to binary:
- Divide the number by 2 repeatedly
- Record remainders from bottom to top
- Or use place value method: subtract largest possible powers of 2
Example: Convert 205 to binary
- 205 ÷ 2 = 102 remainder 1
- 102 ÷ 2 = 51 remainder 0
- 51 ÷ 2 = 25 remainder 1
- 25 ÷ 2 = 12 remainder 1
- 12 ÷ 2 = 6 remainder 0
- 6 ÷ 2 = 3 remainder 0
- 3 ÷ 2 = 1 remainder 1
- 1 ÷ 2 = 0 remainder 1
- Reading upwards: 11001101
Binary addition:
Follow these rules:
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 10 (write 0, carry 1)
- 1 + 1 + 1 = 11 (write 1, carry 1)
Add column by column from right to left, carrying values as needed.
Hexadecimal number system
Hexadecimal uses 16 digits: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15). One hexadecimal digit represents exactly 4 binary bits, making it efficient for representing long binary numbers.
Why use hexadecimal:
- Shorter representation than binary (one hex digit = four binary digits)
- Easier for humans to read and remember than long binary strings
- Used in MAC addresses, IPv6 addresses, colour codes and memory dumps
- Reduces transcription errors when working with binary data
Converting between binary and hexadecimal:
Binary to hex: Group binary digits in sets of 4 from right to left, convert each group
- 11010110 = 1101 0110 = D6
Hex to binary: Convert each hex digit to its 4-bit binary equivalent
- A3 = 1010 0011
Converting hexadecimal to denary:
Multiply each digit by its place value (powers of 16: 256, 16, 1)
- 2F = (2×16) + (15×1) = 32 + 15 = 47
- B4 = (11×16) + (4×1) = 176 + 4 = 180
Converting denary to hexadecimal:
Divide repeatedly by 16, record remainders, read upwards
- 234 ÷ 16 = 14 remainder 10 (A)
- 14 ÷ 16 = 0 remainder 14 (E)
- Result: EA
Units of data storage
Understanding storage units is essential for calculating file sizes and system requirements.
| Unit | Equivalent | Abbreviation |
|---|---|---|
| Bit | 1 binary digit | b |
| Nibble | 4 bits | - |
| Byte | 8 bits | B |
| Kilobyte | 1024 bytes | KB |
| Megabyte | 1024 KB | MB |
| Gigabyte | 1024 MB | GB |
| Terabyte | 1024 GB | TB |
Note: 1 KB = 1024 bytes (not 1000) because computers use binary (2^10 = 1024)
Calculating storage requirements:
Multiply the number of items by the size of each item in the appropriate units.
Example: A database stores 50,000 customer records. Each record uses 2 KB. Calculate total storage needed.
- 50,000 × 2 KB = 100,000 KB
- 100,000 ÷ 1024 = 97.66 MB
Character encoding
Computers store text by assigning a unique binary code to each character.
ASCII encoding:
- Uses 7 bits, representing 128 characters (0-127)
- Includes uppercase letters (A-Z), lowercase letters (a-z), digits (0-9)
- Contains punctuation, mathematical symbols and control characters
- Extended ASCII uses 8 bits for 256 characters
- Each character requires 1 byte of storage
Common ASCII values to know:
- 'A' = 65 (01000001)
- 'a' = 97 (01100001)
- '0' = 48 (00110000)
- Space = 32 (00100000)
Unicode encoding:
- Extended character set supporting worldwide languages
- Includes Chinese, Arabic, Cyrillic, emoji and special symbols
- UTF-8: variable length (1-4 bytes per character), backwards compatible with ASCII
- UTF-16: uses 2 or 4 bytes per character
- UTF-32: uses 4 bytes for every character
- Essential for international software and multilingual documents
Storage calculations for text:
For ASCII: number of characters × 1 byte For Unicode (UTF-16): number of characters × 2 bytes (typically)
Example: "HELLO" in ASCII = 5 characters × 1 byte = 5 bytes = 40 bits
Image representation
Digital images are composed of pixels arranged in a grid. Each pixel's colour is stored as binary data.
Bitmap images:
- Store colour value for each individual pixel
- Higher resolution = more pixels = larger file size
- Quality depends on resolution and colour depth
Key image properties:
Resolution — the number of pixels in an image, usually expressed as width × height (e.g. 1920×1080)
Colour depth — the number of bits used to represent the colour of each pixel
Common colour depths:
- 1 bit: 2 colours (black and white)
- 8 bits: 256 colours
- 16 bits: 65,536 colours (high colour)
- 24 bits: 16,777,216 colours (true colour) — 8 bits each for red, green, blue
Calculating image file sizes:
Formula: Image size (bits) = width × height × colour depth
Convert to bytes by dividing by 8
Example: Calculate file size for 800×600 pixel image with 24-bit colour depth
- 800 × 600 × 24 = 11,520,000 bits
- 11,520,000 ÷ 8 = 1,440,000 bytes
- 1,440,000 ÷ 1024 = 1406.25 KB
- 1406.25 ÷ 1024 = 1.37 MB
Metadata in image files:
Bitmap images contain metadata including:
- Image dimensions (width and height in pixels)
- Colour depth (bits per pixel)
- Date and time created
- Camera settings (for photographs)
- File format and compression method
This metadata increases the actual file size beyond the calculated pixel data size.
Sound representation
Digital sound is created by sampling analogue audio waves at regular intervals.
Sample rate — the number of samples taken per second, measured in Hertz (Hz)
- CD quality: 44,100 Hz (44.1 kHz)
- Higher sample rate = better quality = larger file
Sample resolution (bit depth) — the number of bits used to store each sample
- 8 bits: 256 different amplitude values
- 16 bits: 65,536 different amplitude values
- Higher bit depth = better quality = larger file
Calculating sound file sizes:
Formula: File size (bits) = sample rate × bit depth × duration (seconds) × number of channels
Example: 3-minute stereo recording at 44.1 kHz with 16-bit depth
- 44,100 × 16 × 180 × 2 = 254,016,000 bits
- 254,016,000 ÷ 8 = 31,752,000 bytes
- 31,752,000 ÷ 1024 ÷ 1024 = 30.28 MB
Worked examples
Example 1: Number system conversions (4 marks)
(a) Convert the binary number 11011010 to denary. [2 marks]
Solution:
- 128 + 64 + 16 + 8 + 2 = 218 ✓✓
- (1 mark for method, 1 mark for correct answer)
(b) Convert the hexadecimal number 3E to binary. [2 marks]
Solution:
- 3 = 0011, E = 1110 ✓
- 00111110 ✓
- (1 mark for each correct 4-bit group)
Example 2: Image file size calculation (5 marks)
A photographer takes a photo with dimensions 2400 × 1600 pixels. The colour depth is 24 bits per pixel.
(a) Calculate the file size in megabytes. Show your working. [4 marks]
Solution:
- 2400 × 1600 × 24 = 92,160,000 bits ✓
- 92,160,000 ÷ 8 = 11,520,000 bytes ✓
- 11,520,000 ÷ 1024 = 11,250 KB ✓
- 11,250 ÷ 1024 = 10.99 MB (or 11 MB) ✓
(b) State one piece of metadata that would be stored with this image file. [1 mark]
Solution:
- Image dimensions / width and height ✓
- OR: colour depth ✓
- OR: date created ✓
- OR: file format ✓
- (Accept any valid metadata element)
Example 3: Character encoding (3 marks)
(a) Explain why Unicode was developed when ASCII already existed. [2 marks]
Solution:
- ASCII only supports 128 characters ✓
- Unicode supports characters from multiple languages/scripts worldwide / supports over 1 million characters ✓
- (Or: needed for international software / needed for emoji and special symbols)
(b) A text file contains 2500 characters stored in UTF-16 format. Calculate the file size in kilobytes. [1 mark]
Solution:
- 2500 × 2 = 5000 bytes
- 5000 ÷ 1024 = 4.88 KB ✓
Common mistakes and how to avoid them
Confusing 1 KB = 1000 bytes instead of 1024 bytes. Remember computers use binary: 2^10 = 1024. Always divide or multiply by 1024 when converting between KB, MB, GB.
Forgetting to convert bits to bytes in file size calculations. The formula gives bits — always divide by 8 to get bytes, then convert to KB/MB as needed.
Mixing up binary place values. The rightmost position is 1 (2^0), not the leftmost. Write out place values: 128, 64, 32, 16, 8, 4, 2, 1 before calculating.
Incorrect hexadecimal digit conversions. Remember A=10, B=11, C=12, D=13, E=14, F=15. Each hex digit converts to exactly 4 binary bits — add leading zeros if needed (e.g. 3 = 0011).
Not showing working in calculations. Examiners award method marks even if the final answer is wrong. Always show each step clearly.
Confusing sample rate with bit depth in sound calculations. Sample rate is how often you sample (Hz); bit depth is the quality of each sample (bits). You need both for file size calculations.
Exam technique for "Computer Systems: Data Representation"
Learn command words: "State" needs a brief fact (1 mark). "Calculate" requires numerical working (2-4 marks). "Explain" needs a reason or cause-effect relationship (2 marks). "Convert" requires showing the conversion method.
Show full working for all calculations. Write the formula, substitute values, show intermediate steps. Method marks are awarded even with arithmetic errors. Include units (bits, bytes, KB, MB) at each stage.
Double-check unit conversions. Questions often ask for answers in specific units (KB, MB, seconds). Converting to the wrong unit loses marks even with correct calculation. Circle the required unit in the question.
Practise conversions without a calculator. Paper 1 allows calculators, but being able to convert small binary/hex numbers mentally saves time. Know powers of 2 up to 256.
Quick revision summary
Data representation explains how computers store all information as binary. Master conversions between binary, denary and hexadecimal. Remember 1 byte = 8 bits, 1 KB = 1024 bytes. ASCII uses 1 byte per character; Unicode uses 2+ bytes. Image file size = width × height × colour depth (in bits) ÷ 8. Sound file size = sample rate × bit depth × duration × channels ÷ 8. Always show working in calculations and convert to requested units.