Académique Documents
Professionnel Documents
Culture Documents
AS LEVELS 9608
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 89
TOPICAL BOOK 1.1
Page 2 of 89
TOPICAL BOOK 1.1
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 3 of 89
TOPICAL BOOK 1.1
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 4 of 89
TOPICAL BOOK 1.1
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 5 of 89
TOPICAL BOOK 1.1
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 6 of 89
TOPICAL BOOK 1.1
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 7 of 89
TOPICAL BOOK 1.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 8 of 89
TOPICAL BOOK 1.1
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 9 of 89
TOPICAL BOOK 1.1
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 10 of 89
TOPICAL BOOK 1.1
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 11 of 89
TOPICAL BOOK 1.1
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 12 of 89
TOPICAL BOOK 1.1
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 13 of 89
TOPICAL BOOK 1.1
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 14 of 89
TOPICAL BOOK 1.1
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 15 of 89
TOPICAL BOOK 1.1
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 16 of 89
TOPICAL BOOK 1.1
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 17 of 89
TOPICAL BOOK 1.1
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 18 of 89
TOPICAL BOOK 1.1
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 19 of 89
TOPICAL BOOK 1.1
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 20 of 89
TOPICAL BOOK 1.1
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 21 of 89
TOPICAL BOOK 1.1
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 22 of 89
TOPICAL BOOK 1.1
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 23 of 89
TOPICAL BOOK 1.1
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 24 of 89
TOPICAL BOOK 1.1
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 25 of 89
TOPICAL BOOK 1.1
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 26 of 89
TOPICAL BOOK 1.1
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 27 of 89
TOPICAL BOOK 1.1
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 28 of 89
TOPICAL BOOK 1.1
Page 29 of 89
TOPICAL BOOK 1.1
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 30 of 89
TOPICAL BOOK 1.1
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 31 of 89
TOPICAL BOOK 1.1
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 32 of 89
TOPICAL BOOK 1.1
Answer:
Answer:
The file might be recorded in stereo, meaning twice the amount of data would have to be stored
1.1.4 Video
Video is an electronic medium for the recording, copying, playback, broadcasting, and display of moving visual
media.
Video was first developed for mechanical television systems, which were quickly replaced by cathode ray tube
(CRT) systems which were later replaced by flat panel displays of several types.
Video systems vary in display resolution, aspect ratio, refresh rate, color capabilities and other qualities. Analog
and digital variants exist and can be carried on a variety of media, including radio broadcast, magnetic tape,
optical discs, computer files, and network streaming.
Page 33 of 89
TOPICAL BOOK 1.1
Progressive scan: In a progressive-scan system, the entire picture is painted at once, which greatly reduces the
flickering that people notice when watching TV. Progressive scan is available throughout a range of TV types.
1.1.5
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 34 of 89
TOPICAL BOOK 1.1
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 35 of 89
TOPICAL BOOK 1.1
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 36 of 89
TOPICAL BOOK 1.1
Page 37 of 89
TOPICAL BOOK 1.1
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]
9608/12/M/J/15
Page 38 of 89
TOPICAL BOOK 1.1
1 (a) (i) Using two’s complement, show how the following denary numbers could be stored in an
8-bit register:
124
–77
[2]
(ii) Convert the two numbers in part (a) (i) into hexadecimal.
124 ..................................................................................................................................
–77 ...................................................................................................................................
[2]
...................................................................................................................................... [1]
...........................................................................................................................................
...................................................................................................................................... [2]
9608/13/M/J/15
Page 39 of 89
TOPICAL BOOK 1.1
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]
9608/12/M/J/16
Page 40 of 89
TOPICAL BOOK 1.1
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]
9608/13/M/J/16
Page 41 of 89
TOPICAL BOOK 1.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]
9608/13/M/J/17
Page 42 of 89
TOPICAL BOOK 1.1
4 (a) The Accumulator is a register. The current contents of the Accumulator are:
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 .............................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
9608/12/M/J/18
Page 43 of 89
TOPICAL BOOK 1.1
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]
9608/13/M/J/18
Page 44 of 89
TOPICAL BOOK 1.1
S T U
(a) The x-coordinate of the centre of the three squares is held in three memory locations:
...........................................................................................................................................
.......................................................................................................................................[1]
...........................................................................................................................................
.......................................................................................................................................[1]
9608/12/O/N/15
Page 45 of 89
TOPICAL BOOK 1.1
4 Hexadecimal, Binary Coded Decimal (BCD) and binary values are shown below.
93
Hexadecimal:
3A
–65
BCD representation: 58
0100 1001
–63
Binary integer:
01011101
73
Two’s complement
binary integer: 49
11000001
–93
[4]
9608/12/O/N/16
Page 46 of 89
TOPICAL BOOK 1.1
...........................................................................................................................................
.......................................................................................................................................[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]
9608/13/O/N/16
Page 47 of 89
TOPICAL BOOK 1.1
8 (c) The program used the ASCII coding system for character codes. An alternative coding
system is Unicode.
1 ............................................................................................................................ ............
...........................................................................................................................................
2 ............................................................................................................................ ............
.......................................................................................................................................[2]
...........................................................................................................................................
..............................................................................................................................
..............................................................................................................................
.............
...........................................................................................................................................
.......................................................................................................................................[2]
9608/13/O/N/16
Page 48 of 89
TOPICAL BOOK 1.1
1 (a) Each of the following bytes represents an integer in two’s complement form.
-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]
9608/13/O/N/17
Page 49 of 89
TOPICAL BOOK 1.1
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[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]
9608/12/M/J/15
Page 50 of 89
TOPICAL BOOK 1.1
4 A group of students broadcast a school radio station on a website. They record their sound clips
(programmes) in advance and email them to the producer.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[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]
9608/12/M/J/16
Page 52 of 89
TOPICAL BOOK 1.1
6 (c) Bit streaming is used for both real-time and on-demand services.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
9608/13/M/J/16
Page 53 of 89
TOPICAL BOOK 1.1
3 (a) A computer has a microphone and captures a voice recording using sound editing software.
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 54 of 89
TOPICAL BOOK 1.1
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]
9608/13/M/J/17
Page 55 of 89
TOPICAL BOOK 1.1
(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]
9608/12/M/J/18
Page 57 of 89
TOPICAL BOOK 1.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]
9608/13/M/J/18
Page 59 of 89
TOPICAL BOOK 1.1
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]
9608/12/O/N/15
Page 61 of 89
TOPICAL BOOK 1.1
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[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]
(c) When storing music tracks in a computer, the MP3 format is often used. This reduces file size
by about 90%.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
9608/12/O/N/15
Page 63 of 89
TOPICAL BOOK 1.1
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[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]
9608/13/O/N/15
Page 64 of 89
TOPICAL BOOK 1.1
8 (a) Six computer graphics terms and seven descriptions are shown below.
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]
9608/13/O/N/15
Page 65 of 89
TOPICAL BOOK 1.1
...................................................................................................................................................
...............................................................................................................................................[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]
9608/12/O/N/16
Page 66 of 89
TOPICAL BOOK 1.1
6 A user watches a video available on a website. The website uses on-demand bit streaming.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
......................................................................................................................................................[4]
7 (b) The images contained in the magazines are produced using either bitmap or vector graphics
software.
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
3 ................................................................................................................................................
...................................................................................................................................................
4 ................................................................................................................................................
...............................................................................................................................................[4]
9608/13/O/N/16
Page 67 of 89
TOPICAL BOOK 1.1
Page 68 of 89
TOPICAL BOOK 1.1
Page 2 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2015 9608 12
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 69 of 89
TOPICAL BOOK 1.1
Page 2 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2016 9608 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 70 of 89
9608/12 May/June
Cambridge International AS/A Level – Mark Scheme TOPICAL BOOK 1.1 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
Page 71 of 89
9608/12 Cambridge International AS/A Level – Mark Scheme TOPICALMay/June
BOOK 1.12018
PUBLISHED
4(a)(i) 219 1
4(a)(ii) DB 1
4(a)(iii) −
37 1
Working:
Answer: 5A16
Page 72 of 89
9608/13 Cambridge International AS/A Level – Mark Scheme TOPICALMay/June
BOOK 1.12018
PUBLISHED
3(c)(i) 193 1
3(c)(ii) C1 1
3(c)(iii) − 63 1
3(c)(iv) The first 4 bits / first nibble (would give 12 which) is > 9 / 2 digits (which is not valid 1
for BCD)
Page 73 of 89
TOPICAL BOOK 1.1
Page 5 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – October/November 2016 9608 12
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]
Page 74 of 89
TOPICAL BOOK 1.1
Page 5 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – October/November 2016 9608 13
(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:
Page 75 of 89
9608/13 Cambridge International AS/A Level – Mark Scheme TOPICAL
October/November
BOOK 1.1
PUBLISHED 2017
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
Page 76 of 89
TOPICAL BOOK 1.1
Page 2 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2015 9608 12
benefit
drawback
Page 77 of 89
TOPICAL BOOK 1.1
Page 3 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2015 9608 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 78 of 89
TOPICAL BOOK 1.1
Page 3 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2016 9608 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 79 of 89
TOPICAL BOOK 1.1
Page 6 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2016 9608 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 80 of 89
TOPICAL BOOK 1.1
3(b)(ii) 4 1
Page 81 of 89
TOPICAL BOOK 1.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
Page 82 of 89
TOPICAL BOOK 1.1
• 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
Page 83 of 89
TOPICAL BOOK 1.1
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
Page 84 of 89
TOPICAL BOOK 1.1
Page 4 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – October/November 2015 9608 12
(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
Page 85 of 89
TOPICAL BOOK 1.1
Page 2 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – October/November 2015 9608 13
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
Page 86 of 89
TOPICAL BOOK 1.1
Page 7 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – October/November 2015 9608 13
8 (a)
Picture element
Image resolution
Vector graphic
1 mark for each correct line, two lines from one box is incorrect [6]
Page 87 of 89
TOPICAL BOOK 1.1
Page 3 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – October/November 2016 9608 12
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
Page 88 of 89
TOPICAL BOOK 1.1
Page 8 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – October/November 2016 9608 13
• Bitmap files are usually bigger than vector graphics files // Take up more memory space
Page 89 of 89