What you'll learn
This revision guide covers how computers represent and store all forms of data using binary digits. You'll master number system conversions, understand data storage units, and learn how characters, images and sound are encoded. These fundamental concepts underpin all computing systems and appear frequently in WJEC GCSE Computer Science examinations.
Key terms and definitions
Binary — a base-2 number system using only digits 0 and 1, which computers use because electronic circuits can easily represent two states (on/off)
Denary — the base-10 number system humans typically use, containing digits 0-9
Hexadecimal — a base-16 number system using digits 0-9 and letters A-F, commonly used as shorthand for binary values
Bit — the smallest unit of data in computing, representing a single binary digit (0 or 1)
Byte — a group of 8 bits, the standard unit for measuring data storage
ASCII — American Standard Code for Information Interchange, a character encoding standard using 7 or 8 bits to represent text characters
Unicode — an extended character encoding system that can represent characters from all writing systems worldwide, using 16 or 32 bits per character
Overflow error — occurs when a calculation produces a result too large to be represented with the available number of bits
Core concepts
Number systems and conversions
Computers operate using the binary system because digital circuits can only distinguish between two voltage states. Understanding conversions between binary, denary and hexadecimal is essential.
Binary to denary conversion:
Each binary digit represents a power of 2, starting from 2⁰ on the right. To convert binary to denary, add up the values of positions containing 1.
Position values (8-bit): 128, 64, 32, 16, 8, 4, 2, 1
Example: 10110101 in binary
- 128 + 0 + 32 + 16 + 0 + 4 + 0 + 1 = 181 in denary
Denary to binary conversion:
Use repeated division by 2, recording remainders from bottom to top, or subtract the largest possible power of 2 repeatedly.
Example: Convert 157 to binary
- 157 - 128 = 29 (bit 7 = 1)
- 29 - 16 = 13 (bit 4 = 1)
- 13 - 8 = 5 (bit 3 = 1)
- 5 - 4 = 1 (bit 2 = 1)
- 1 - 1 = 0 (bit 0 = 1)
- Result: 10011101
Hexadecimal system:
Hexadecimal uses 16 symbols: 0-9 for values zero to nine, then A-F for values ten to fifteen. Each hex digit represents exactly 4 binary bits (a nibble), making it useful for representing long binary sequences concisely.
Hex digit values: A=10, B=11, C=12, D=13, E=14, F=15
Binary to hexadecimal conversion:
Group binary digits into sets of 4 (from right to left), then convert each group to its hex equivalent.
Example: 11010110 in binary
- Split: 1101 0110
- 1101 = 13 = D in hex
- 0110 = 6 in hex
- Result: D6
Hexadecimal to binary conversion:
Convert each hex digit to its 4-bit binary equivalent.
Example: 3F in hexadecimal
- 3 = 0011 in binary
- F = 1111 in binary
- Result: 00111111
Hexadecimal to denary conversion:
Each position represents a power of 16. The rightmost position is 16⁰ (1), the next is 16¹ (16), then 16² (256), and so on.
Example: A7 in hexadecimal
- (A × 16) + (7 × 1)
- (10 × 16) + 7
- 160 + 7 = 167 in denary
Data storage units and calculations
Data storage is measured in increasingly large units based on powers of 2.
Standard units:
- 1 bit = single binary digit
- 1 nibble = 4 bits
- 1 byte = 8 bits
- 1 kilobyte (KB) = 1,024 bytes
- 1 megabyte (MB) = 1,024 KB = 1,048,576 bytes
- 1 gigabyte (GB) = 1,024 MB
- 1 terabyte (TB) = 1,024 GB
Note: Some specifications use 1,000 as the multiplier (decimal system), but WJEC typically expects binary calculations using 1,024.
File size calculations:
You must be able to calculate storage requirements for different data types.
Example: Calculate storage needed for a black-and-white image 200 pixels wide by 150 pixels high, where each pixel requires 1 bit.
- Total pixels: 200 × 150 = 30,000 pixels
- Storage in bits: 30,000 × 1 = 30,000 bits
- Convert to bytes: 30,000 ÷ 8 = 3,750 bytes
- Convert to KB: 3,750 ÷ 1,024 ≈ 3.66 KB
Character encoding
Computers must convert characters (letters, numbers, symbols) into binary codes for storage and processing.
ASCII encoding:
ASCII uses 7 bits to represent 128 different characters, including:
- Uppercase letters (A-Z)
- Lowercase letters (a-z)
- Digits (0-9)
- Punctuation marks and symbols
- Control characters (e.g., carriage return, tab)
Extended ASCII uses 8 bits (256 characters) to include additional symbols.
Each character has a unique code. For example:
- 'A' = 65 in denary = 01000001 in binary
- 'a' = 97 in denary = 01100001 in binary
- '0' = 48 in denary = 00110000 in binary
The consistent spacing between letters allows for alphabetical sorting and case conversion.
Unicode encoding:
ASCII cannot represent characters from non-Latin alphabets (Arabic, Chinese, Cyrillic, etc.) or many symbols. Unicode solves this by using 16 or 32 bits per character, allowing representation of over 1 million characters including:
- All world languages and scripts
- Emoji and special symbols
- Historical scripts
- Mathematical notation
Trade-offs:
- ASCII: Uses less storage (1 byte per character), sufficient for English text
- Unicode: Uses more storage (2-4 bytes per character), essential for international applications
Binary addition
Binary addition follows similar rules to denary addition, but only involves 0 and 1.
Binary addition 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)
Example: Add 01011010 and 00101101
01011010
+ 00101101
----------
10000111
Working through each column from right to left:
- 0 + 1 = 1
- 1 + 0 = 1
- 0 + 1 = 1
- 1 + 1 = 10 (write 0, carry 1)
- 1 + 0 + 1 (carried) = 10 (write 0, carry 1)
- 0 + 1 + 1 (carried) = 10 (write 0, carry 1)
- 1 + 0 + 1 (carried) = 10 (write 0, carry 1)
- 0 + 0 + 1 (carried) = 1
Overflow errors:
When adding binary numbers, if the result requires more bits than available, an overflow error occurs. With 8-bit numbers, any result exceeding 255 (11111111 in binary) causes overflow.
Example: 11111111 + 00000001 would equal 100000000 (9 bits), which cannot be stored in 8 bits.
Representing images
Digital images are stored as bitmaps or vectors. WJEC focuses primarily on bitmap images.
Bitmap images:
Images are divided into a grid of pixels. Each pixel's colour is stored as a binary value.
Key factors affecting image storage:
- Image resolution — number of pixels in an image (width × height)
- Colour depth — number of bits used to represent each pixel's colour
- File size — total storage required
Colour depth examples:
- 1 bit per pixel: 2 colours (black and white)
- 2 bits per pixel: 4 colours
- 8 bits per pixel: 256 colours
- 24 bits per pixel: 16,777,216 colours (true colour)
Calculating image file sizes:
File size (bits) = image width × image height × colour depth
Example: A 1024 × 768 image with 24-bit colour depth
- File size = 1024 × 768 × 24 = 18,874,368 bits
- Convert to bytes: 18,874,368 ÷ 8 = 2,359,296 bytes
- Convert to MB: 2,359,296 ÷ 1,024 ÷ 1,024 ≈ 2.25 MB
Metadata:
Image files include metadata such as:
- Image dimensions
- Colour depth
- Creation date and time
- Camera settings (for photographs)
- Author information
This information increases the actual file size beyond the calculated pixel data.
Representing sound
Sound is analogue (continuously varying). Computers must convert it to digital form through sampling.
Sound sampling process:
- Sampling — sound wave amplitude is measured at regular intervals
- Quantisation — each measurement is converted to the nearest digital value
- Encoding — digital values are stored as binary
Sample rate — the number of samples taken per second, measured in Hertz (Hz). Higher sample rates capture more detail.
- CD quality: 44,100 Hz (44.1 kHz)
- Professional audio: 96,000 Hz (96 kHz)
Sample resolution (bit depth) — the number of bits used to store each sample. Higher bit depth allows more precise amplitude measurements.
- 8-bit: 256 possible values
- 16-bit: 65,536 possible values
- 24-bit: 16,777,216 possible values
Calculating sound file sizes:
File size (bits) = sample rate × sample resolution × duration (seconds) × number of channels
Example: A 3-minute stereo recording at 44.1 kHz with 16-bit depth
- Duration in seconds: 3 × 60 = 180 seconds
- File size = 44,100 × 16 × 180 × 2 = 254,016,000 bits
- Convert to bytes: 254,016,000 ÷ 8 = 31,752,000 bytes
- Convert to MB: 31,752,000 ÷ 1,024 ÷ 1,024 ≈ 30.3 MB
Trade-offs in sound quality:
Higher sample rates and bit depths produce better quality audio but create larger files. Lower settings reduce quality but save storage space and bandwidth.
Worked examples
Example 1: Number system conversion (4 marks)
Question: Convert the hexadecimal value 2C into binary and then into denary. Show your working.
Mark scheme answer:
- 2C in hexadecimal to binary:
- 2 = 0010
- C = 1100
- Binary: 00101100 (1 mark)
- Binary 00101100 to denary:
- 32 + 8 + 4 = 44 (2 marks: 1 for method, 1 for correct answer)
- OR direct conversion from hex:
- (2 × 16) + (12 × 1) = 32 + 12 = 44 (1 mark for alternative method shown)
Example 2: Image storage calculation (5 marks)
Question: A digital camera takes photographs with a resolution of 3000 × 2000 pixels. Each pixel uses 24-bit colour depth. Calculate the file size of one photograph in megabytes. Show all working.
Mark scheme answer:
- Total pixels = 3000 × 2000 = 6,000,000 pixels (1 mark)
- Total bits = 6,000,000 × 24 = 144,000,000 bits (1 mark)
- Convert to bytes = 144,000,000 ÷ 8 = 18,000,000 bytes (1 mark)
- Convert to KB = 18,000,000 ÷ 1024 = 17,578.125 KB (1 mark)
- Convert to MB = 17,578.125 ÷ 1024 = 17.17 MB (1 mark)
Accept: 17.2 MB or 17 MB (rounded)
Example 3: Character encoding (3 marks)
Question: Explain why Unicode is used instead of ASCII for a mobile phone messaging application.
Mark scheme answer:
- ASCII only represents 128 (or 256) characters (1 mark)
- Unicode can represent over 1 million characters / characters from all languages / emoji (1 mark)
- Mobile phones need to display messages in multiple languages / international communication requires diverse character sets (1 mark)
Common mistakes and how to avoid them
Confusing the base of number systems — Remember: binary is base-2, denary is base-10, hexadecimal is base-16. Always label your working to avoid confusion.
Using 1000 instead of 1024 in storage calculations — WJEC expects binary calculations. 1 KB = 1,024 bytes, not 1,000 bytes. Check the question carefully as some contexts may specify otherwise.
Forgetting to divide by 8 when converting bits to bytes — File size calculations often require this step. Always check whether the answer needs to be in bits, bytes, KB, MB or GB.
Mixing up sample rate and sample resolution — Sample rate is how often you sample (measured in Hz), sample resolution is how many bits per sample. Both affect file size but describe different aspects of digital audio.
Not showing working in calculations — Even if your final answer is wrong, you can earn method marks. Always show clear step-by-step calculations.
Misunderstanding overflow errors — Overflow occurs when a result is too large for the available bits, not when individual numbers are too large before calculation.
Exam technique for "Computer Systems: Representation of Data"
Command words matter — "Calculate" requires showing working for full marks. "State" needs a brief answer. "Explain" requires reasoning and context, typically worth 2-3 marks per point.
Use the mark allocation as a guide — A 4-mark question typically requires four distinct points or a multi-step calculation. Don't write extensively for 1-mark questions.
Show all calculation steps — Write out conversions between units clearly. Even with calculator use, showing 30,000 ÷ 8 = 3,750 then 3,750 ÷ 1,024 demonstrates understanding and earns method marks.
Be precise with terminology — Use "denary" not "decimal" when referring to base-10 numbers. Use "sample rate" and "sample resolution" correctly. Examiners expect accurate technical vocabulary.
Quick revision summary
Computers use binary (base-2) because circuits distinguish between two states. Master conversions between binary, denary and hexadecimal. Data storage units progress in multiples of 1,024: bits, bytes, KB, MB, GB, TB. ASCII uses 8 bits per character for basic text; Unicode uses 16-32 bits for international characters. Calculate image file sizes using width × height × colour depth. Sound file sizes depend on sample rate × sample resolution × duration × channels. Binary addition follows place-value rules with carrying. Overflow errors occur when results exceed available bits.