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

Stretch tasks Data Storage and Compression

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: Data Storage and Compression

Data Storage and Compression: the questions

Quiz Challenge, round 1: Quiz Blitz

  1. How many bytes are in a kibibyte?

  2. Why is 1024 used rather than 1000?

    • It was chosen at random
    • Memory is addressed in binary, and 1024 is 2 to the power 10
    • 1000 is too small
    • It is easier to divide by
  3. Which storage is volatile?

    • A hard disk drive
    • A solid state drive
    • A Blu-ray disc
    • RAM
  4. Why is a solid state drive faster than a hard disk drive?

    • It stores less data
    • It uses a laser
    • It has no moving head to position
    • It spins faster
  5. Which is the cheapest to post out to customers, disc by disc?

    • Magnetic
    • RAM
    • Optical
    • Solid state
  6. Lossy compression lets the original file be recovered exactly.

    • True
    • False
  7. Which file must use lossless compression?

    • A spreadsheet of exam results
    • A holiday photo
    • A music track
    • A film trailer
  8. Compress W W W W B B W W W W W W with run length encoding.

  9. Run length encoding always reduces file size.

    • True
    • False
  10. Which TWO are lossless formats?

    Tick 2.

    • PNG
    • ZIP
    • JPEG
    • MP3
    • MP4
  11. How many MiB is 3072 KiB?

  12. Which storage reads pits and lands with a laser?

    • RAM
    • Optical
    • Magnetic
    • Solid state

Quiz Challenge, round 2: Quick Fire

  1. Explain the difference between lossy and lossless compression. [2 marks]

  2. A travelling salesperson needs a laptop. Explain why solid state storage is a good choice. [2 marks]

  3. Explain why run length encoding works well on simple graphics but badly on photographs. [2 marks]

  4. A file is 6 MiB. How many KiB is that? Show your working. [2 marks]

Quiz Challenge, round 3: Big Think

  1. A film studio needs storage for a 50 TB archive of raw footage, for editors' workstations that load huge video files, and for sending review copies of a film to critics. Recommend a type of secondary storage for each, justifying your choices. [6 marks]

  2. A school sends three files by email: a photo of the school play, a spreadsheet of pupils' marks and a recording of the choir. Discuss which type of compression suits each file, and why compression is used at all. [6 marks]

This or That: tick the right answer

  1. Which loses its contents when the power is turned off?

    • A solid state drive
    • RAM
  2. Ten years of CCTV footage on a budget: magnetic or solid state?

    • Magnetic
    • Solid state
  3. Compressing a program file: lossy or lossless?

    • Lossy
    • Lossless
  4. A song for a phone: lossy or lossless?

    • Lossless
    • Lossy
  5. Does lossless compression remove data?

    • No: it stores it more efficiently
    • Yes: the least useful data
  6. Which suits distributing a film that must not be altered?

    • A USB flash drive
    • A read only optical disc
  7. How many KiB are in 1 MiB?

    • 1024
    • 1000
  8. W W B B B B in run length encoding?

    • 2W 4B
    • 4W 2B

Memory Match: match each term to its meaning

TermMeaning
A Volatile1 Spinning platters read by a moving head
B Magnetic storage2 Flash memory with no moving parts
C Solid state storage3 Pits and lands read by a laser
D Optical storage4 The original is recovered exactly
E Lossy compression5 Loses its contents without power
F Lossless compression6 Permanently removes less important data

Sort It: tick one box in each row

Which type of secondary storage does each describe?

StatementMagneticSolid stateOptical
Silent, durable and low power for laptops
A finite number of write cycles per cell
Low capacity and slow
Fast access wherever the data is stored
Fragile if moved while running
Slower, because the head must move to the data
Pits and lands read by a laser
Flash memory cells with no moving parts
Lowest cost per terabyte for big archives
Cheap to post out to customers
Data stored as magnetised regions
Read only formats cannot be altered
Answers

Round 1: Quiz Blitz

  1. 1024 Edexcel uses binary prefixes.
  2. Memory is addressed in binary, and 1024 is 2 to the power 10 1024 is the nearest power of two to a thousand.
  3. RAM RAM loses its contents when the power is removed.
  4. It has no moving head to position Access takes the same time wherever the data is stored.
  5. Optical CDs, DVDs and Blu-ray discs cost very little each.
  6. False It removes data permanently.
  7. A spreadsheet of exam results Losing any value would make the figures wrong.
  8. 4W 2B 6W Twelve values become three value and count pairs.
  9. False On data with no runs, the result is larger.
  10. PNG; ZIP FLAC is lossless too. JPEG and MP3 are lossy.
  11. 3 3072 / 1024 = 3.
  12. Optical CDs, DVDs and Blu-ray discs are optical.

