dcf.cymru stimulus sheet · Computer Science · Year 10
Lleisiau’r Cwm (Voices of the Valley): the digital archive brief
The project, the people and the files on this sheet are invented. The formulas, the storage units and the file types are real and are the ones in the GCSE Computer Science specification.
1. The project
Lleisiau’r Cwm is a volunteer group in the Cynon Valley. Local families have lent them old photographs, postcards, chapel records and recorded interviews with people who worked in the pits, the shops and the chapels. The volunteers want to:
- keep a master copy of every item at the best quality they can, so nothing is lost if the original fades or breaks;
- put web copies on a public website so anyone can look and listen;
- share everything through one cloud storage account. The group can only afford the 15 GB plan.
Gareth, the chair, writes: “We have no idea how big these files will be. Will it all fit? Should we squash the files, and will that spoil them?”
2. Storage units
Computer Science uses base 2 units: each step up is 1,024 times bigger, not 1,000.
| Unit | Size |
| bit | a single 0 or 1 |
| nibble | 4 bits |
| byte | 8 bits |
| kilobyte (KB) | 1,024 bytes |
| megabyte (MB) | 1,024 KB |
| gigabyte (GB) | 1,024 MB |
| terabyte (TB) | 1,024 GB |
| petabyte (PB) | 1,024 TB |
To go down a unit, multiply by 1,024 (or by 8 from bytes to bits). To go up a unit, divide by 1,024 (or by 8 from bits to bytes).
3. The formulas
Image size in bits = width in pixels × height in pixels × colour depth in bits
Sound size in bits = sample rate in Hz × bit depth × length in seconds
- Colour depth is the number of bits used for each pixel. 1 bit gives 2 colours (black or white). 8 bits gives 256 shades. 24 bits gives about 16.7 million colours.
- Sample rate is how many times a second the sound is measured. 48,000 Hz means 48,000 samples every second.
- Bit depth (for sound) is the number of bits used to store each sample.
- All the recordings on this sheet are mono (one channel), so the formula above is all you need. Ignore file headers and other extra data.
- After working out the bits, divide by 8 for bytes, then by 1,024 for KB, then by 1,024 again for MB.
4. The items to digitise
Photographs and documents, scanned
| Code | Item | Scan size (pixels) | Colour depth |
| P1 | Colliery band, 1950s, black and white print | 2,048 × 1,536 | 8 bits (256 shades of grey) |
| P2 | Colour postcard of Aberdare Park, 1970s | 1,600 × 1,024 | 24 bits |
| P3 | Handwritten page of chapel minutes, A4 | 2,480 × 3,508 | 1 bit (black or white only) |
| P4 | Small preview picture for the website | 320 × 240 | 24 bits |
Sound recordings, all mono
| Code | Item | Sample rate | Bit depth | Length |
| A1 | Interview with a retired miner | 48,000 Hz | 16 bits | 40 minutes |
| A2 | A choir singing one hymn | 44,100 Hz | 16 bits | 3 minutes |
| A3 | An old answerphone message | 8,000 Hz | 8 bits | 10 minutes |
5. What compression did
A volunteer saved P2 and A1 in different formats. The original is the uncompressed size from the formula.
| File | Format | Type of compression | Original | Compressed |
| P2 postcard | PNG | lossless | 4,800 KB | 2,400 KB |
| P2 postcard | JPEG | lossy | 4,800 KB | 480 KB |
| A1 interview | FLAC | lossless | 225,000 KB | 140,625 KB |
| A1 interview | MP3 | lossy | 225,000 KB | 37,500 KB |
- Lossless compression finds patterns and stores them more efficiently. When the file is opened, every bit of the original comes back exactly.
- Lossy compression throws away detail that people are less likely to notice, such as tiny colour changes or very high and very quiet sounds. That detail is gone for good.
- Compression ratio = original size : compressed size, written as something : 1. For example, 900 KB squashed to 300 KB is 900 ÷ 300 = 3 : 1.
- Reduction in file size = (original − compressed) ÷ original × 100. For the same example: 600 ÷ 900 × 100 = 66.7%.
6. The whole collection
- 1,200 photographs, each the same size as P2 (4,800 KB uncompressed).
- 60 interviews, each the same as A1 (225,000 KB uncompressed).
- The cloud account holds 15 GB. Everything, master copies and web copies, has to go in it.
- The group also owns a 256 GB external drive, kept in the chapel vestry.