Exercise 1
Name:
Date Today:
1. A camera detector has an array of 2048 by 3072 pixels and uses a colour depth of 32 bits.
The camera has a 64GiB memory capacity. Calculate how many typical images could be stored on the
camera. 5 Points
2. A sound source is being sampled at 20 000 samples per second.
The sampling resolution used is 32 bits.
a. Give one advantage of using 32 bits rather than 8 bits. 2 points
b. Give one disadvantage of using 32 bits rather than 8 bits. 2 points
c. Estimate the file size if a 30 second sound sample was being recorded. Give your answer in MiB.
3 points
3. An ancient Roman mosaic was being scanned by archaeologists and the pattern saved on a computer.
Each black tile has the binary value 0 and each white tile has the binary value 1.
a) What is the file size of the raw data? 2 points
b) Describe how run length encoding (RLE) could be used to reduce the size of the raw file. Your
answer should include calculations to show how the file size could be reduced. 6 points
Problem 1 Solution 5 Points
Step 1: Number of bits = 2048 × 3072 × 32 = 201 326 592 bits
Step 2: Divide by 8 to convert to bytes = 25 165 824 bytes
Step 3: Camera memory size in bytes = 64 × 1024 × 1024 × 1024 = 68 719 476 736
Step 4: Number of images = (68 719 476 736) ÷ (25 165 824) = 2730 images
Problem 2 Solution
a. Using 32 bits increases accuracy of digital sound representation. 2 points
b. Using 32 bits increases the amount of memory/storage required to store sound samples
It also takes longer to upload/download files or to send sound as email attachments 2 points
c. File size = sampling rate x sampling resolution x sample length 3 points
= 20000 x 32 x 30 = 19 200 000 bits / 8
= 2 400 000 bytes /1048576
= 2.29 MiB
Problem 3 Solution
a. 16 x 16 squares will require 256 bytes. 2 points
b. RLE encodes repeated strings of data; it is a lossless file compression method; the image
when coded becomes (black = 0 and white = 1): 6 points
20/121/40/31/60/31/20/51/60/10/120/21/20/101/20/21/
20/61/70/11/60/21/70/11/60/21/20/61/20/21/20/21/20/
11/20/21/20/21/20/21/20/21/20/21/60/11/70/21/60/11/
70/61/20/21/20/101/60/51/20/31/60/31/40/121/20
All of this requires 2 x 65 = 130 bytes of storage;
Thus RLE gives a potential file reduction of (126/256) x 100 = 49.21875%
100%-49.21875%=50.78%