Pearson Edexcel 1CP2 GCSE Computer Science · Topic 2: Data

Stretch tasks Representing Text, Images and Sound

Task 1

Quiz Challenge

A quiz game against four computer players, then short and long written answers.

  1. Quiz Blitz12 questions against the clock
  2. Quick Fire4 short answers
  3. Big Think2 long answers

About 20 minutes

Task 2

This or That

Pixel the cat asks 8 questions. Each has two answers: pick the right one.

  • Two answers to every question
  • A fish treat for every right answer
  • Streaks win Pixel shades, then a party hat

About 4 minutes

Task 3

Memory Match

Flip the cards two at a time to match each term card to its meaning card.

  • 12 cards: each term has a meaning
  • One peek at every card
  • Combo points for pairs found in a row

6 pairs, about 4 minutes

Task 4

Sort It

Sort each statement into the right box, like the tick-box tables in the exam.

  • 12 cards to sort into 3 boxes
  • Drag a card, tap a box or press its number
  • Combo points for cards sorted in a row

12 cards, about 4 minutes

The games need JavaScript. Every question is below, with the answers at the end.

Read the lesson: Representing Text, Images and Sound

Representing Text, Images and Sound: the questions

Quiz Challenge, round 1: Quiz Blitz

  1. How many codes does 7 bit ASCII have?

    • 256
    • 127
    • 65536
    • 128
  2. 'A' is 65 in ASCII. What is 'D'?

  3. 'a' is 97 and 'A' is 65. A lower case code is the upper case code plus what?

  4. Why does Unicode exist?

    • ASCII has no codes for most of the world's writing systems
    • ASCII is too slow
    • Unicode uses fewer bits
    • ASCII cannot store digits
  5. The first 128 Unicode codes are the same as ASCII.

    • True
    • False
  6. A 500 character message is stored in 8 bit ASCII. How many bytes is it?

  7. What does colour depth measure?

    • The file format
    • Bits used per pixel
    • The number of pixels
    • How bright the image is
  8. How many colours can 4 bit colour depth show?

  9. What is the size, in bits, of a 100 by 50 image with 8 bit colour?

  10. Why is metadata such as the width needed?

    • It makes the image brighter
    • It compresses the image
    • It stores the colours
    • Without it, software cannot tell where each row ends
  11. What does a higher sample rate do?

    • Adds more channels
    • Reduces the file size
    • Takes more samples per second, so rapid changes survive
    • Makes the sound louder
  12. Which TWO increase the size of a sound file?

    Tick 2.

    • Mono instead of stereo
    • Lossy compression
    • A higher sample rate
    • A greater bit depth
    • A shorter recording

Quiz Challenge, round 2: Quick Fire

  1. Explain why the character '7' cannot be used directly in a calculation. [2 marks]

  2. Explain one advantage and one disadvantage of Unicode compared with ASCII. [2 marks]

  3. Explain how increasing the colour depth of an image affects its quality and file size. [2 marks]

  4. A recording is made in mono at 8 bit depth. Explain two changes that would make it more faithful to the original sound. [2 marks]

Quiz Challenge, round 3: Big Think

  1. Calculate the file size, in MiB, of a 1024 by 768 image with 24 bit colour depth. Show your working. [6 marks]

  2. A podcast is recorded in stereo at 44 100 Hz with a 16 bit depth. Discuss how the sample rate, bit depth and number of channels affect its quality and file size, and why the file might be compressed before being put online. [6 marks]

This or That: tick the right answer

  1. Which can store Chinese characters and emoji?

    • Unicode
    • ASCII
  2. Standard ASCII: 7 bit with 128 codes, or 8 bit with 256?

    • 7 bit, 128 codes
    • 8 bit, 256 codes
  3. 'a' is 97. What is 'c'?

    • 67
    • 99
  4. More pixels in the same picture: higher or lower resolution?

    • Higher
    • Lower
  5. How many colours does 1 bit colour depth give?

    • 2
    • 1
  6. In a sound file size calculation, is the duration in minutes or seconds?

    • Seconds
    • Minutes
  7. Stereo instead of mono: what happens to the file size?

    • It doubles
    • It halves
  8. Edexcel unit conversions: divide by 1000 or 1024?

    • 1024
    • 1000

Memory Match: match each term to its meaning

TermMeaning
A Character set1 Bits per pixel
B Pixel2 Data about the file, such as its width
C Colour depth3 Samples taken each second
D Metadata4 Bits stored for each sample
E Sample rate5 The smallest dot in a bitmap
F Bit depth6 A code for every character

Sort It: tick one box in each row

Is each idea about representing text, images or sound?

StatementTextImagesSound
Unicode covers every writing system
The wave is measured at regular intervals
Colour depth: bits per pixel
Metadata says where each row ends
Size = rate x depth x seconds x channels
Sample rate in hertz
Size = width x height x colour depth
'A' is 65 and 'a' is 97
Size = characters x bits per character
Stereo stores two channels
Resolution: width by height
A 7 bit code for each character
Answers