Round 2: Quick Fire

    • Lossy permanently removes data
    • Lossless lets the original be reconstructed exactly
    Model answer

    Lossy compression permanently removes data judged less important, so the original cannot be recovered. Lossless compression stores the same information more efficiently, so the original file is reconstructed exactly.

    • No moving parts, so it survives being carried and knocked
    • Fast access and low power, so the battery lasts
    Model answer

    A solid state drive has no moving parts, so it survives being carried around and knocked. It is also faster to access and uses little power, so the laptop's battery lasts longer.

    • Simple graphics have long stretches of one colour, each stored as a value and a count
    • In photographs most runs have length 1, so the result can be larger
    Model answer

    Simple graphics have long stretches of the same colour, which each become one value and a count. In a photograph almost every pixel differs from the next, so most runs have length 1 and the encoded file can end up larger than the original.

    • Multiply by 1024
    • 6144 KiB
    Model answer

    1 MiB is 1024 KiB, so 6 x 1024 = 6144 KiB.

Round 3: Big Think

    • Archive: magnetic hard disk drives
    • Because of the low cost per terabyte and large capacity
    • Workstations: solid state drives
    • Because of the fastest access, so files load quickly
    • Review copies: optical discs
    • Because discs are cheap to post, and read only
    • A trade-off: solid state costs more per gigabyte
    • A trade-off: magnetic is slower, but the archive is rarely accessed
    Model answer

    For the 50 TB archive, magnetic hard disk drives, because they have the lowest cost per terabyte and very large capacities; they are slower, because a head must move, but archived footage is rarely accessed, so speed matters less. For the editors' workstations, solid state drives, because they have the fastest access, so huge video files load quickly; they cost more per gigabyte, but the editors' time is worth it. For the review copies, optical Blu-ray discs, because they are cheap per disc, easy to post, and read only, so critics cannot alter the film.

    • Compression makes files smaller: less storage, faster to send
    • The photo suits lossy compression such as JPEG
    • Because the eye barely notices the removed detail
    • The spreadsheet needs lossless compression such as ZIP
    • Because losing any value would make the figures wrong
    • The recording suits lossy compression such as MP3
    • Because the removed sounds cannot be heard
    • A conclusion on when each type fits
    Model answer

    Compression makes files smaller, so they need less storage, upload faster and use less bandwidth, and they may fit under the email attachment limit. The photo suits lossy compression such as JPEG, because the eye barely notices the fine colour detail that is removed, and the reduction is large. The spreadsheet must use lossless compression such as ZIP, because every value matters: losing any data would make the marks wrong. The choir recording suits lossy compression such as MP3, because it removes frequencies most people cannot hear. Overall, lossy fits whenever human perception will not notice the loss, and lossless whenever every bit matters.

This or That

  1. RAM RAM is volatile. Secondary storage keeps its data without power.
  2. Magnetic Cost per terabyte decides it, and an archive does not need the fastest access.
  3. Lossless Removing any byte would corrupt the program.
  4. Lossy MP3 removes sounds most people cannot hear, giving a much smaller file.
  5. No: it stores it more efficiently Lossless removes redundancy in how data is stored, so nothing is lost.
  6. A read only optical disc A read only disc cannot be changed, and each one is cheap to make and post.
  7. 1024 Every binary prefix step is 1024.
  8. 2W 4B Two whites, then four blacks: each run in order, with its count.

Memory Match

  • A 5 Volatile: Loses its contents without power
  • B 1 Magnetic storage: Spinning platters read by a moving head
  • C 2 Solid state storage: Flash memory with no moving parts
  • D 3 Optical storage: Pits and lands read by a laser
  • E 6 Lossy compression: Permanently removes less important data
  • F 4 Lossless compression: The original is recovered exactly

Sort It

  1. Solid state Silent, durable and low power for laptops Solid state suits portable devices.
  2. Solid state A finite number of write cycles per cell Flash cells wear out eventually.
  3. Optical Low capacity and slow Optical is the slowest and smallest of the three.
  4. Solid state Fast access wherever the data is stored No head to move means equal speed everywhere.
  5. Magnetic Fragile if moved while running Moving parts make hard disks fragile.
  6. Magnetic Slower, because the head must move to the data Only a hard disk has a moving head.
  7. Optical Pits and lands read by a laser That is a CD, DVD or Blu-ray disc.
  8. Solid state Flash memory cells with no moving parts That is a solid state drive.
  9. Magnetic Lowest cost per terabyte for big archives Magnetic drives win on cost per terabyte.
  10. Optical Cheap to post out to customers Optical discs cost very little each.
  11. Magnetic Data stored as magnetised regions That is a hard disk drive.
  12. Optical Read only formats cannot be altered Useful for distributing software or films.