Data Representation and Multimedia: Computer Science 9618 (Cambridge International AS & A Level)
Syllabus 1.1, 1.2, 1.3 · Strand 1 Data Representation and Multimedia
- Questions
- 10
- Total marks
- 55
- Tier mix
- 10 Core
0 of 10 questions completed
Syllabus coverage
- 1.1 10 questions completed
- 1.2 10 questions completed
- 1.3 10 questions completed
Every value a computer stores or displays is ultimately a pattern of bits, and this topic (syllabus ref 1.1–1.3) is about the rules for reading that pattern correctly. Start with number systems: converting an integer between binary, denary and hexadecimal, and recognising specialised binary formats such as Binary Coded Decimal (BCD), one’s complement and two’s complement for representing negative numbers. Binary addition and subtraction follow directly, along with a careful eye for overflow. When a result needs more bits than a register holds. Character data adds another layer, since ASCII, extended ASCII and Unicode each map a fixed number of bits to a symbol.
Multimedia extends the same “how many bits, for what” question to pictures and sound. A bitmap image’s file size depends on resolution and colour depth, while a vector graphic stores drawing objects and properties instead of pixels, each suits different tasks. Digitising sound means choosing a sampling rate and resolution, trading file size against accuracy. Compression, lossy or lossless, reduces storage cost, and run-length encoding is a concrete lossless technique worth tracing by hand.
The exam-style problems below are original, targeted at this syllabus ref, each with a complete worked solution.
Question 1
A graphics program stores each colour channel of a pixel as an 8-bit binary value. One channel is stored as the binary value 10110110.
What is this value written in hexadecimal?
Question 2
A payroll system stores employee reference numbers and displays employee names using a character set.
(a) Convert the denary number 259 to Binary Coded Decimal (BCD). Show the 4-bit binary code for each denary digit separately. [2]
(b) The system originally stored each employee name using the standard 7-bit ASCII code. State how many bits this uses per character, and calculate the maximum number of different characters that 7-bit ASCII can represent. [2]
(c) The payroll system is updated so that employee names can include Chinese and Arabic characters as well as English characters, all within the same document. Explain why Unicode is more suitable than extended (8-bit) ASCII for this purpose. [2]
Question 3
A microcontroller uses an 8-bit register and represents signed integers using two's complement.
(a) Convert the denary number -45 into its 8-bit two's complement binary representation. Show your method (convert +45 to binary, then invert the bits and add 1). [3]
(b) The register adds the two 8-bit binary values 01100100 and 01011010. Show the binary addition bit by bit and give the 8-bit result. [2]
(c) The two binary values added in part (b) represent the denary numbers 100 and 90, both stored as positive two's complement numbers. By examining the sign bit of your 8-bit result from part (b), state whether overflow has occurred, and explain how you can tell. [3]
Question 4
A photo-editing app is used to create a poster. A bitmap image in the app has a resolution of 800 x 600 pixels and a colour depth of 24 bits per pixel (true colour).
(a) Calculate the uncompressed file size of this bitmap image in bytes. Show your working. [3]
(b) Convert your answer to part (a) into kibibytes (KiB), where 1 KiB = 1024 bytes. [2]
(c) The designer needs to enlarge this image to a much bigger poster size without losing quality, and is deciding whether to keep it as a bitmap or redraw it as a vector graphic. State which format is more suitable for this purpose, and explain your answer with reference to how each format stores image data. [3]
Question 5
A law firm records witness interviews as sound files and also scans documents as simple black-and-white images.
(a) A short mono witness recording is sampled at a sampling rate of 8000 samples per second, using a sampling resolution of 16 bits per sample, for a duration of 5 seconds. Calculate the uncompressed file size of this recording in bytes. Show your working. [3]
(b) State one difference between lossy and lossless compression, and explain why lossless compression should be used to compress this witness recording rather than lossy compression. [2]
(c) One row of a scanned black-and-white document image contains this sequence of 20 pixel values (W = white pixel, B = black pixel):
WWWWWBBBWWWWWWWWBBBB
Encode this row using run-length encoding (RLE), and then show how your encoded version can be decoded to reconstruct the original 20-pixel sequence exactly. [4]
Question 6
A technician is converting numbers between denary (base 10) and hexadecimal by hand, using repeated division by 16 rather than converting through binary first.
Convert the denary number 91 into hexadecimal, using repeated division by 16 to find each hexadecimal digit.
What is 91 in hexadecimal?
Question 7
A USB flash drive is advertised by its manufacturer as having a capacity of 16 GB. Manufacturers state storage capacity using decimal (power-of-10) prefixes, where 1 GB = 1000 x 1000 x 1000 bytes. When the drive is plugged into a computer, the operating system instead displays storage capacity using binary (power-of-2) prefixes, where 1 GiB = 1024 x 1024 x 1024 bytes.
(a) Calculate the exact number of bytes in the manufacturer's stated capacity of 16 GB. [1]
(b) Calculate this number of bytes as a number of GiB, giving your answer to 2 decimal places. [3]
(c) Explain why the capacity shown by the operating system (in GiB) appears to be a smaller number than the capacity printed on the packaging (in GB), even though both describe the same physical amount of storage. [2]
Question 8
An 8-bit register in a CPU represents signed integers.
(a) Represent the denary number -52 as an 8-bit value in one's complement. Show your method. [2]
(b) The register performs the subtraction 77 - 52 by adding the two's complement of 52 to the 8-bit binary value of 77. Find the two's complement of 52, show the bit-by-bit addition, and give the 8-bit result (discarding any carry out of the leftmost bit). [3]
(c) State one limitation of one's complement compared with two's complement for representing zero, and explain why this makes two's complement the preferred choice in most modern computer systems. [2]
Question 9
A graphic design company is creating a company logo, which contains a single filled circle.
(a) State three properties, other than the fact that the object is a circle, that a vector graphics file would need to store in order to describe and redraw this circle. [3]
(b) The logo is stored as a vector image containing 250 separate objects (shapes). Each object requires 48 bytes to store its type and properties. Calculate the total uncompressed file size of the vector image, in bytes. Show your working. [2]
(c) A bitmap version of the same logo has a file size of 50 kilobytes (kB), where 1 kB = 1000 bytes. Using your answer to part (b), state which version of the logo file is smaller, and calculate how many times smaller it is than the other. Give your answer to 1 decimal place. [3]
Question 10
A stereo sound recording (i.e. two audio channels, left and right) is digitised using a sampling rate of 22,050 samples per second and a sampling resolution of 8 bits per sample, for a duration of 10 seconds.
What is the uncompressed file size of this stereo recording, in bytes?