Round 1: Quiz Blitz

  1. 128 2 to the power 7 = 128. Extended ASCII uses 8 bits for 256.
  2. 68 Codes are in order: A 65, B 66, C 67, D 68.
  3. 32 97 - 65 = 32.
  4. ASCII has no codes for most of the world's writing systems Unicode has room for over a million characters.
  5. True So every ASCII file is already valid Unicode.
  6. 500 500 x 8 = 4000 bits, which is 500 bytes.
  7. Bits used per pixel It decides how many colours each pixel can be.
  8. 16 2 to the power 4 = 16.
  9. 40000 100 x 50 x 8 = 40 000 bits.
  10. Without it, software cannot tell where each row ends The pixels are stored as one long sequence.
  11. Takes more samples per second, so rapid changes survive The staircase follows the wave more closely.
  12. A higher sample rate; A greater bit depth Size = sample rate x bit depth x seconds x channels.

Round 2: Quick Fire

    • '7' is stored as its character code, 55
    • It must be converted to a number first
    Model answer

    The character '7' is stored as its ASCII code, 55, not the number 7. It must be converted to an integer first, for example by subtracting 48 from its code.

    • It covers every writing system and emoji
    • It needs more bits per character, so files can be larger
    Model answer

    Unicode has room for over a million characters, so it covers every writing system, such as Arabic and Chinese, and emoji. However, characters outside the basic set need more bits, so the same text can take up more storage.

    • Each pixel can be more colours, so it looks more realistic
    • Each pixel needs more bits, so the file is larger
    Model answer

    Each pixel can be one of more colours, so the image looks more realistic, with smoother shading. But every pixel needs more bits, so the file is larger.

    • Raise the sample rate, so more samples are taken per second
    • Raise the bit depth to 16 bits, so each sample is rounded less
    Model answer

    Increase the sample rate, so more samples are taken per second and rapid changes in the wave are captured. Increase the bit depth to 16 bits, so each sample has 65536 levels and is rounded less.

Round 3: Big Think

    • Size = width x height x colour depth
    • 786 432 pixels
    • 18 874 368 bits
    • Divide by 8 for bytes
    • 2 359 296 bytes
    • Divide by 1024 for each larger unit
    • 2304 KiB
    • 2.25 MiB
    Model answer

    Size in bits = width x height x colour depth. Pixels = 1024 x 768 = 786 432. Bits = 786 432 x 24 = 18 874 368 bits. Divide by 8 to get 2 359 296 bytes. Divide by 1024 to get 2304 KiB, and divide by 1024 again to get 2.25 MiB.

    • Sampling measures the wave at regular intervals
    • A higher sample rate captures rapid changes and high frequencies
    • A greater bit depth gives more levels, so less rounding
    • Stereo stores two channels, doubling the data
    • Size = sample rate x bit depth x seconds x channels
    • Better quality always means a larger file
    • Compression makes it download or stream faster
    • Lossy compression suits it, because listeners will not notice
    Model answer

    Sampling measures the height of the sound wave at regular intervals. A higher sample rate takes more samples per second, so rapid changes and high frequencies survive. A greater bit depth gives more levels, 65536 at 16 bits, so each sample is rounded less and the recording is more faithful. Stereo stores two channels, which doubles the data. The size in bits is sample rate x bit depth x seconds x channels, so every improvement in quality makes the file larger. Before going online, the file would be compressed so it downloads faster and uses less bandwidth when streaming. Lossy compression such as MP3 suits a podcast, because listeners cannot hear the sounds it removes.

This or That

  1. Unicode ASCII only covers English letters, digits, punctuation and control characters.
  2. 7 bit, 128 codes Extended ASCII is the 8 bit version with 256 codes.
  3. 99 Codes run in order: a 97, b 98, c 99. 67 is the code for 'C'.
  4. Higher Resolution is the number of pixels, so more pixels means more detail and more data.
  5. 2 2 to the power 1 = 2, such as black and white.
  6. Seconds The sample rate is per second, so convert minutes to seconds first.
  7. It doubles Two channels are stored instead of one.
  8. 1024 Edexcel uses binary prefixes: a kibibyte is 1024 bytes.

Memory Match

  • A 6 Character set: A code for every character
  • B 5 Pixel: The smallest dot in a bitmap
  • C 1 Colour depth: Bits per pixel
  • D 2 Metadata: Data about the file, such as its width
  • E 3 Sample rate: Samples taken each second
  • F 4 Bit depth: Bits stored for each sample

Sort It

  1. Text Unicode covers every writing system Unicode is a character set for text.
  2. Sound The wave is measured at regular intervals That is sampling sound.
  3. Images Colour depth: bits per pixel Colour depth belongs to images.
  4. Images Metadata says where each row ends Without the width, a bitmap cannot be rebuilt.
  5. Sound Size = rate x depth x seconds x channels That is the sound file size formula.
  6. Sound Sample rate in hertz Samples per second belong to sound.
  7. Images Size = width x height x colour depth That is the image file size formula.
  8. Text 'A' is 65 and 'a' is 97 Character codes represent text.
  9. Text Size = characters x bits per character That is the text file size formula.
  10. Sound Stereo stores two channels Channels belong to sound.
  11. Images Resolution: width by height Resolution counts an image's pixels.
  12. Text A 7 bit code for each character That is ASCII, a character set for text.