Professional Documents
Culture Documents
REPRESENTATION
Compiled: By Engr. Shahzadah Ashraf Bande’Shah
STUDENTS NAME:
_____________________________________________
shahzadah.ashraf 03332076121
SCHOOL NAME: @gmail.com
_____________________________________________
Follow On Facebook :
DATE ISSUED: https://www.facebook.com/shahzad
ah.ashraf
_____________________________________________
For More Resources:
https://sites.google.com/site/olevelco
mputers/home
CONTACT NUMBER:
_____________________________________________
A Levels With
Sir Bande'Shah
Page 1 of 129
Cambridge International AS & A Level Computer Science 9618 syllabus for 2021, 2022 and 2023. Subject content
1 Information representation
Sound
Candidates should be able to: Notes and guidance
Show understanding of how sound is represented and Use the terms: sampling, sampling rate, sampling
encoded resolution, analogue and digital data
Show understanding of the impact of changing the Impact on file size and accuracy
sampling rate and resolution
1.3 Compression
Candidates should be able to: Notes and guidance
Show understanding of the need for and examples of
the use of compression
Show understanding of lossy and lossless compression
and justify the use of a method in a given situation
Show understanding of how a text file, bitmap image, Including the use of run-length encoding (RLE) Page 2 of 129
vector graphic and sound file can be compressed
Page 3 of 129
Chapter 1 (Information Representation)
There are several different types of numbers within the denary system. Examples of these are
provided in Table.
Table 1.05 Different ways to express a value using the denary number system
We will focus on how large values are represented. If we have a quantity that includes units of
measurement, it can be written in three different ways. For example, a distance could be written in
any one of these three ways:
• 23 567 m
• 23.567 × 103 m
• 23.567 km
The second example has used an exponential notation to define the magnitude of the value. The
third example has added a prefix to the unit to define this magnitude. We read this as
23.567 kilometres.
The ‘kilo’ is an example of a decimal prefix. There are four decimal prefixes commonly used for large
numbers. These are shown in Table.
Decimal prefix: A prefix to define the magnitude of a value. Examples are kilo, mega, giga and tera
representing factors of 103, 106, 109 and 1012 respectively
Page 4 of 129
Unfortunately, for a long time the computing world used these prefix names but with a slightly
different definition. The value for 210 is 1024. Because this is close to 1000, computer scientists
decided that they could use the kilo prefix to represent 1024. So, for example, if a computer system
had the following values quoted for the processor speed and the size of the
Size of RAM 8 GB
This unsatisfactory situation has now been resolved by the definition of a new set of names which can
be used to define a binary prefix. A selection of these is shown in Table.
Binary prefix: A prefix to define the magnitude of a value. Examples are kibi, mebi, gibi and tebi
representing factors of 210, 220, 230 and 240 respectively.
When a number or a quantity is presented for a person to read it is best presented with either one
denary digit or two denary digits before the decimal point. If a calculation has been carried out, the
initial result found may not match this requirement. A conversion of the presented value will be
needed by choosing a sensible magnitude factor. For example, consider the following two answers
calculated for the size of a file:
a) 34 560 bytes
If a calculation is to be performed with values quoted with different magnitude factors there must
first be conversions to ensure all values have the same magnitude factor. For example, if you needed
to know how many files of size 2.4 MiB could be stored on a 4 GiB memory stick there should be a
conversion of the GiB value to the corresponding MiB value.
Page 5 of 129
Binary arithmetic
Binary Addition
For binary addition, starting at the least significant position still applies. The rules for the addition of
binary digits are:
• 0+0=0
• 0+1=1
• 1 + 1 = 0 with a carry of 1
• 1 + 1 + 0 = 0 with a carry of 1
• 1 + 1 + 1 = 1 with a carry of 1
The last two rules are used when a carried 1 is included in the addition of two digits.
As an example, the addition of the binary equivalent of denary 14 to the binary equivalent of denary
11 can be examined.
1 0 1 1
+ 1 1 1 0
1 1 0 0 1
• 1 + 0 = 1 with no carry
• 1 + 1 = 0 with carry 1
The rules have correctly produced the 5-bit answer which is the binary equivalent of 25. In a paper
exercise like this these rules for addition will always produce the correct answer.
Binary Subtraction
For binary subtraction, starting at the least significant position still applies. The rules for the
subtraction of binary digits are:
• 0–0=0
• 0 – 1 = 1 after a borrow
• 1–0=1
• 1–1=0
Page 6 of 129
As an example, the subtraction of the binary equivalent of denary 11 from the binary equivalent of
denary 14 can be examined.
1 1 1 0
− 1 0 1 1
0 0 1 1
• 1 – 1 gives 0
Overflow: a condition when the result of a calculation is too large to fit into the number of bits defined
for storage
Page 7 of 129
Denary/Decimal:
Denary is the number system that you have most probably grown up with. It is also another
way of saying base 10. This means that there are 10 different numbers that you can use for
each digit, namely:
0,1,2,3,4,5,6,7,8,9
Notice that if we wish to say 'ten', we use two of the numbers from the above digits, 1 and 0.
Using the above table, we can see that each column has a different value assigned to it. And if
we know the column values we can know the number, this will be very useful when we start
looking at other base systems. Obviously, the number above is: five-thousands, nine-hundreds,
seven-tens and three-units.
Page 8 of 129
Binary:
You should know denary pretty well by your age, but there are different base systems out
there, and the most important one for computing is the binary base system. Binary is a base-2
number system; this means that there are two numbers that you can write for each digit:
0, 1
With these two numbers we should be able to write (or make an approximation) of all the
numbers that we could write in denary.
128 64 32 16 8 4 2 1
128 64 32 16 8 4 2 1
0 1 1 0 1 0 1 0
Using the above table, we can see that each column has a value assigned to it that is the power
of two (the base number!), and if we take those values and the corresponding digits we can
work out the value of the number:
000111112
128 64 32 16 8 4 2 1
0 0 0 1 1 1 1 1
Page 9 of 129
Hexadecimal:
You may notice from the table that one hexadecimal digit can represent exactly 4 binary bits.
Hexadecimal is useful to us as a shorthand way of writing binary, and makes it easier to work
with long binary numbers.
Hexadecimal is a base-16 number system which means we will have 16 different numbers to
represent our digits. The only problem being that we run out of numbers after 9, and knowing
that 10 is counted as two digits we need to use letters instead:
0,1,2,3,4,5,6,7,8,9, A, B, C, D, E, F
We can do exactly the same thing as we did for denary and binary, and write out our table.
0 0 3 4 A F
So now all we need to do is to add the columns containing values together, but remember that
A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
Representation Base
Page 10 of 129
All the numbers are the same and the easiest version to remember/understand for humans is
the base-16. Hexadecimal is used in computers for representing numbers for human
consumption, having uses for things such as memory addresses and error codes.
NOTE: Hexadecimal is used as it is shorthand for binary and easier for people to remember. It
DOES NOT take up less space in computer memory, only on paper or in your head! Computers
still have to store everything as binary whatever it appears as on the screen.
0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
A 1010 10
B 1011 11
C 1100 12
D 1101 13
E 1110 14
F 1111 15
10 0001 0000 16
Page 11 of 129
Converting Between Bases:
The sum that you saw previously to convert from hex to denary seemed a little cumbersome
and in the exam you wouldn't want to make any errors, we therefore have to find an easier way
to make the conversion.
Since 4 binary bits are represented by one hexadecimal digit, it is simple to convert between
the two. You can group binary bits into groups of 4, starting from the right, and adding extra 0's
to the left if required, and then convert each group to their hexadecimal equivalent.
For example, the binary number 0110110011110101 can be written like this:
6 C F 5
So the binary number 0110 1100 1111 0101 is 6CF5 in hexadecimal. We can check this by
converting both to denary.
First we'll convert the binary number, since you already know how to do this:
0 1 1 0 1 1 0 0 1 1 1 1 0 1 0 1
By multiplying the columns and then adding the results, the answer is 27893.
Notice that the column headings are all 2 raised to a power,
Page 12 of 129
163 =4096 162 =256 161 =16 160 =1
6 C F 5
5x1=5
15 x 16 = 240 (You should memorize the values A-F)
12 x 256 = 3072
6 x 4296 = 24576
Totaling them all up gives us 27893, showing that 0110 1100 1111 0101 is equal to 6CF5.
Page 13 of 129
Two's complement:
Nearly all computers work purely in binary. That means that they only use 1’s and 0’s, and
there's no -vie or +vie symbol that the computer can use. The computer must represent
negative numbers in a different way.
We can represent a negative number in binary by making the most significant bit (MSB) a sign
bit, which will tell us whether the number is positive or negative. The column headings for an 8-
bit number will look like this:
-128 64 32 16 8 4 2 1
MSB LSB
1 0 1 1 1 1 0 1
Here, the most significant bit is negative, and the other bits are positive. You start with -128,
and add the other bits as normal.
The example above is -67 in denary because:
(-128 + 32 + 16 + 8 + 4 + 1 = -67)
-1 in binary is 1111 1111.
Note that you only use the most significant bit as a sign bit if the number is specified as signed.
If the number is unsigned, then the MSB is positive regardless of whether it is a 1(one) or not.
If the MSB is 0 then the number is positive, if 1 then the number is negative.
Page 14 of 129
Method: Converting a Negative Denary Number into Binary Twos Complement
Let's say you want to convert -35 into Binary Twos Complement. First, find the binary
equivalent of 35 (the positive version)
32 16 8 4 2 1
1 0 0 0 1 1
Now add an extra bit before the MSB, make it a zero, which gives you:
64 32 16 8 4 2 1
0 1 0 0 0 1 1
64 32 16 8 4 2 1
1 0 1 1 1 0 0
64 32 16 8 4 2 1
1 0 1 1 1 0 0
+1
1 0 1 1 1 0 1
Page 15 of 129
Example: binary subtraction
When it comes to subtracting one number from another in binary things can get very messy.
An easier way to subtract Y from X is to add the negative value of Y to the value of X
X−Y = X+(−Y)
0100 1110
1011 0010 flip all the bits to its left
128 64 32 16 8 4 2 1
0 0 0 0 0 1 0 0
4 = 4 = 82-78
Page 16 of 129
Converting Negative Numbers:
To find out the value of a two’s complement number we must first make note of its sign bit
(the most significant, left most bit), if the bit is a zero we work out the number as usual, if it's a
one we are dealing with a negative number and need to find out its value.
To find the value of the negative number we must find and keep the right most 1 and all bits to
its right, and then flip everything to its left. Here is an example:
1111 1011
0000 0101 flip all the bits to its left
We can now work out the value of this new number which is:
128 64 32 16 8 4 2 1
0 0 0 0 0 1 0 1
4 + 1 = −5 (remember the sign you worked out earlier!)
To find the value of the negative number we must take the MSB and apply a negative value to
it. Then we can add all the heading values together
Page 17 of 129
ASCII and Unicode:
ASCII:
ASCII normally uses 8 bits (1 byte) to store each character. However, the 8th bit is used as a
check digit, meaning that only 7 bits are available to store each character. This gives ASCII the
ability to store a total of
2^7 = 128 different values.
If you look carefully at the ASCII representation of each character you might notice some
patterns. For example:
110 0001 97 61 a
110 0010 98 62 b
110 0011 99 63 c
As you can see, a = 97, b = 98, c = 99. This means that if we are told what value a character is
we can easily work out the value of subsequent or prior characters.
Without looking at the ASCII table above! If we are told that the ASCII value for the character
'5' is 011 0101, what is the ASCII value for '8'.
We know that '8' is three characters after '5', as 5,6,7,8. This means that the ASCII value of '8'
will be three bigger than that for '5':
011 0101 (ASCII '5')
+ 011
--------
011 1000 (ASCII '8')
If you are worried about making mistakes with binary addition, you can deal with the decimal
numbers instead. Take the example where you are given the ASCII value of 'g', 110 0111, what
is 'e'?
Page 18 of 129
We know that 'e' is two characters before 'g', as e, f, g. This means that the ASCII value of 'e'
will be two smaller than that for 'g'.
64 32 16 8 4 2 1
1 1 0 0 1 1 1= 10310 = ASCII value of 'g'
103 - 2 = 10110
64 32 16 8 4 2 1
1 1 0 0 1 0 1= 10110 = ASCII value of 'e'
Unicode:
The problem with ASCII is that it only allows you to represent a small number of characters
(~128 or 256 for Extended ASCII). This might be OK if you are living in an English speaking
country, but what happens if you live in a country that uses a different character set? For
example:
Chinese characters 汉字
Japanese characters 漢字
Gujarati ગુજરાતી
Urdu اردو
You can see that we quickly run into trouble as ASCII can't possibly store these hundreds of
thousands of extra characters in just 7 bits. What we use instead is unicode. There are several
versions of unicode, each with using a different number of bits to store data:
Page 19 of 129
Name Descriptions
UTF-8 8-bit is the most common unicode format. Characters can take as little as 8-bits,
maximizing compatibility with ASCII. But it also allows for variable-width encoding
expanding to 16, 24, 32, 40 or 48 bits when dealing with larger sets of characters
With over a million possible characters we should be able to store every character from every
language on the planet.
Decimal digit BCD
8 4 2 1
BCD (Binary Coded Decimal): 0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
If there is an application where single denary digits are required
to be stored or transmitted, BCD offers an efficient solution. The 3 0 0 1 1
BCD code uses 4-bits (a nibble) to represent a denary digit. A 4 0 1 0 0
four-bit code can represent 16 different values so there is a
5 0 1 0 1
scope for a variety of combinations. This discussion only
considers the simplest BCD coding which expresses the value 6 0 1 1 0
directly as a binary number. 7 0 1 1 1
One BCD digit per Byte 0000 1000 0000 0101 0000 0000 0000 0011
Page 20 of 129
There are a number of applications where BCD can be used. The obvious
type of application is where (1) denary digits are to be displayed, for
instance on the screen of a calculator or in a digital time display or in an
elevator display panel (These all are examples of 7 segment display).
Page 21 of 129
1.1.2 Images
A large part of using modern computers involves sending pictures and films to each other, along with using a
graphical user interface. All of this involves computers saving and processing images. This section will cover the
two main image types: vector and bitmap, along with some compression techniques.
Bitmap Graphics - a collection of pixels from an image mapped to specific memory locations holding their binary
color value
Pixel - the smallest possible addressable area defined by a solid color, represented as binary, in an image
This example shows a Bitmap image with a portion greatly enlarged, in which the individual pixels are rendered
as little squares and can easily be seen. Try looking closely at your monitor or mobile phone screen to see if you
can spot the pixels
Page 22 of 129
Bitmaps are very good for storing things such as photographs
Resolution
Image Resolution - how many pixels an image contains per inch/cm
Screen Resolution - the number of pixels per row by the number of pixels per column
The higher the resolution, the more pixels are available. Therefore the crisper the picture
Page 23 of 129
There are many different video display formats out there, with different widths and heights, and total numbers
of pixels
Using the diagram above we are going to work out how many pixels are required to display a single
frame on a VGA screen.
Height = 480
Width = 640
Page 24 of 129
Exercise: Calculating screen resolutions
Q. What is a Pixel?
Answer:
The smallest possible addressable area defined by a solid color, represented as binary, in an image.
Q. What is the resolution of HD 1080p image? (use the diagram above to help)
Answer:
1920 x 1080 = 2073600 pixels
Q. If I have an image resolution of 700 pixels, and the height is 35, what is the width of the image?
Answer:
700 / 35 = 20 pixels
Page 25 of 129
Color Depth
Color depth - The number of bits used to represent the color of a single pixel
Example
Mono-chrome, only
Description stores 4 colors: Stores limited colors
stores black and white
Number of
colors 21 = 2 22 = 4 24 = 16
per pixel
Example
Number of
colors 28 = 256 224 = 16777216 (16m)
per pixel
Page 26 of 129
It seems pretty obvious that the higher the color depth, the closer the picture will look to reality. Why then
don't we just ramp up the color depth on every image that we make? The answer should be obvious, for a fixed
resolution, the higher the color depth, the larger the file size.
If the first image uses 1 bit to store the color for each pixel, then the image size would be:
For the second image uses 2 bits to store the color for each pixel, then the image size would be:
Page 27 of 129
Exercise: Color Depth
Q. For a color depth of 8 bits, how many colors could each pixel store?
Answer:
28 = 256
Q. To represent 1024 colors per pixel, what color depth would I need?
Answer:
210 = 1024
Q. For an image of 30 by 40 pixels, what would the file sizes be for the following color depths: 4 bits
Answer:
30 x 40 x 4 = 4800 bits
Q. How many colors can each pixel store if it has a color depth of 4bits?
Answer:
24 = 16 colors
Q. How many bits does the color depth have to be if we want to store 64 colors per pixel?
Answer:
6 as: 26 = 64 colors
Q. How many bits would an image be that has a size of 20 by 30 pixels, with each pixel able to display 8 colors?
Answer:
8 colors is 3 bits per pixel as: 23 = 8 colors
h * w * b = 20 * 30 * 3 = 1800 bits
Q. When might one want to decrease the color depth for an image?
Answer:
you want to save file space or when you only need a specific palate of colors such a mono-chrome
Page 28 of 129
Vector Graphics
Vector Graphics - images defined using mathematics and geometry such as points, lines, curves, and shapes or
polygon(s). Allowing for scalability. Objects and properties stored mathematically.
Vector graphics are made up of objects and their properties. An object is a mathematical or geometrically
defined construct such as a rectangle, line or circle.
Image
<rect
width="100" height="80"
x="0" y="70"
<rect x="14" y="23" <circle cx="100" fill="green" />
width="250" height="50" cy="100" r="50"
<line
Drawing fill="green" fill="red"
x1="5" y1="5"
List stroke="black" stroke-
stroke="black" stroke-
width="5" /> x2="250" y2="95"
width="1" />
stroke="red" />
<circle
cx="90" cy="80"
r="50"
Page 29 of 129
fill="blue" />
Un text
</text>
Each of these objects has properties to tell you the size, color, position etc. Take a look at the next example to
see how drawing lists are built from objects and properties.
Page 30 of 129
Comparison between Bitmap (Raster) Image and Vector Image
This image illustrates the difference between bitmap and vector images. The bitmap image is composed of a
fixed set of dots (pixels), while the vector image is composed of a fixed set of shapes. In the picture, scaling the
bitmap reveals the pixels and scaling the vector image preserves the shapes.
Q. You wish to create an image that will be made into a giant banner for the side of a building. What type should
you use and why?
Answer: Vector, as it allows for scaling without distortion and retaining its file size
Q. You wish to create an image that will be used in a game that will run on a mobile phone and a home console.
What type should you use and why?
Answer: Vector, as it allows for scaling without distortion and retaining its file size. You would only need one
image to use on all the different systems.
Q. You want to take an image of a local cat stuck in a tree. What type should you use and why?
Page 31 of 129
1.1.3 Sounds
A speaker works by moving its center cone in and out, this causes the air particles to bunch together forming
waves. These waves spread out from the speaker travelling at 340 m / s. If your ear is in the way, then the waves
of sound particles will collide with your ear drum, vibrating it and sending a message to your brain.
This section of the book will cover how we record, store and transmit sound using computers. Sound waves in
nature are continuous, this means they have an almost infinite amount of detail that you could store for even
the shortest sound. This makes them very difficult to record perfectly, as computers can only store discrete
data, data that has a limited number of data points.
Page 32 of 129
Analogue and digital:
For a computer to store sound files we need to get the continuous analogue sound waves into discrete binary
values:
An analogue sound wave is picked up by a microphone and sent to an Analogue to Digital (ADC) converter in the
form of analogue electrical signals. The ADC converts the electrical signals into digital values which can be stored
on a computer.
Once in a digital format you can edit sounds with programs such as audacity.
To play digital audio you convert the sound from digital values into analogue electrical signals using the DAC,
these signals are then passed to a speaker that vibrating the speaker cone, moving the air to create sound waves
and analogue noise.
Analogue to Digital Converter (ADC) - Converts analogue sound into digital signals that can be stored on a
computer.
Digital to Analogue Converter (DAC) - Converts digital signals stored on a computer into analogue sound that
can be played through devices such as speakers.
Page 33 of 129
Fig 1. The original analogue sound wave is a continuous set
of points.
Page 34 of 129
Sampling Rate:
Hertz (Hz) - the SI unit of frequency defined as the number of cycles per second of a periodic phenomenon.
*As you saw earlier, different sounds can have different volumes. The sampling resolution allows you to set the
range of volumes storable for each sample. If you have a low sampling resolution then the range of volumes will
be very limited, if you have a high sampling resolution then the file size may become unfeasible. The sampling
resolution for a CD is 16 bits used per sample.
To work out the size of a sound sample requires the following equation:
If you wanted to record a 30 second voice message on your mobile phone you would use the following:
Page 35 of 129
Exercise: Analogue and digital
Q. Name the device used by computers to convert sound files into sound coming out of the speaker
Answer:
Digital to Analogue converter
Q. This is a diagram of a system set up for recording, storing and saving sound. Fill in the numbers from the following
options
ADC
DAC
Headphones
Main Memory
Microphone
Secondary Storage
Answer:
1. Microphone 5. Headphones
2. ADC 6. Secondary Storage
3. DAC
4. Main Memory
Page 36 of 129
Q. Why is it difficult to save analogue sound waves in a digital format?
Answer:
Analogue is continuous data, converting continuous data to discrete values may lose some of the accuracy
Answer:
A sound wave is continuous data, whilst digital data is discrete and the representation is an approximation of
the original
Q. Why might you choose to have a lower sampling rate than a higher one for storing a song on your computer?
Answer:
The higher the sampling rate the more data is needed to be stored, meaning the larger the file size.
Answer:
The number of bits assigned to each sample, affecting the range of volumes that can be stored in a sample
Answer:
Answer:
Page 37 of 129
Q. Work out the sample rate of the following sound file:
Answer:
Answer:
The file might be recorded in stereo, meaning twice the amount of data would have to be stored
Compression techniques
As you can see we have some serious issues with the size of sound files. Take a look at the size of a 3-minute pop
song recorded at a sample rate of 44 kHz and a sample resolution of 16 bits.
As you are probably aware an mp3 of the same length would be roughly 3Mb, a fifth of the size. So what gives?
It is easy to see that the raw file sizes for sounds are just too big to store and transmit easily, what is needed it a
way to compress them.
Page 38 of 129
Lossless
Lossless compression - compression doesn't lose any accuracy and can be decompressed into an identical copy
of the original audio data
WAV files don't involve any compression at all and will be the size of files that you have calculated already.
There are lossless compressed file formats out there such as FLAC which compress the WAV file into data
generally 50% the original size. To do this it uses run length encoding, which looks for repeated patterns in the
sound file, and instead of recording each pattern separately, it stores information on how many times the
pattern occurs in a row. Let us take a hypothetical set of sample points:
00000000000000000000012345432100000000000000000123456787656789876
As you can see the silent area takes up a large part of the file, instead of recording these individually we can set
data to state how many silent samples there are in a row, massively reducing the file size:
(21-0)123454321(17-0)123456787656789876
Lossy
FLAC files are still very large, what is needed is a format that allows you to create much smaller file sizes that can
be easily stored on your computer and portable music device, and easily transmitted across the internet.
Lossy compression - compression loses file accuracy, generally smaller than lossless compression
As we have already seen, to make smaller audio files we can decrease the sampling rate and the sampling
resolution, but we have also seen the dreadful effect this can have on the final sound. There are other clever
methods of compressing sounds, these methods won't let us get the exact audio back that we started with, but
will be close. This is lossy compression.
Some audiophiles stick by vinyl records as this uncompressed music format doesn't lose audio accuracy like an
mp3. However dirt and wear degrade the quality of vinyl
There are many lossy compressed audio formats out there including: MP3, AAC and OGG (which is open source).
The compression works by reducing accuracy of certain parts of sound that are considered to be beyond the
auditory resolution ability of most people. This method is commonly referred to as perceptual coding. It uses
psychoacoustic models to discard or reduce precision of components less audible to human hearing, and then
records the remaining information in an efficient manner. Because the accuracy of certain frequencies are lost
you can often tell the difference between the original and the lossy versions, being able to hear the loss of high
and low pitch tones.
Page 39 of 129
Exercise: Sound compression
Answer:
So that they take up less space and can be sent quickly across the internet or stored on portable music
players
Q. Name the two categories of compression available and give a file format for each
Answer:
012344444444444432222222222222211111111111111000000000000
Answer:
0123(12-4)3(14-2)(14-1)(12-0)
Answer:
perceptual coding reduces the quality of frequencies stored in a sound file that are beyond the auditory
resolution of most people
Answer:
when you really care about the sound quality and you're not bothered about the file size
Page 40 of 129
Page 41 of 129
1 (i) Convert the following binary number into hexadecimal.
10111000
...............................................................................................................................................[1]
97
...............................................................................................................................................[1]
(iii) Using two’s complement, show how the following denary numbers could be stored in an 8-bit
register:
114
- 93
[2]
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[1]
(ii) Give one reason why 16-bit sampling is used in an audio compact disc (CD).
...........................................................................................................................................
.......................................................................................................................................[1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(iv) Give one benefit and one drawback of using a higher sampling resolution.
Benefit ...............................................................................................................................
...........................................................................................................................................
Drawback ..........................................................................................................................
.......................................................................................................................................[2]
(b) Describe two typical features found in software for editing sound files.
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...............................................................................................................................................[2]
(c) Explain the difference between lossless and lossy data compression techniques.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
124
–77
[2]
(ii) Convert the two numbers in part (a) (i) into hexadecimal.
124 ..................................................................................................................................
–77 ...................................................................................................................................
[2]
...................................................................................................................................... [1]
...........................................................................................................................................
...................................................................................................................................... [2]
55
[1]
(b) Convert the following Binary Coded Decimal (BCD) number into denary.
10000011
...............................................................................................................................................[1]
(c) Convert the following denary integer into 8-bit two’s complement.
-102
[2]
4E
...............................................................................................................................................[1]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
(b) The students use software to compress the sound clips before emailing them.
(i) Circle your chosen method of compression and justify your choice.
Lossy / Lossless
Justification: .......................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
Students also email images to the radio station for use on its website.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
B 153
W 255
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 B B B B B B B B B B W W W B B B
1 B B B B B B B B B W W W W W W B
2 B B B B B B B W W W W W W W W W
95
Show how RLE will compress the first three rows of this image.
Row 1: ...............................................................................................................................
Row 2: ...............................................................................................................................
Row 3: ...........................................................................................................................[2]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
Page 48 of 129
9608/12/M/J/16
2 (a) Convert the following 8-bit binary integer into denary.
01001101
.............................................................................................................................. .................[1]
..............................................................................................................................
(b) Convert the following denary number into Binary Coded Decimal (BCD).
82
...............................................................................................................................................[1]
(c) Convert the following two’s complement integer number into denary.
11001011
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
(d) Convert the following denary number into hexadecimal. Show your working.
198
...............................................................................................................................................[2]
The user can select the sampling resolution before making a recording.
Define the term sampling resolution. Explain how the sampling resolution will affect the
accuracy of the digitised sound.
...................................................................................................................................................
...................................................................................................................................................
Explanation ...............................................................................................................................
...................................................................................................................................................
[3]
...........................................................................................................................................
.......................................................................................................................................[1]
State how many bits are used to encode the data for one pixel.
.......................................................................................................................................[1]
(iii) A second picture has width 8192 pixels and height 256 pixels. It is saved as a 256-colour
bitmap.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
(iv) The actual bitmap file size will be larger than your calculated value as a bitmap file has a
file header.
State two items of data that are stored in the file header.
1 ........................................................................................................................................
2 ....................................................................................................................................[2]
9608/12/M/J/17 Page 50 of 129
3 (a) A computer has a microphone and captures a voice recording using sound recording software.
Before making a recording, the user can select the sampling rate.
Define the term sampling rate. Explain how the sampling rate will influence the accuracy of
the digitised sound.
...................................................................................................................................................
...................................................................................................................................................
Explanation ...............................................................................................................................
...................................................................................................................................................
[2]
Pixel ...................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
[2]
(ii) A picture has been drawn and is saved as a monochrome bitmap image.
.......................................................................................................................................[1]
(iii) A second picture has width 2048 pixels and height 512 pixels. It is saved as a 256-colour
image.
........................................................................................................................................... [3]
...........................................................................................................................................
...........................................................................................................................................
(iv) The actual bitmap file size will be larger than your calculated value.
State another data item that the bitmap file stores in addition to the pixel data.
...........................................................................................................................................
.......................................................................................................................................[1]
0 0 0 1 0 1 0 0 0 1 0 1 1 1 1 0
.......................................................................................................................................[2]
16 4D
Write the assembly language for this instruction with the operand in denary.
.......................................................................................................................................[2]
9608/12/M/J/17
4 (c) Using an 8-bit operand, state the maximum number of memory locations, in denary, that can
be directly addressed.
......
.........................................................................................................................................
[1]
0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 0
.......................................................................................................................................[2]
05 3F
Write the equivalent assembly language instruction, with the operand in denary.
.......................................................................................................................................[2]
1 1 0 1 1 0 1 1
.......................................................................................................................................[1]
.......................................................................................................................................[1]
(iii) The current contents of the Accumulator represent a two’s complement binary integer.
.......................................................................................................................................[1]
(b) The binary integer represents a character from the computer’s character set.
...........................................................................................................................................
.......................................................................................................................................[1]
(ii) Explain the differences between the ASCII and Unicode character sets.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
Calculate the ASCII code in hexadecimal for ‘Z’. Show your working.
Working .............................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
(a) Explain how an analogue sound wave is sampled to convert it into digital format.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
(b) Explain the effects of increasing the sampling resolution on the sound file.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
(c) The original sound was sampled at 44.1 kHz. The sample rate is changed to 22.05 kHz.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
(d) The student uses sound editing software to edit the sound file.
Name two features of sound editing software the student can use to edit the sound file.
Feature 1 ...................................................................................................................................
Purpose .....................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Feature 2 ...................................................................................................................................
Purpose .....................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
[4]
1 1 0 0 0 0 0 1
.......................................................................................................................................[1]
.......................................................................................................................................[1]
(iii) The current contents of register H represent a two’s complement binary integer.
.......................................................................................................................................[1]
(iv) State why register H does not currently contain a Binary Coded Decimal (BCD).
...........................................................................................................................................
.......................................................................................................................................[1]
(a) State the minimum number of bits needed to represent each pixel in this image.
...............................................................................................................................................[1]
(b) Run-length encoding (RLE) is used to store the image with the following colour codes.
Colour Code
Black 1A
White 3B
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
State the minimum number of bits needed to represent each pixel in the 30-colour image.
...............................................................................................................................................[1]
State the purpose of the file header. Give two examples of the file header contents.
Purpose ....................................................................................................................................
...................................................................................................................................................
Example 1 .................................................................................................................................
...................................................................................................................................................
Example 2 .................................................................................................................................
...................................................................................................................................................
[3]
Give three features of graphics software that can be used to edit the photograph.
Feature 1 ...................................................................................................................................
Effect .........................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Feature 2 ...................................................................................................................................
Effect .........................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Feature 3 ...................................................................................................................................
Effect .........................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
[6]
Page 58 of 129
9608/13/M/J/18
2
Circle either Valid or Invalid to indicate whether each address is valid or invalid. Explain your
decision.
Explanation ...............................................................................................................................
...................................................................................................................................................
Explanation ...............................................................................................................................
...................................................................................................................................................
Explanation ...............................................................................................................................
...................................................................................................................................................
[3]
(b) A website can be accessed using either the Uniform Resource Locator (URL) or the IP
address.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]
Complete the following statements by filling in the names of the missing methods of bit
streaming.
................................................. bit streaming is used when watching an event that has taken
place in the past. Existing media are encoded to bit streaming format and uploaded to a
server. It can be paused and rewound.
[2]
© UCLES 2019 9608/11/M/J/19 Page 59 of 129
3
(d) A recording of a concert is stored as a file. The file is compressed using lossy compression
before it is streamed to users.
...........................................................................................................................................
..................................................................................................................................... [1]
...........................................................................................................................................
..................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [3]
(i) Convert the denary ASCII character code for ‘A’ into 8-bit binary.
[1]
(ii) Convert the denary ASCII character code for ‘A’ into hexadecimal.
..................................................................................................................................... [1]
..................................................................................................................................... [1]
(a) The images are bitmap images. A bitmap image can be made up of any number of colours.
Each colour is represented by a unique binary number.
Draw one line from each box on the left, to the correct box on the right to identify the minimum
number of bits needed to store each maximum number of colours.
1
68
2
256
127
2
8
249
9
[3]
4 A digital camera takes a bitmap image. The image is 2000 pixels wide by 1000 pixels high with a
colour depth of 24-bits.
(a) Calculate an estimate of the file size for the image. Give your answer in megabytes. Show
your working.
Working .....................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Answer .......................................................... MB
[3]
(b) A second image is taken, this time in black and white. It has the same number of pixels, but
the file size is smaller.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
(c) The digital camera allows a user to add text to an image. The text is encoded as ASCII
values.
The table shows the ASCII denary values for five characters.
a 97
b 98
c 99
d 100
e 101
(i) Give the 8-bit binary value for the ASCII character ‘b’.
...........................................................................................................................................
..................................................................................................................................... [1]
(ii) Complete the table by writing the ASCII denary value for the character ‘t’ and its
hexadecimal equivalent.
Character t
Hexadecimal value
[2]
1 Samira is creating an interactive, multimedia presentation for the entrance to her hotel.
(a) The presentation will be on a device that has a resistive touchscreen for user input.
Complete the following paragraph about the basic operation of a resistive touchscreen.
the layers. When a finger touches the screen, the ...................................................... moves
point is calculated.
[4]
(b) Samira uses a computer to draw a logo for her hotel and saves it as a vector graphic. The
logo will be placed on the multimedia presentation and elsewhere, such as on signs at the
entrance of the hotel.
Samira emails the logo to a company that prints signs, and other documentation for the hotel.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [3]
(ii) State two reasons why the hotel logo is saved as a vector graphic instead of a bitmapped
graphic.
1 ........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
[2]
(a) Complete the table by writing the missing definitions and term about sound.
Term Definition
....................................................................................................................
....................................................................................................................
Sampling
....................................................................................................................
....................................................................................................................
......................................
The number of samples per unit time
......................................
....................................................................................................................
....................................................................................................................
Sampling resolution
....................................................................................................................
....................................................................................................................
[3]
(b) The file is too large to be emailed and the file size needs to be reduced.
(i) Name one lossless compression technique that can be used to reduce the size of the
sound file.
...........................................................................................................................................
..................................................................................................................................... [1]
(ii) Describe one lossy compression technique that can be used to reduce the size of the
sound file.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
S T U
(a) The x-coordinate of the centre of the three squares is held in three memory locations:
...........................................................................................................................................
.......................................................................................................................................[1]
...........................................................................................................................................
.......................................................................................................................................[1]
(i) Give the number of bits required to store each pixel for a black and white bitmap.
.......................................................................................................................................[1]
(ii) Identify how many bits are required to store each pixel for a 256-colour bitmap.
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[4]
(b) The following information refers to a music track being recorded on a CD:
(i) Calculate the number of bytes required to store one second of sampled music.
Show your working.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
Describe how you would calculate the number of megabytes required to store this track.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
(i) Give two benefits of using bit streaming for this purpose.
1 ........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
[2]
(ii) State two potential problems of using bit streaming for this purpose.
1 ........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
[2]
(c) Explain the terms on-demand bit streaming and real-time bit streaming.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[4]
Term Description
Bitmap graphic
Picture element
Image resolution
Pixel
Screen resolution
Vector graphic
Value quoted for a monitor specification,
such as 1024 × 768. The larger the
numbers, the more picture elements will
be displayed.
[6]
...................................................................................................................................................
...............................................................................................................................................[1]
(b) Video streaming can use either interlaced encoding or progressive encoding.
Interlaced encoding
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Progressive encoding
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[4]
Description Term
[2]
(ii) Give one file technique that could be applied when either of the two features, described
in part (c)(i), are present.
...........................................................................................................................................
.......................................................................................................................................[1]
93
Hexadecimal:
3A
–65
BCD representation: 58
0100 1001
–63
Binary integer:
01011101
73
Two’s complement
binary integer: 49
11000001
–93
[4]
...........................................................................................................................................
.......................................................................................................................................[1]
...........................................................................................................................................
.......................................................................................................................................[1]
...........................................................................................................................................
.......................................................................................................................................[1]
(i) Describe how denary integers larger than 9 can be converted into BCD.
Give an example in your answer.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(ii) Describe how an 8-bit BCD representation can be converted into a denary integer.
Give an example in your answer.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
......................................................................................................................................................[4]
7 (b) The images contained in the magazines are produced using either bitmap or vector graphics
software.
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
3 ................................................................................................................................................
...................................................................................................................................................
4 ................................................................................................................................................
...............................................................................................................................................[4]
1 ............................................................................................................................ ....
...........................................................................................................................................
........
2 ............................................................................................................................ ....
.......................................................................................................................................[2]
...........................................................................................................................................
................................................................................ ...........
..............................................................................................................................
.............................................. ..
...........................................................................................................................................
.......................................................................................................................................[2]
-17
[1]
(iv) State in denary, the range of integer values that it is possible to represent in two’s
complement integers using a single byte.
(b) (i) Convert the following denary integer into Binary Coded Decimal (BCD).
653
.......................................................................................................................................[1]
(ii) A 3-digit BCD representation has been incorrectly copied. It is shown as:
0 1 0 0 1 1 1 0 0 0 1 0
State how you can recognise that this is not a valid BCD representation.
...........................................................................................................................................
.......................................................................................................................................[1]
...........................................................................................................................................
.......................................................................................................................................[1]
5 (a) The bit depth of an image dictates how many different colours can be represented by each
pixel.
(i) State the number of different colours that can be represented by a bit depth of 8 bits.
..................................................................................................................................... [1]
..................................................................................................................................... [1]
(b) Convert the denary number −194 into 12-bit two’s complement.
............................................................................................................................................. [1]
(c) (i) Convert the Binary Coded Decimal (BCD) value 0110 1001 into denary.
..................................................................................................................................... [1]
...........................................................................................................................................
..................................................................................................................................... [1]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
Tick (✓) one box in each scenario to identify whether lossy or lossless compression should
be used. Justify your choice.
Lossy Lossless
Justification .......................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
Lossy Lossless
Justification .......................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
(iii) You need to upload a video that you have created to a website.
Lossy Lossless
Justification .......................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
(b) The tablet computer’s secondary storage is solid state (flash) memory.
(i) Give one reason why the tablet computer needs secondary storage.
...........................................................................................................................................
..................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [3]
RAM ..........................................................................................................................................
...................................................................................................................................................
ROM .........................................................................................................................................
...................................................................................................................................................
[2]
(d) Dominic’s tablet captures a video of Dominic to send to other people. The video is made of a
sequence of images and a sound file.
(i) Describe how the images and sound are encoded into a digital form.
Images ..............................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
Sound ................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
[4]
© UCLES 2019 9608/12/O/N/19 Page 81 of 129
5
(a) Describe the following key management tasks that the mobile phone operating system carries
out.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
[6]
(i) Describe how sound sampling is used by the mobile phone to encode the sound.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
(ii) Leonardo records his voice twice. Each recording is the same length and has the same
sampling resolution.
The first recording has a sampling rate of 44 100 Hz. The second recording has a
sampling rate of 21 000 Hz.
Describe how the different sampling rates will affect the recording and the sound file.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
(iii) Leonardo transfers the recordings to his laptop computer. He uses sound editing
software to delete some sections of the recordings, and copy and paste to replicate other
sections.
Describe two other features of sound editing software Leonardo can use to edit the
recordings.
1 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
[4]
4 (a) Convert the unsigned binary number 0101 1111 1100 into denary.
............................................................................................................................................. [1]
(b) Convert the denary number −239 into 12-bit two’s complement.
............................................................................................................................................. [1]
(c) Convert the two’s complement number 0110 0101 into denary.
............................................................................................................................................. [1]
(d) Convert the Binary Coded Decimal (BCD) value 0110 0101 into denary.
............................................................................................................................................. [1]
............................................................................................................................................. [1]
6 (a) Convert the following denary number into a 12-bit two’s complement binary form.
-245
[1]
F0
...................................................................................................................................................
............................................................................................................................................. [1]
10101111
...................................................................................................................................................
............................................................................................................................................. [1]
(d) Convert the following Binary Coded Decimal (BCD) into denary.
100001010011
...................................................................................................................................................
............................................................................................................................................. [1]
7 Anne is downloading a sound file from a web server. She had the choice of a sampling rate of
44.1 kHz or 98 kHz before she downloaded the sound file.
Explain the differences between the two sound files stored on the server.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..................................................................................................................................................... [4]
(i) Convert the following denary number into Binary Coded Decimal (BCD).
105
..................................................................................................................................... [1]
(ii) Convert the following two’s complement binary integer into denary.
10111111
..................................................................................................................................... [1]
AB
..................................................................................................................................... [1]
The following tables show part of the ASCII code character set.
(i) Describe how the computer uses ASCII codes to represent characters.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
Bed
...........................................................................................................................................
..................................................................................................................................... [1]
(iii) Give the denary ASCII code for the following character.
..................................................................................................................................... [1]
(a) Describe, using an example, how a text file is compressed using RLE.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]
(b) Explain why run-length encoding will sometimes increase the size of a text file.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
3 (a) Complete the following statements about CPU architecture by filling in the missing terms.
The Von Neumann model for a computer system uses the ....................................... program
concept.
....................................... it.
The processor uses several ....................................... to store the data and instructions from
the program because they can be accessed faster than main memory.
[6]
Wilbur Designs
(a) Describe how the logo is represented and encoded by the computer.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [4]
(b) Wilbur scans a hand drawn image. The scanned image uses 8 bits to store the colour for
each pixel. The image is 2048 pixels wide by 1024 pixels high.
(i) Calculate an estimate of the file size of the scanned image. Give your answer rounded to
the nearest MB.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
Answer ................................. MB
[2]
(ii) Wilbur wants to compress the scanned image before emailing it to his colleague.
Describe one lossy compression technique that Wilbur can use to compress this image.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [3]
1 (i) B 8 [1]
(ii) 1 0 0 1 0 1 1 1 [1]
(iii)
114 0 1 1 1 0 0 1 0
– 93 1 0 1 0 0 0 1 1
[2]
1 (a) (i)
124 0 1 1 1 1 1 0 0
–77 1 0 1 1 0 0 1 1
[2]
(ii) 124: 7C
–77: B3 [2]
Page 93 of 129
Page 2 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2015 9618 12
benefit
drawback
Page 94 of 129
Page 3 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2015 9618 12
• lossless designed to lose none of the original detail/lossless allows original file to be
recreated exactly
• lossless technique based on some form of replacement
• mention of type of replacement, for example RLE, FLAC etc.
• by example: e.g. 000–1111–222222–333 = 3–0, 4–1, 6–2, 3–3 etc.
• maximum compression about 50%
• lossy may result in loss of detail compared to original file/lossy does not allow original file
to be re-created exactly
• lossy techniques make decision about what parts of sound/sound file are important and
discards other information
• only keeps sounds human ear can process/discards sounds most people cannot hear
• ... then applies lossless technique, for further reduction
• lossy compression can reduce to about 10%
• an example of jpeg, mp3 or other correct examples of compressed formats.
No double credit to opposite answers, e.g. lossless maintains detail, but lossy loses detail
just one mark.
[3]
Page 95 of 129
Page 2 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2016 9618 12
(b) 83 [1]
(d) 78 [1]
2 (a) 77 [1]
(c) −
53 [2]
(d) C6 [2]
One mark for the answer, one mark for the method
Page 96 of 129
Page 3 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2016 9618 12
(b) (i) No mark awarded for identifying method. Three marks for justification. [3]
(iii) Two marks for three correct rows, one mark for two correct rows. [2]
Page 97 of 129
Page 6 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2016 9618 13
• Real time – the event is captured live with a video camera connected to a computer
• On-demand – Existing media are encoded to bit streaming format and uploaded to a
server
Page 98 of 129
9608/12 Cambridge International AS/A Level – Mark Scheme May/June 2017
PUBLISHED
3(b)(ii) 4 1
Page 99 of 129
9608/12 Cambridge International AS/A Level – Mark Scheme May/June 2017
PUBLISHED
5(c)(i) 14 5E 2
14 1
5E 1
LDR 1
#77 1
4(a)(i) 500 1
4(a)(ii) 496 1
4(a)(iii) 502 1
4(a)(iv) 86 1
4(b) 3
0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1
0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1
4(c) 256 1
4(d)(i) 07 C2 2
07 1
C2 1
4(d)(ii) LDI 63 2
LDI 1
63 1
3(b)(i) Pixel 2
Smallest picture element which can be drawn 1
Screen resolution
The number of pixels which can be viewed horizontally and vertically on the screen //
or by example - A typical screen resolution is 1680 pixels × 1080 pixels. 1
3(b)(ii) 8 1
4(a)(i) 219 1
4(a)(ii) DB 1
4(a)(iii) −
37 1
Working:
Answer: 5A16
• R emoving sound
o / elem
ments
• D elete sectio ound wave , for example, backgroound noise
ons of the so
• C opy
• R epeat elements
m of the sound wavve
6(a) 1 1
6(b) 1 mark for correct method (colour code and number of pixels) 3
1 mark for first 7 groups correct
1 mark for remainder correct
6(c) 5 1
6(e) 1 mark for naming tool, 1 mark for describing effect on the photograph 6
e.g.
• Resize
• Increase / decrease the size of the image
• Crop
• Remove part of the image
• Blur
• Reduce the focus
3A.21.2H.1 Invalid
H is not a valid hexadecimal digit
299.53.2.2 Invalid
299 is not in the correct range
192.2.1.0 Valid
Consists of four numbers in the range 0–255 separated by
full stops
Real-time
On-demand
• Data is lost
• The decompressed file is not the same as the original
0100 0001
41
0044
• Stores all the scan lines for an entire frame // displays / records all the
frame data at the same time // not split into fields
• Complete frames are displayed in sequence
• The rate of picture display is the same as the frame rate.
68
256
127
249
• Progressive – each frame contains (all the lines for) the complete
image
• Interlaced – each frame contains half the (number of lines) of the
complete image
Character t
Hexadecimal value 74
The resistive touchscreen has two layers with a gap / an air gap between the
layers. When a finger touches the screen, the top layer moves to touch the
bottom layer; this creates a point of contact.
The horizontal and vertical position of this point is calculated.
Term Definition
• Run-length encoding
• Huffman Coding
• Any other valid encoding method
Or
(ii) 1 0 1 0 0 0 [1]
(b) (i) one mark for correct calculation, one mark for the answer
44100 × 16 × 2
(1 mark)
8
4 × 60 × 176400
1024 × 1024 one mark for numerator [2]
one mark for denominator
on-demand
– digital video tape, analogue video tape, or digital files are converted to bit streaming –
format for broadcasting on the net; this is known as encoding these encoded streaming
video files are then uploaded to a dedicated server
– a link for the encoded video is placed on a web site
– a user clicks on the link to download the encoded streaming video; the streamed video is
– then broadcast to the user as and when they require it
– can be paused / can go back and re-watch / fast-forward, etc.
real-time
8 (a)
Picture element
Image resolution
Vector graphic
1 mark for each correct line, two lines from one box is incorrect [6]
2 (a) The number of images / frames recorded per second / unit time.
// The frequency with which the images/frames are recorded.
[1]
(b) ONE mark per bullet point below. MAX THREE marks per type of encoding.
Interlaced encoding
• The data from a single frame are encoded as two separate fields.
• One containing the data for the even numbered rows / lines and the other has the data
for the odd numbered rows / lines.
• The image is rendered by alternating between the even field and the odd field (of each
successive frame).
• The viewer sees data from two frames simultaneously
• The rate of picture display (the field rate) is twice the rate of image frame display (the
frame rate).
• Originally used in television broadcasting and adapted for video recordings.
• Produces what appears to the eye to be a high refresh rate.
• Halves the transmission bandwidth requirements.
Progressive encoding
• Stores the data for an entire frame and displays all the frame data at the same time.
• The rate of picture display is the same as the frame rate.
• Used by traditional film / video digitised from a film camera / computer displays
progressive encoding.
• High bandwidth requirements.
[4]
Description Term
Extra lines from left hand box, no mark for that box.
93
Hexadecimal:
3A
- 65
BCD representation:
58
0100 1001
- 63
Binary integer:
01011101
73
Two’s complement
binary integer: 49
11000001
- 93
[4]
• Bitmap files are usually bigger than vector graphics files // Take up more memory space
(ii) 1 1 0 1 0 0 1 0 [1]
(iii) 2 E [1]
(b) (i) One mark for the explanation and one mark for the example
(ii) One mark for the explanation and one mark for the example
• Binary number is split up into groups of 4 bits (starting from the right)
// Each group of 4 bits is converted to a denary digit
• Example: 0011 0111 = 37
[2]
8 (c) (i) Any two from:
1(a)(i) 119 1
1(a)(ii) –120 1
1(a)(iii) 1 1 1 0 1 1 1 1 1
1(b)(ii) The second block of four binary digits represents a digit larger than 9 // 14 1
5(a)(i) 256 1
5(a)(ii) 78 1
5(c)(i) 69 1
Lossless:
• All the data is needed // the original file is fully restored
• If any data is lost, the program will not run
• Probably does not require significant reduction in file size // a program
written in a high-level language is just text, so does not need much
reduction in size
Touchscreen 9 9
Webcam 9
Microphone 9
Fingerprint scanner 9
A Changes in the audio signal cause the direction of the electrical current to
change. This determines the polarity of the electromagnet.
• No moving parts
• Solid state memory is non-volatile
Images
• The images are stored as bitmaps
• Each image is made up of pixels
• « each pixel is of a single colour
• Each colour has a unique binary number
• Store the sequence of binary numbers for each image / frame // store the
binary value of each pixel
Sound
• Measure the height/amplitude of the sound wave
• A set number of times per second // at regular time intervals
• Each amplitude has a unique binary number
• Store the sequence of binary numbers for each sample
6(d)(ii) 1 mark per bullet point max 2 for each coding term. 4
Interlaced encoding
• The data from a single frame are encoded as two separate fields
• One containing the data for the even numbered rows / lines and the other
has the data for the odd numbered rows / lines
• The image is rendered by alternating between the even field and the odd
field of each successive frame
• The viewer sees data from two frames simultaneously
• The rate of picture display (the field rate) is twice the rate of image frame
display (the frame rate)
• Produces what appears to the eye to be a high refresh rate
• Halves the transmission bandwidth requirements
Progressive encoding
• Stores the data for an entire frame
• Displays all the frame data at the same time
• The rate of picture display is the same as the frame rate
• High bandwidth requirements
2(b)(iii) 1 mark for naming a feature, 1 mark for description, max 2 marks for each 4
feature
e.g.
• Amplify
• ... Increase the volume of a section of sound
• Change pitch
• ... Increase/decrease frequency of section(s)
3(a)(ii) 1 mark for 1 or 2 correct Primary Keys, 2 marks for 3 correct Primary Keys 2
CUSTOMER: CustomerID
ROOM: RoomNumber
BOOKING: BookingID
Table: BOOKING
Foreign Key: CustomerID / RoomNumber
3(b) 1 mark per bullet point to max 2 plus 1 mark for suitable example for each 5
DBMS tool
Developer Interface
• To create user friendly features e.g. forms to enter new bookings
• To create outputs e.g. report of bookings on a given date
• To create interactive features e.g. buttons and menus
Query processor
• To create SQL/QBE queries
• To search for data that meets set criteria, e.g. all bookings for next
week
• To perform calculations on extracted data, e.g. number of empty rooms
tomorrow
3c 1 mark for at least two correct rows, 2 marks for all four correct rows 2
4(a) 1532 1
4(c) 101 1
4(d) 65 1
4(e) DE 1
• If a pixel in frame 2 has the same colour value as the pixel in the same
position in frame 1 then
• …it is not necessary to send the pixel again
• For example, the first row is / rows 1, 3, 5 and 6 on both frames are the
same // only rows 2 and 4 change
• … so does not need to be replicated // only rows 2 and 4 need to be
resent
6(b) 240 1
6(c) 175 1
6(d) 853 1
1(a)(ii) – 65 1
1(a)(iii) 171 1
1(b)(iii) 72 1
Stored
Memory
Fetches
Decodes
Executes
Registers
The processor fetches each instruction, decodes it and then executes it.
The processor uses several registers to store the data and instructions from
the program because they can be accessed faster than main memory.
e.g.
• Reduce his workload // Review his work demands
• Redistribute his work
• Arrange a meeting with him
• ... to discuss the reasons why he is struggling
e.g.
• Not acting in best interest of the client
• ... The error could cause significant problems for the client if encountered
• The product does not meet the highest possible standard
• Not acting in the best interest of the development company
• … if the error occurs, it could lead to repercussions for the development
company
• Commercial
• Shareware
Working:
1024 × 2048 = 2 097 152 pixels
= 2 097 152 bytes (8 bits per pixel)
= 2 097 152 / 1024 = 2048 KB
= 2048 / 1024 MB
Answer: 2 MB
7(b)(ii) 1 mark for identification of method, max 2 for description for one method 3
e.g.
• Reduce the colour depth
• … reduce the number of bits per colour
• … each pixel has fewer bits
A B C Working space X
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 0