🔢 Paper 1 · Topic 2: Data Representation
2.1f Character Encoding, Images & Sound
Edexcel 1CP2 · GCSE Computer Science · ~14 min read · 🔒 Pro
Notes
──
Video
──
Slides
──
Worksheet
──
Quiz

Character Encoding: ASCII

ASCII (American Standard Code for Information Interchange) assigns a unique 7-bit binary number to each character. It covers 128 characters (0–127), including uppercase/lowercase letters, digits, punctuation, and control characters.

CharacterASCII (Denary)Binary
'A'6501000001
'a'9701100001
'0'4800110000
Space3200100000

Key relationships: uppercase 'A'–'Z' = 65–90; lowercase 'a'–'z' = 97–122. Adding 32 to an uppercase ASCII value gives the lowercase equivalent.

Unicode

Unicode is an extension of ASCII that can represent characters from all world languages, emojis, and special symbols. It uses more bytes per character:

  • UTF-8: 1–4 bytes per character (compatible with ASCII for the first 128 characters)
  • UTF-16: typically 2–4 bytes per character
  • Unicode supports over 1 million characters vs ASCII's 128

Bitmap Images

A bitmap stores an image as a grid of pixels. Each pixel is stored as a binary value representing its colour.

  • Pixel: the smallest element of a digital image
  • Resolution: number of pixels (width × height); higher resolution = more detail
  • Colour depth: number of bits used per pixel; more bits = more colours
Colour depth (bits)Colours possibleExample
12¹ = 2Black & white
82⁸ = 256Early GIF
242²⁴ = 16,777,216True colour

File size formula: width × height × colour depth ÷ 8 = bytes

Example: 200×150 pixels, 24-bit colour → 200 × 150 × 24 ÷ 8 = 900,000 bytes ≈ 879 KiB

Digital Sound

Sound is an analogue wave. To store it digitally, it must be sampled:

  • Sample rate: number of samples per second (Hz). CD quality = 44,100 Hz
  • Bit depth (sample resolution): bits used per sample. CD quality = 16-bit
  • Higher sample rate and bit depth = better quality but larger file size

File size formula: sample rate × bit depth × duration (seconds) ÷ 8 = bytes

For stereo, multiply by 2 (2 channels).

Example: 44,100 Hz × 16-bit × 10 s ÷ 8 = 882,000 bytes ≈ 861 KiB (mono)

Exam tip: Know the ASCII values for 'A' (65) and 'a' (97). For images: file size = width × height × colour depth ÷ 8 bytes. For sound: file size = sample rate × bit depth × seconds ÷ 8 bytes (× 2 for stereo). Always include units in your working.
⚠️ Common Mistakes
  • Forgetting to divide by 8 when converting bits to bytes in file size calculations
  • Not doubling for stereo sound files
  • Confusing ASCII (128 chars, 7-bit) with Unicode (millions of chars, variable bytes)
  • Confusing resolution (number of pixels) with colour depth (bits per pixel)
Video coming soon
Click slide or press arrow keys to navigate
✍️

Worksheet — 2.1f Character Encoding, Images & Sound

8 Edexcel-style questions · AI-marked

Q1State the ASCII code for 'A' and 'a' in denary, and explain the relationship between them.[3]
✅ Mark scheme
'A' = 65 [1]; 'a' = 97 [1]; lowercase = uppercase + 32 [1].
Q2State two advantages of Unicode over ASCII.[2]
✅ Mark scheme
Any two: supports more characters (over 1 million vs 128) [1]; supports all world languages and scripts [1]; includes emojis and special symbols [1].
Q3Define the term 'colour depth' and explain how it affects file size.[2]
✅ Mark scheme
Colour depth = number of bits used to represent each pixel's colour [1]; more bits per pixel means more possible colours and a larger file size [1].
Q4Calculate the file size of a 1024×768 pixel image with 24-bit colour depth. Give your answer in MiB.[3]
✅ Mark scheme
1024×768×24=18,874,368 bits [1]; ÷8=2,359,296 bytes [1]; ÷1024÷1024≈2.25 MiB [1].
Q5Explain what 'sample rate' means in digital audio.[2]
✅ Mark scheme
Sample rate is the number of times per second the sound wave is measured (sampled) [1]; higher sample rate = more accurate/better quality digital reproduction [1].
Q6Calculate the file size of a 30-second stereo audio recording at 44,100 Hz, 16-bit depth. Give your answer in MiB.[3]
✅ Mark scheme
44100×16×30×2=42,336,000 bits [1]; ÷8=5,292,000 bytes [1]; ÷1024÷1024≈5.05 MiB [1].
Q7A 1-bit image has 2 possible colours. How many colours can a 4-bit image represent?[1]
✅ Mark scheme
2⁴ = 16 colours [1].
Q8State one way to reduce an image file size without using compression.[1]
✅ Mark scheme
Any one: reduce resolution (width/height) [1] OR reduce colour depth (fewer bits per pixel) [1].
Topic Quiz
Q 1 of 15
You scored
out of 15
⚡ XP
Click to reveal definition
🎉
Session complete!
TermDefinition
🎯

Mini Test — Encoding, Images & Sound

Timed exam-style test.

← 2.1e Data UnitsTopic 2Next: 2.2a Variables & Data Types →
🔒

Unlock Pro

Subscribe to access all 59 Edexcel 1CP2 lessons.

£7.99/month
or £59/year
Subscribe →