SlideShare a Scribd company logo
CAMBRIDGE IGCSE COMPUTER SCIENCE WORKBOOK
David Watson
Helen Williams
Cambridge
IGCSE
®
Computer
Science
Workbook
25
YEARS
C
a
m
b
r
i
d
g
e
International Ex
a
m
i
n
a
t
i
o
n
s
Working with
Hachette UK’s policy is to use papers that are natural, renewable and recyclable products and made from wood grown in
sustainable forests. The logging and manufacturing processes are expected to conform to the environmental regulations of the
country of origin.
Orders: please contact Bookpoint Ltd, 130 Park Drive, Milton Park, Abingdon, Oxon OX14 4SE. Telephone: (44) 01235 827720.
Fax: (44) 01235 400454. Email education@bookpoint.co.uk Lines are open from 9 a.m. to 5 p.m., Monday to Saturday, with a
24-hour message answering service. You can also order through our website: www.hoddereducation.com
® IGCSE is the registered trademark of Cambridge International Examinations. This text has not been through the Cambridge
endorsement process.
© David Watson and Helen Williams 2016
First published in 2016 by
Hodder Education,
An Hachette UK Company
Carmelite House
50 Victoria Embankment
London EC4Y 0DZ
www.hoddereducation.com
Impression number10 9 8 7 6 5 4 3 2 1
Year 2019 2018 2017 2016
All rights reserved. Apart from any use permitted under UK copyright law, no part of this publication may be reproduced or
transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, or held within any
information storage and retrieval system, without permission in writing from the publisher or under licence from the Copyright
Licensing Agency Limited. Further details of such licences (for reprographic reproduction) may be obtained from the Copyright
Licensing Agency Limited, Saffron House, 6–10 Kirby Street, London EC1N 8TS.
Cover photo © Scanrail – Fotolia
Illustrations by Aptara Inc.
Typeset by Aptara, Inc.
Printed in the UK
A catalogue record for this title is available from the British Library.
ISBN: 978 1471 86867 2
3
Contents
1 Binary systems and hexadecimal 2
2 Communication and internet technologies 13
3 Logic gates and logic circuits 18
4 Operating systems and computer architecture 26
5 Input and output devices 30
6 Memory and data storage 38
7 High-and-low level languages 42
8 Security and ethics 48
9 Problem-solving and design 53
10 Pseudocode and flowcharts 59
11 Programming concepts 65
12 Data structures: arrays and using pre-release material 68
13 Databases 75
Photocopying prohibited
Cambridge IGCSE Computer Science Workbook
2
1 Binary systems and hexadecimal
1 Convert the denary number 165 into: [3 marks]
a binary
........................................................................................................................................................................
........................................................................................................................................................................
b hexadecimal
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
2 a Convert the following binary number into denary: [6 marks]
0 1 1 1 0 1 1 0
........................................................................................................................................................................
........................................................................................................................................................................
b Convert the following hexadecimal number into denary:
5F
........................................................................................................................................................................
........................................................................................................................................................................
c Convert the following binary number into hexadecimal:
1 0 1 0 1 1 0 0 0 1 0 0
........................................................................................................................................................................
........................................................................................................................................................................
d Convert the following hexadecimal number into binary:
3ED
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Cambridge IGCSE Computer Science Workbook
Photocopying prohibited
3
	1 
Binary systems and hexadecimal
3 a How many megabytes (MB) of storage would be needed to store 800 photographs
each of which are 16 MB in size? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Write your answer from part a in gigabytes (GB). [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
4 The ASCII code for ‘A’ is 65 and for ‘a’ is 97.
a Write these denary values in 8-bit binary: [2 marks]
i 65
........................................................................................................................................................................
........................................................................................................................................................................
ii 77
........................................................................................................................................................................
........................................................................................................................................................................
b Predict the denary ASCII code for ‘V’ and ‘v’: [2 marks]
i ‘V’
........................................................................................................................................................................
........................................................................................................................................................................
ii ‘v’
........................................................................................................................................................................
........................................................................................................................................................................
c Write the two denary values in part b in 8-bit binary format: [2 marks]
i ‘V’
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
Cambridge IGCSE Computer Science Workbook
4
1 Binary systems and hexadecimal
ii ‘v’
........................................................................................................................................................................
........................................................................................................................................................................
d Using your answers to part a and part b, suggest an easy way of finding the ASCII binary
code for a lower case letter (e.g. ‘m’) if the ASCII code for the upper case letter (e.g. ‘M’)
is known. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
5 A computer system uses binary codes for letters of the alphabet as follows:
A = 10, B = 11, C = 12, …… , X = 33, Y = 34, Z = 35
a Write the denary value for ‘X’ in binary using an 8-bit register: [1 mark]
b To convert the binary code for ‘X’ to the binary code for ‘x’, all the bits in the 8-bit register
in part a are moved (shifted) two places to the right.
i Write down the contents of the 8-bit register after the bits have been moved to
the right. [2 marks]
ii Convert the binary value in part bi into denary: [1 mark]
........................................................................................................................................................................
........................................................................................................................................................................
c Predict the denary values for the following two letters using the method described in
part b: [4 marks]
i r
........................................................................................................................................................................
........................................................................................................................................................................
ii m
........................................................................................................................................................................
........................................................................................................................................................................
Cambridge IGCSE Computer Science Workbook
Photocopying prohibited
5
	1 
Binary systems and hexadecimal
6 a Describe how hexadecimal notation is used in the following: [6 marks]
i MAC addresses
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
ii Memory dumps
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
iii HTML
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Using the ASCII table (Figure 1.7) on page 12 in the Cambridge IGCSE® Computer Science
textbook, write down what web address/URL is being represented below: [3 marks]
%77%77%77%2E%48%26%53%73%74%75%64%79$20%62%6F%6F%6B%73%2E%63%6F%
2E%75%6B
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
7 a Convert the denary number 44801 into hexadecimal. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
b Convert the hexadecimal number in part a into a 16-bit binary number. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
Cambridge IGCSE Computer Science Workbook
6
1 Binary systems and hexadecimal
8 a Explain the two parts that make up a typical MAC address. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b A MAC address can be termed either UAA or LAA.
Give two reasons why MAC addresses need to be changed when using LAA. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
9 An 8-bit register is used to control a paint spray gun. Each position in the register refers to a specific
function:
paint levels
are OK
paint levels
are low
spray gun
switched on
spray gun
switched off
red paint
chosen
green paint
chosen
blue paint
chosen
yellow paint
chosen
A 1 value in the register indicates that a specific function is ON; a 0 value indicates it is OFF.
For example:
1 0 1 0 1 0 1 0
indicates:
• all paint levels are OK
• spray gun is switched on
• red and blue paints have been selected.
a What does the following register indicate: [3 marks]
0 1 0 1 0 0 0 1
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Cambridge IGCSE Computer Science Workbook
Photocopying prohibited
7
	1 
Binary systems and hexadecimal
b What would be the contents of the 8-bit register if the following conditions existed: [3 marks]
• all paint levels are OK
• the spray gun is switched off
• red and green paint had been selected?
c i What conditions would be represented by: 0 0 0 0 0 0 0 0 ? [1 mark]
........................................................................................................................................................................
........................................................................................................................................................................
ii Describe what would happen if the register contained: 1 1 1 1 1 1 1 1 [1 mark]
........................................................................................................................................................................
........................................................................................................................................................................
10 Six questions are shown on the left and eight numerical values are shown on the right.
By drawing arrows, connect each question to its correct numerical value (two of the
numerical values are not used). [6 marks]
What is the denary value of the
hexadecimal digit ‘E’?
10
22
12
28
14
32
16
40
What is the denary value of the
binary number
0 0 0 1 1 1 0 0 ?
If the download speed for
broadband is 64 megabits per
second, how long would it take to
download a 96 megabyte file (in
seconds)?
If 2x = 1 terabyte (TB), what is the
value of x?
How many bits are there in two
bytes of data?
What is the hexadecimal value of
the denary number 5 0 ?
Photocopying prohibited
Cambridge IGCSE Computer Science Workbook
8
1 Binary systems and hexadecimal
11 START
INPUT
number
X ← number
D ← 128
X ← X – D
is X < 0?
OUTPUT
0
X ← X + D
D ← D/2
is D < 1?
STOP
No
No
OUTPUT
1
Yes
Yes
a Trace through the flowchart for the following two values:
i 220 [4 marks]
Number X D OUTPUT
continue on the next page...
Cambridge IGCSE Computer Science Workbook
Photocopying prohibited
9
	1 
Binary systems and hexadecimal
Number X D OUTPUT
ii 73 [4 marks]
Number X D OUTPUT
b State the function of the flowchart in part a. [1 mark]
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
Cambridge IGCSE Computer Science Workbook
10
1 Binary systems and hexadecimal
12 a The HTML value # FF 00 00 represents the colour red,
value # 00 FF 00 represents the colour green, and
value # 00 00 FF represents the colour blue.
i If the colour orange requires value ‘FF’ for the red hue and value ‘80’ for the green
hue, what is the HTML representation for orange? [1 mark]
........................................................................................................................................................................
ii If the colour tan requires value ‘B1’ for the red hue, value ‘89’ for the green hue and
value ‘04’ for the blue hue, what is the HTML representation for tan? [1 mark]
........................................................................................................................................................................
b Describe how HTML is used when developing web pages. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
c An internet service provider offers the following specifications:
• download speed: 80 megabits per second data transfer rate
• upload speed: 16 megabits per second data transfer rate
i John wishes to download a movie which is 650 megabytes (650 MB) in size. Calculate
how long it would take (in seconds) to download the movie. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
ii John also wishes to upload 30 photographs onto a social media website. Each photograph is
15 megabytes (15 MB).
Calculate how long it would take to upload the 30 photographs (in seconds). [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Cambridge IGCSE Computer Science Workbook
Photocopying prohibited
11
	1 
Binary systems and hexadecimal
13 By drawing arrows, connect each term on the left to its correct description on the right. [5 marks]
14 A computer uses a binary system known as Binary Coded Decimal (BCD). In this system, each denary
digit (0 to 9) is represented by a 4-bit binary value:
8 4 2 1
a Give the 4-bit binary codes for the digits 9 and 6. [2 marks]
8 4 2 1
8 4 2 1
b Which denary numbers are represented by the following 4-bit binary codes: [4 marks]
8 4 2 1 8 4 2 1
1 0 0 0 0 1 0 1
....................................................................................
8 4 2 1 8 4 2 1 8 4 2 1
0 1 1 1 0 0 0 0 0 1 0 1
....................................................................................
hypertext mark-up language (HTML) the contents of the computer memory are
output to a screen or printer; this enables
a software developer to locate errors
also identified as a URL such as:
www.books.com
this is used to develop web pages; it is
used in the processing, definition and
presentation of text (e.g. the specification
of a text colour)
value, written in hexadecimal, which is
used to uniquely identify a device on the
network; it is often written in the form:
NN-NN-NN-DD-DD-DD
number system which uses the values 0 to
9 and the letters A to F to represent digits
hexadecimal number system
memory dump
media access control (MAC) address
web address
9
6
Photocopying prohibited
Cambridge IGCSE Computer Science Workbook
12
1 Binary systems and hexadecimal
c What is the largest denary number that can be represented by two bytes using this
BCD system? [1 mark]
......................................................................................................................................................................
d Using normal binary notation, what is the largest denary number that could be
represented by two bytes? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
e Suggest a use for the BCD system. [1 mark]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
15 Write down a series of steps that could be used to convert a denary number into a
hexadecimal number. Your steps should allow somebody to follow them clearly to give the
correct converted value. [7 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
13
Cambridge IGCSE Computer Science Workbook
2 Communication and internet
technologies
1 Name the type and method of data transmission being described below:
a Data transmitted in one direction only; one bit at a time over a single channel or wire. [2 marks]
......................................................................................................................................................................
b Several bits of data transmitted in both directions at the same time over several channels
or wires. [2 marks]
......................................................................................................................................................................
c Data transmitted in both directions, but not at the same time, along a single channel
or wire. [2 marks]
......................................................................................................................................................................
2 a Describe how it is possible to ensure data arrives correctly identified at its destination
when using asynchronous data transmission. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b Describe how it is possible to ensure that data is received in the correct groups when
using synchronous data transmission. [3 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
c Give one advantage and one disadvantage of using synchronous data transmission. [2 marks]
Advantage: ..................................................................................................................................................
Disadvantage: ..............................................................................................................................................
Photocopying prohibited
14
Cambridge IGCSE Computer Science Workbook
3 a Give the meaning of the term USB. [1 mark]
......................................................................................................................................................................
......................................................................................................................................................................
b Indicate with a tick (3) which of the following statements about USB connections
are true: [5 marks]
Statement about USB connections True (3)
All the wires in a USB connector are used in data transmission
The maximum cable length in a USB connection is 2 metres
Devices plugged into the computer using the USB connection are
automatically detected
The USB connection has become the industry standard for most
computers
The user will always be prompted to download a device driver
when the device is plugged in to the computer
c Give two examples of devices which can be connected to a computer using a USB
connection. [2 marks]
1 ...............................................................................................................................................................
2 ...............................................................................................................................................................
4 a A system uses even parity. Indicate which of the following bytes has even parity: [3 marks]
1 1 0 0 0 0 1 1
.......................................................................
0 0 0 1 1 1 1 1
.......................................................................
b Explain why parity checks are used. [1 mark]
........................................................................................................................................................................
........................................................................................................................................................................
i
iii
1 0 1 1 0 1 1 0
.......................................................................
ii
2 CommuniCation and internet teChnologies
Photocopying prohibited
15
Cambridge IGCSE Computer Science Workbook
2  Communication and internet technologies
c Nine bytes of data were transmitted from one computer to another computer. Even parity was
used by both systems. An additional byte, called the parity byte was also sent at the end of the
transmission.
The following table shows the nine bytes and parity byte following transmission:
parity bit bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 8
byte 1 1 1 1 0 1 1 1 0
byte 2 1 0 0 0 0 1 0 0
byte 3 0 1 1 1 0 0 1 0
byte 4 0 1 1 1 1 0 1 1
byte 5 1 1 0 0 0 1 1 0
byte 6 0 1 1 0 1 1 0 1
byte 7 1 0 0 1 0 0 0 0
byte 8 0 1 1 1 1 1 0 1
byte 9 0 0 0 0 1 0 0 1
parity byte: 0 0 1 1 1 1 0 0
i One of the bits has been transmitted incorrectly. Indicate which bit is incorrect by
giving its bit number and byte number: [2 marks]
bit number: ........................................................................................................................................
byte number: .....................................................................................................................................
ii Explain how you arrived at your answer to part ci. [3 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
iii Write down the corrected byte: [1 mark]
......................................................................................................................................................................
iv Describe a situation where a parity check would not identify which bit had been
transmitted incorrectly. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
Photocopying prohibited
16
Cambridge IGCSE Computer Science Workbook
2 CommuniCation and internet teChnologies
v Name and briefly describe another method to check if data has been transmitted
correctly. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
5 Which internet terms are being described below? [5 marks]
Companies that provide the user with access to the
internet; a monthly fee is usually charged for this
service
A unique address that identifies the location of a
device which is connected to the internet
A unique address that identifies the device that is
connected to the internet
A set of rules that must be obeyed when transferring
files across the internet
Software that allows a user to display a web page on
their computer screen; they translate the HTML from
the website
6 a HTML is made up of structure and presentation. Explain the difference between these
two terms. [3 marks]
Structure:......................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
Presentation: ................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b Indicate how you would know whether or not a website was secure. [1 mark]
......................................................................................................................................................................
......................................................................................................................................................................
Photocopying prohibited
17
Cambridge IGCSE Computer Science Workbook
2  Communication and internet technologies
7 Look at the following two HTML parts:
Part A
Part B
a Which of the above parts shows the .css file? [1 mark]
..............................................................................
b Using parts A and B from above, give two examples of tags. [2 marks]
......................................................................................................................................................................
c Show how a tag is closed. [1 mark]
......................................................................................................................................................................
d Explain why there are three groups of data in the color definition. [1 mark]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
e Which number base is used to represent values in the color definition? [1 mark]
......................................................................................................................................................................
Photocopying prohibited
18
Cambridge IGCSE Computer Science Workbook
3 Logic gates and logic circuits
1 Which logic gates have the following three truth tables? [3 marks]
a
A B X
0 0 0
0 1 1
1 0 1
1 1 1
...........................
2 Complete the truth table for the following logic circuit: [4 marks]
A
B
C
X
A B C Working area X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
3 a Write the following statement as a logic statement: [3 marks]
X is 1 if A and B are on or if B is off and C is on
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b A B X
0 0 1
0 1 1
1 0 1
1 1 0
...........................
c A B X
0 0 0
0 1 1
1 0 1
1 1 0
...........................
Photocopying prohibited
19
Cambridge IGCSE Computer Science Workbook
3  Logic gates and logic circuits
b Draw the logic circuit to represent your statement in part a. [4 marks]
A
B
X
C
4 a Complete the truth table for the following logic circuit: [2 marks]
A
B
X
A B Working area X
0 0
0 1
1 0
1 1
b Which single logic gate is represented by the truth table in part a? [1 mark]
......................................................................................................................................................................
c Explain why a single logic gate is often replaced by a logic circuit such as the one shown
in part a. [1 mark]
......................................................................................................................................................................
......................................................................................................................................................................
Photocopying prohibited
20
3 Logic gates and Logic circuits
Cambridge IGCSE Computer Science Workbook
5 a Complete the truth table for the following logic circuit: [4 marks]
A
B
C
X
A B C Working area X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
b Which simplified logic circuit could replace the logic circuit in part a? [1 mark]
......................................................................................................................................................................
6 a Complete the truth table for the following logic circuit: [4 marks]
A
B
C
X
Photocopying prohibited
21
Cambridge IGCSE Computer Science Workbook
3  Logic gates and logic circuits
A B C Working area X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
b What single logic gate could replace the following logic circuit? [2 marks]
.......................................................................................................................................................................
7 a Write down the logic statement to represent the following logic circuit: [3 marks]
A
B
C
X
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
Photocopying prohibited
22
3 Logic gates and Logic circuits
Cambridge IGCSE Computer Science Workbook
b Draw the logic circuit which corresponds to the following truth table: [4 marks]
A B C X
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
A
B X
C
8 A chemical process is monitored using a logic circuit. There are three inputs to the logic circuit
representing the parameters being monitored in the chemical process. An alarm, X, will give an
output value of 1 depending on certain conditions.
The following table describes the process conditions being monitored:
Parameter description Parameter Binary
value
Description of condition
reaction temperature T 0 temperature > 120°C
1 temperature <= 120°C
pressure of CO gas evolved P 0 pressure > 2 bars
1 pressure <= 2 bars
acid concentration A 0 acid concentration > 4 moles
1 acid concentration <= 4 moles
An alarm, X, will generate the value 1 if:
• either temperature > 120°C and acid concentration <= 4 moles
• or temperature <= 120°C and gas pressure <= 2 bars
• or acid concentration > 4 moles and gas pressure <= 2 bars
Photocopying prohibited
23
Cambridge IGCSE Computer Science Workbook
3  Logic gates and logic circuits
a Write the logic statement to represent this system. [3 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b Draw the logic circuit to represent this system. [7 marks]
T
A X
P
c Complete the truth table to represent this system. [4 marks]
T A P Working area X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Photocopying prohibited
24
3 Logic gates and Logic circuits
Cambridge IGCSE Computer Science Workbook
9 A safety system uses the input from three sensors A, B and C. The binary values from these sensors
form the input to a logic circuit.
Logic circuit ‘X’ Output, X, from logic circuit
Sensor A
Sensor B
Sensor C
The output, X, from the logic circuit is 1 if:
• either A is 1 and B is 1
• or A is 0 and C is 1
• or B is 0 and C is 1
a Draw the logic circuit to represent the above system. [7 marks]
A
B X
C
b Complete the truth table for the above system. [4 marks]
A B C Working area X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Photocopying prohibited
25
Cambridge IGCSE Computer Science Workbook
3  Logic gates and logic circuits
c For safety reasons, the sensors feed into three different logic circuits (numbered 1, 2 and 3) which
produce the outputs X, Y and Z. These three outputs then form the inputs to another logic circuit
that has the output, Q.
The three logic circuits are connected to this extra logic circuit as shown below:
Logic
circuit 1
Output X
Output Y
Q
Output Z
Logic
circuit 2
Logic
circuit 3
inputs
from
the
three
sensors
A, B
and C
Complete the truth table for this system. [4 marks]
X Y Z Working area Q
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Photocopying prohibited
26
Cambridge IGCSE Computer Science Workbook
4 Operating systems and
computer architecture
1 Give six functions of a typical operating system (OS). [6 marks]
1 .................................................................................................................................................................
2 .................................................................................................................................................................
3 .................................................................................................................................................................
4 .................................................................................................................................................................
5 .................................................................................................................................................................
6 .................................................................................................................................................................
2 a Describe three different types of interrupt. [3 marks]
1 .................................................................................................................................................................
.................................................................................................................................................................
2 .................................................................................................................................................................
.................................................................................................................................................................
3 .................................................................................................................................................................
.................................................................................................................................................................
b What is meant by the term buffer? [1 mark]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
c The flowchart on the opposite page shows how buffers and interrupts are used when the
processor sends data to a printer. Some of the items are missing from the flowchart.
Using item numbers only, complete the flowchart using the following list of items: [6 marks]
Item number Item
1 contents of printer buffer emptied to printer
2 current task is suspended while interrupt is serviced
3 data to be printed out is sent to the printer buffer
4 processor continues with its current tasks
5 processor continues with current tasks while printer buffer is emptied
6 when all the data is printed, printer buffer becomes empty
Photocopying prohibited
27
Cambridge IGCSE Computer Science Workbook
4  Operating systems and computer architecture
Any data to
be sent to
printer?
No
No
All data
sent to
printer?
Interrupt signal is
sent to request
more data to be
sent to printer
Yes
Yes
3 a Name three types of bus used in the von Neumann architecture. [3 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b Name three types of address used in the von Neumann architecture. [3 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
Photocopying prohibited
28
4 Operating systems and cOmputer architecture
Cambridge IGCSE Computer Science Workbook
c The memory contents of a computer are shown below.
Address Contents
1000 0000 0111 1100
1000 0001 1000 0011
1000 0010 1111 1101
1000 0011 0111 1110
1000 0100 1100 1101
1111 1100
1111 1101 0110 0011
1111 1110 1010 0111
1111 1111 1111 0011
i Show the contents of the MAR and MDR if we want to READ the contents of memory
location 1 1 1 1 1 1 1 0. [2 marks]
MAR:
MDR:
ii Show the contents of the MAR and MDR if we wish to write 1 1 0 0 1 1 0 1 into memory
location 1 0 0 0 0 1 0 0. [2 marks]
MAR:
MDR:
iii If MAR contains 1 1 1 1 1 1 0 0 and MDR contains 0 0 1 1 1 1 0 0, fill in the shaded
cell of the memory contents diagram above. [1 mark]
4 The diagram on the opposite page shows a typical fetch–execute cycle; however, five of the stages
have been omitted. Complete the cycle by writing the following stages in their correct position.
Stage Description of stage
1 Address is then copied from PC to MAR via the address bus
2 Contents of memory location contained in MAR are then copied into MDR
3 Instruction is decoded and then executed by sending out signals via control bus to
the computer components
4 The PC contains the address of memory location of the next instruction to be
fetched
5 Value of PC is then incremented by 1 so it now points to the next instruction to be
fetched
[5 marks]
Photocopying prohibited
29
Cambridge IGCSE Computer Science Workbook
4  Operating systems and computer architecture
Contents of MAR are then copied and placed in the CIR
5 a Explain why some devices do not need to have an operating system. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b Give an example of a device which does not require an operating system. [1 mark]
......................................................................................................................................................................
Photocopying prohibited
30
Cambridge IGCSE Computer Science Workbook
5 Input and output devices
1 Describe how face recognition software is used at an airport to verify the identity of
passengers. [4 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
2 Explain each of the following scanner terms. [6 marks]
CCD: ................................................................................................................................................................
.........................................................................................................................................................................
.........................................................................................................................................................................
CT: ...................................................................................................................................................................
.........................................................................................................................................................................
.........................................................................................................................................................................
MRI: ................................................................................................................................................................
.........................................................................................................................................................................
.........................................................................................................................................................................
3 a A barcode showing three digits is shown below.
A B
1
C
Photocopying prohibited
31
Cambridge IGCSE Computer Science Workbook
5  Input and output devices
Give the binary value of each digit. [3 marks]
A: ...............................................................................................................................................................
B: ...............................................................................................................................................................
C: ...............................................................................................................................................................
b A supermarket uses barcodes on all its items. When a customer goes to check out, a number of
input and output devices may be used.
Name two input devices and two output devices. Give a different use for each named
device. [8 marks]
Input device 1: ..........................................................................................................................................
Use: ...........................................................................................................................................................
....................................................................................................................................................................
Input device 2: ..........................................................................................................................................
Use: ...........................................................................................................................................................
Output device 1: .......................................................................................................................................
Use: ...........................................................................................................................................................
....................................................................................................................................................................
Output device 2: .......................................................................................................................................
Use: ...........................................................................................................................................................
....................................................................................................................................................................
c Give two benefits to the supermarket manager and two benefits to customers of using
barcodes on all items. [4 marks]
Manager
1 .................................................................................................................................................................
....................................................................................................................................................................
2 .................................................................................................................................................................
....................................................................................................................................................................
Customer
1 .................................................................................................................................................................
...................................................................................................................................................................
2 .................................................................................................................................................................
....................................................................................................................................................................
Photocopying prohibited
32
5 Input and output devIces
Cambridge IGCSE Computer Science Workbook
3 The barcode on the right is known as a QR code:
a What does ‘QR’ mean? [1 mark]
......................................................................................................................................................................
b Give two benefits of using QR codes. [2 marks]
1 .................................................................................................................................................................
................................................................................................................................................................
2 .................................................................................................................................................................
................................................................................................................................................................
c Explain how a tourist could use QR codes at an airport to help plan a holiday. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
4 Give the most suitable input device for each of the following applications. A different
device must be given in each case. [5 marks]
Application Suitable input device
Entering text and data into a word processor or
spreadsheet
Selecting an option or icon from an onscreen menu
Input a user’s voice into a computer as part of a voice
recognition system
Converting a hard copy document into an electronic
form to be stored in a computer
System that allows a user to write and draw on a screen
which then automatically saves the text and images in
a memory
Photocopying prohibited
33
Cambridge IGCSE Computer Science Workbook
5  Input and output devices
5 a Inkjet printers usually fall into two categories: thermal bubble or piezoelectric.
Choose one of these categories and describe how ink droplets are produced. [3 marks]
Category: ........................................................................................................................................................
........................................................................................................................................................................
Description: ....................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Give one advantage and one disadvantage of inkjet printers compared with laser
printers. [2 marks]
Advantage: ....................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Disadvantage: ................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
c The diagram on the following page shows the steps carried out when an inkjet printer prints a
document.
The steps have not been written in the correct order. By writing the numbers 1 to 9 next to each
step, place them in the correct order.
The first one has been done for you. [8 marks]
Photocopying prohibited
34
5 Input and output devIces
Cambridge IGCSE Computer Science Workbook
Steps Order
The printer driver checks whether the chosen printer is ready to print the document
Once the printer buffer is empty, the printer sends an interrupt to the processor
requesting more data to be sent; this action continues until the whole document is
printed
A sheet of paper is fed into the printer body; if no paper is available or the paper is
jammed, an error message is sent to the computer
At the end of each full pass of the print head, the paper is advanced slightly to allow
the next line to be printed
The printer driver ensures that the data is in a format that the chosen printer can process
Data is sent to the printer and is stored in a temporary memory, known as the printer
buffer
Data from the document is first of all sent to the printer driver 1
As a sheet of paper is fed through the printer, the print head moves from side to side
printing text/image in the four colours
The whole process is continued until the printer buffer is empty
6 a 3D printers use various ways to produce solid objects. Explain each of the following
terms: [3 marks]
Additive: .........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Direct 3D printing: .........................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Binder 3D printing: ........................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
35
Cambridge IGCSE Computer Science Workbook
5  Input and output devices
b A car enthusiast has bought a car made in 1921. Unfortunately, none of the parts for the car are
still made.
Explain how 3D technology could be used to create any part for this car. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
c Describe three other uses of 3D printers. [3 marks]
1 .................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
2 .................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
3 .................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
7 a Most modern televisions and computer screens are LCD and use LED back-lit technology.
Give three advantages of using LED back-lit technology rather the older CCFL
(fluorescent lamp) technology. [3 marks]
1 .................................................................................................................................................................
....................................................................................................................................................................
2 .................................................................................................................................................................
....................................................................................................................................................................
3 .................................................................................................................................................................
....................................................................................................................................................................
Photocopying prohibited
36
5 Input and output devIces
Cambridge IGCSE Computer Science Workbook
b i Explain the term OLED. [1 mark]
........................................................................................................................................................................
........................................................................................................................................................................
ii Give two benefits of using OLED technology rather than LCD. [2 marks]
1.............................................................................................................................................................
...............................................................................................................................................................
2 ............................................................................................................................................................
...............................................................................................................................................................
8 Describe a suitable different application that uses each of the following sensors. [4 marks]
Sensor Application
temperature
light
infrared
magnetic field
Photocopying prohibited
37
Cambridge IGCSE Computer Science Workbook
5  Input and output devices
9 A burglar alarm system uses pressure sensors and acoustic (sound) sensors to detect the presence of
an intruder.
A microprocessor is used to monitor and control the whole system. A keypad is used to key in a
4-digit PIN that either activates or deactivates the system.
If an intruder is detected, an alarm is sounded and also a blue flashing light outside the building.
Describe in detail how the sensors and microprocessor interact to detect and warn of
an intruder. [7 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
38
Cambridge IGCSE Computer Science Workbook
6 Memory and data storage
1 Five file terms are shown on the left and five file descriptions are shown on the right.
By drawing arrows link each file term to its correct file description. [5 marks]
MP3 file
BMP file
MIDI file
jpeg image
lossy file format
uses compression technology to reduce
the size of an image
uses compression technology to reduce
the size of a music file by up to 90%
file compression algorithm that reduces
file size by eliminating unnecessary bits
of data
a raw bitmap image that has not yet been
compressed
communication protocol that allows
electronic musical instruments to interact
with each other
2 a Give three differences between RAM and ROM memories. [3 marks]
1 .................................................................................................................................................................
...................................................................................................................................................................
...................................................................................................................................................................
2 .................................................................................................................................................................
...................................................................................................................................................................
...................................................................................................................................................................
3 .................................................................................................................................................................
...................................................................................................................................................................
...................................................................................................................................................................
b Two types of RAM are DRAM and SRAM. In the diagram below, draw arrows to link
each type of RAM to its correct feature(s). [5 marks]
DRAM
SRAM
needs to be constantly refreshed to retain
the data
consumes the least power of the two
types of RAM
makes use of ‘flip flops’ to hold bits of
memory
used in computers where high speed
processing is needed; e.g. memory cache
has the higher storage capacity of the two
types of RAM
Photocopying prohibited
39
Cambridge IGCSE Computer Science Workbook
6  Memory and data storage
3 a Give an example of data which matches the data formats below. [3 marks]
Real: ................................................................................................................................................................
Integer: ...........................................................................................................................................................
Currency: ........................................................................................................................................................
b i Assuming each character is 1 byte in size, and ignoring spaces, how many bytes of
memory would be needed to store the following sentence? [1 mark]
‘this shows you how lossless would use less memory’............................................
ii A file compression system replaces parts of the text in the sentence as follows:
th = 1, is = 2, how = 3, ou = 4, less = 5
Rewrite the sentence in part bi using the above numerical values where possible. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
iii How many bytes of memory does your new sentence in part bii require? [1 mark]
......................................................................................................................................................................
iv Explain why the method described in part bii is lossless compression. [1 mark]
......................................................................................................................................................................
......................................................................................................................................................................
4 a Place each of the following storage and memory devices into their correct category: [6 marks]
• Blu-ray disc
• DVD-RAM
• Fixed hard-disk drive (HDD)
• Fixed solid-state drive (SSD)
• Flash memory/memory stick
• RAM
• Removable hard-disk drive (HDD)
• ROM
Primary Secondary Off-line
Photocopying prohibited
40
6 MeMory and data storage
Cambridge IGCSE Computer Science Workbook
b Give three advantages of using SSD rather than HDD in a computer system. [3 marks]
1 .................................................................................................................................................................
....................................................................................................................................................................
2 .................................................................................................................................................................
....................................................................................................................................................................
3 .................................................................................................................................................................
....................................................................................................................................................................
5 a The following table shows six features of optical media. By placing ticks (3) in the
correct boxes, indicate which features refer to which optical media. [3 marks]
Optical media Use red lasers
to read/write
Use blue
lasers to
read/write
Use two
polycarbonate
layers
Use one
polycarbonate
layer
Track pitch
< 1µm
Track pitch
> 1µm
CD
DVD
Blu-ray
b Describe three advantages of using Blu-ray discs rather than normal DVDs to
store movies. [3 marks]
1 .................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
2 .................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
3 .................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
Photocopying prohibited
41
Cambridge IGCSE Computer Science Workbook
6  Memory and data storage
6 A student wrote: ‘The future of optical media is one of obsolescence in the next five years’.
Discuss this statement by reference to modern technologies. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
42
Cambridge IGCSE Computer Science Workbook
7 High- and low-level languages
1 What is a program? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
2 The following terms are used about high-level programming languages. [3 marks]
State what each term means.
a Portable
........................................................................................................................................................................
........................................................................................................................................................................
b Problem solving
........................................................................................................................................................................
........................................................................................................................................................................
c Translation
........................................................................................................................................................................
........................................................................................................................................................................
3 Give four examples of high-level programming languages. [4 marks]
1 ......................................................................................................................................................................
2 ......................................................................................................................................................................
3 ......................................................................................................................................................................
4 ......................................................................................................................................................................
Photocopying prohibited
43
Cambridge IGCSE Computer Science Workbook
7  High-and low-level languages
4 Give four benefits to a programmer of developing a program using a high-level
programming language. [4 marks]
1 ......................................................................................................................................................................
........................................................................................................................................................................
2 ......................................................................................................................................................................
........................................................................................................................................................................
3 ......................................................................................................................................................................
........................................................................................................................................................................
4 ......................................................................................................................................................................
........................................................................................................................................................................
5 The following terms are used about low-level programming languages. [2 marks]
State what each term means.
a Machine code
........................................................................................................................................................................
........................................................................................................................................................................
b Assembly language
........................................................................................................................................................................
........................................................................................................................................................................
6 Give four benefits to a programmer of developing a program using a low-level
programming language. [4 marks]
1 ......................................................................................................................................................................
.........................................................................................................................................................................
2 ......................................................................................................................................................................
.........................................................................................................................................................................
3 ......................................................................................................................................................................
.........................................................................................................................................................................
4 ......................................................................................................................................................................
.........................................................................................................................................................................
Photocopying prohibited
44
7 HigH- and low-level languages
Cambridge IGCSE Computer Science Workbook
7 Using the programming statements in Chapter 7 of the Cambridge IGCSE Computer Science
textbook, show what the program code for adding two numbers (FirstNumber and
SecondNumber) together could look like: [4 marks]
a HLL
........................................................................................................................................................................
b LLL
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
c Hexadecimal
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
d Binary
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
8 a What is a translator? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Name three different types of translator. [3 marks]
1 .................................................................................................................................................................
2 .................................................................................................................................................................
3 .................................................................................................................................................................
Photocopying prohibited
45
Cambridge IGCSE Computer Science Workbook
7  High-and low-level languages
c For each translator describe which type of language it is used for and what is produced
after a successful translation. [6 marks]
1 .................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
2 .................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
3 .................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
9 a What is meant by a syntax error? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b What is meant by a logic error? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
c What happens when a compiler finds a syntax error? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
46
7 HigH- and low-level languages
Cambridge IGCSE Computer Science Workbook
d What happens when an interpreter finds a syntax error? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
10 Eight statements are shown on the left and three translators are shown on the right.
Draw lines to connect each statement to the translator it applies to (there can be more
than one line to a translator). [8 marks]
Compiler
Interpreter
Assembler
One low-level language statement is
usually translated into one machine code
instruction.
Translates a high-level language program
into machine code.
Assembled programs can be used without
this.
No executable file of machine code is
produced
Executes a high-level language program a
statement at a time
Compiled programs are used without this.
Translates a low-level language program
into machine code.
One high-level language statement can
be translated into several machine code
instructions.
11 What is an IDE? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
47
Cambridge IGCSE Computer Science Workbook
7  High-and low-level languages
12 a Give three disadvantages of using a compiler rather than an interpreter. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Give three advantages of using a compiler rather than an interpreter. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
48
Cambridge IGCSE Computer Science Workbook
8 Security and ethics
1 Six security terms are shown on the left and six descriptions are shown on the right.
By drawing arrows, link each security term to its correct description. [6 marks]
hacking legitimate-looking email sent out to a
user; as soon as they click on the link in
the email, they are sent to a fake website
malicious code installed on a user’s
hard drive or on a web server; the code
will redirect the user to a fake website
without their knowledge
program or program code that can
replicate/copy itself with the intention of
deleting or corrupting files or to cause a
computer malfunction
act of locating and using wireless internet
connections illegally; requires a mobile
device, wireless network card and an
antenna to pick up wireless signals
act of gaining illegal access to a computer
system
software that gathers information by
monitoring key presses on a user’s
computer; the key presses are sent back to
the person who sent the software
viruses
phishing
pharming
war driving
spyware
2 a Describe how websites make use of cookies. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Give three of the tasks carried out by a firewall. [3 marks]
1.................................................................................................................................................................
....................................................................................................................................................................
2.................................................................................................................................................................
....................................................................................................................................................................
3.................................................................................................................................................................
....................................................................................................................................................................
Photocopying prohibited
49
8  Security and ethics
Cambridge IGCSE Computer Science Workbook
c Describe three ways to prevent accidental loss of data such as file deletion, software or
hardware fault. [3 marks]
1.................................................................................................................................................................
....................................................................................................................................................................
2.................................................................................................................................................................
....................................................................................................................................................................
3.................................................................................................................................................................
....................................................................................................................................................................
3 a What is meant by the two terms SSL and TLS? [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Describe how TLS differs from SSL. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
c The five stages when a user wants to access a secure website using SSL are shown in the diagram
below. However, four of the stages are missing.
Complete the diagram on the following page using the following descriptions in
their correct order. [4 marks]
Stage number Description
1 If the web browser can authenticate the SSL certificate it sends a message back
to the web server to allow communications to begin
2 Once the message is received from the browser, the web server acknowledges
the web browser and SSL two-way data transfer begins
3 Web browser then requests that the web server identifies itself
4 Web server responds by sending a copy of its SSL certificate to the user’s web
browser
Photocopying prohibited
50
8 Security and ethicS
Cambridge IGCSE Computer Science Workbook
User’s web browser sends a message so that it can connect
with the required website secured by SSL
4 a Complete the diagram about encryption below by using the following terms. [3 marks]
1 Cypher text
2 Plain text
3 Encryption algorithm
Encryption key
b Explain what is meant by the following terms. [3 marks]
i Hashing algorithm
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
Photocopying prohibited
51
8  Security and ethics
Cambridge IGCSE Computer Science Workbook
ii Encryption algorithm
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
iii MD4 software
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
c Explain what the advantage is of using 128-bit or 256-bit data encryption rather than
56-bit encryption. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
5 a Explain what is meant by denial of service attack. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b Describe how it is possible for a user to guard against denial of service attacks. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
Photocopying prohibited
52
8 Security and ethicS
Cambridge IGCSE Computer Science Workbook
c Describe what signs would indicate to users that they had become victims of denial of
service attacks. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
6 Describe five ways a bank can protect its customers from security risks when visiting
its website. [5 marks]
1 ....................................................................................................................................................................
......................................................................................................................................................................
2 ....................................................................................................................................................................
.......................................................................................................................................................................
3 ....................................................................................................................................................................
.......................................................................................................................................................................
4 ....................................................................................................................................................................
.......................................................................................................................................................................
5 ....................................................................................................................................................................
.......................................................................................................................................................................
7 Which five terms are being described below? [5 marks]
Description Term
Set of principles set out to regulate the use of
computers and computer systems
The taking of another person’s idea or work
and claiming it as their own work without any
acknowledgement to the originator
Software a user can download from the internet free
of charge; once downloaded, there are no fees when
using it; however, it is subject to copyright laws
Software that users are allowed to try out free of
charge for a trial period; at the end of the trial
period, users will be requested to pay a fee if they
want to continue using it
Users have freedom to run, copy, change or adapt
this software without the need to seek permission;
the software is not protected by copyright but there
are still some restrictions
Photocopying prohibited
53
Cambridge IGCSE Computer Science Workbook
9 Problem-solving and design
1 What makes up a computer system? [5 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
2 What is top-down design? [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
3 Using the structure diagram in Figure 9.1 of the textbook, break down the check off/snooze
sub-system into further sub-systems. [3 marks]
Check off/snooze
4 Describe a library routine and give an example of one. [3 marks]
Description: ....................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Example: .........................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
54
9 Problem-solving and design
Cambridge IGCSE Computer Science Workbook
5 a What is an algorithm? [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
b Give two ways of representing an algorithm. [2 marks]
1 .................................................................................................................................................................
2 .................................................................................................................................................................
6 Name and describe three types of test data. [6 marks]
1 ......................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
2 ......................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
3 ......................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
7 Explain, using an example, what is meant by a set of test data. [3 marks]
Explanation: ...................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Example: .........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
55
Cambridge IGCSE Computer Science Workbook
8 a Explain the difference between validation and verification. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Give two examples of validation. [2 marks]
1 .................................................................................................................................................................
....................................................................................................................................................................
2 .................................................................................................................................................................
....................................................................................................................................................................
c Give two examples of verification. [2 marks]
1 .................................................................................................................................................................
....................................................................................................................................................................
2 .................................................................................................................................................................
....................................................................................................................................................................
9 Name and describe two validation checks. Give an example of each validation check in use. [6 marks]
Name: .............................................................................................................................................................
Description: ....................................................................................................................................................
........................................................................................................................................................................
Use: .................................................................................................................................................................
........................................................................................................................................................................
Name: .............................................................................................................................................................
Description: ....................................................................................................................................................
........................................................................................................................................................................
Use: .................................................................................................................................................................
........................................................................................................................................................................
9 Problem-solving and design
Photocopying prohibited
56
9 Problem-solving and design
Cambridge IGCSE Computer Science Workbook
10 Six examples are shown on the left and six validation checks are shown on the right.
Draw a line to connect each example to the validation check it applies to. [5 marks]
Range check
Format check
Presence check
Length check
Type check
Character check
The number of pupils in a class is a
whole number.
A person’s name only contains
alphanumeric characters.
Check that a code contains two
letters followed by three numbers.
A name field is not left blank
Numbers are in the range 10 to 20.
A password must contain exactly 10
characters.
11 a What is a check digit? [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b Is this ISBN correct? Use the ISBN 13 method on page 122 of the textbook to
check and show your working. [3 marks]
9780 7487 8296 3
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
Photocopying prohibited
57
Cambridge IGCSE Computer Science Workbook
c Use the modulo 11 method to calculate the check digits for these numbers. Show your
working. [4 marks]
1127
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
47857
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
12 The following algorithm shown as a flowchart checks the marks that are input and outputs the sum
of all the marks.
START
Sum ← 0
Reject ← 0
input Mark
is Mark–1?
Yes output Sum,
Reject
is Mark >
100 or
Mark < 0?
Reject ← Reject +1
Sum ← Mark + Sum
END
Yes
No
No
9 Problem-solving and design
Photocopying prohibited
58
9 Problem-solving and design
Cambridge IGCSE Computer Science Workbook
a What are the rules for a mark to be accepted? [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
b What value terminates the input? [1 mark]
......................................................................................................................................................................
c Use this data and the trace table below to dry run the algorithm. [4 marks]
17, 35, 24, −5, 0, 67, 82, 97, −21, 45, 23, −1, 99
Sum Reject Mark Output
d Explain why this is an effective solution to adding up marks and point out any
improvements that could be made. [3 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
Photocopying prohibited
59
Cambridge IGCSE Computer Science Workbook
10 Pseudocode and flowcharts
1 What values will be stored in the following variables when the assignment statements
below are completed? [5 marks]
Age ← 21
Name ← "Richard"
Value ←18 * 2
Sum ← Value + Age
Flag ← True
Age..........................................................................
Name........................................................................
Value......................................................................
Sum..........................................................................
Flag........................................................................
2 Write down two types of conditional statement and for each one show how you would
select someone whose age was either 10 or 20. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
60
10 Pseudocode and flowcharts
Cambridge IGCSE Computer Science Workbook
3 a Write down three different types of loop structure. [3 marks]
1 ......................................................................................................................................................................
2 ......................................................................................................................................................................
3 ......................................................................................................................................................................
b Here are three problems. For each one, choose a different loop structure for your pseudocode
solution.
i Input 10 numbers and print out their total. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
ii Input some numbers and calculate their total, an input of −1 stops the process. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
iii Input some numbers and calculate their total, stop when the total is greater than 20. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
61
Cambridge IGCSE Computer Science Workbook
10  Pseudocode and flowcharts
4 a Write down two different statements that can be used for input. [2 marks]
1 .....................................................................................................................................
2 .....................................................................................................................................
b Write down two different statements that can be used for output. [2 marks]
1 .....................................................................................................................................
2 .....................................................................................................................................
5 Write a pseudocode algorithm to check the level of stock, StockLevel, and output
'Reorder' when the value falls below 10. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
6 a Write a pseudocode algorithm to input 20 numbers and find the average of the positive
numbers. [7 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Explain how you would change your algorithm to reject any negative numbers. [2 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
62
10 Pseudocode and flowcharts
Cambridge IGCSE Computer Science Workbook
7 Seven examples are shown on the left and four types of statement are shown on the right.
Draw lines to connect each type of statement to the example(s) it applies to. [7 marks]
WHILE … DO … ENDWHILE Conditional
Loop
Assignment
Input/Output
Sum ← Num1 + Num2
REPEAT … UNTIL
INPUT Num1
PRINT 'Goodbye'
IF … THEN … ENDIF
FOR … TO … NEXT
8 Four flowchart symbols are shown on the left and four descriptions are shown on the right.
Draw lines to connect each symbol to the correct description. [3 marks]
Process
Terminator
Decision
Input/Output
Photocopying prohibited
63
Cambridge IGCSE Computer Science Workbook
10  Pseudocode and flowcharts
9 a Draw a flowchart to input 20 numbers and find the average of the positive numbers. [7 marks]
Photocopying prohibited
64
10 Pseudocode and flowcharts
Cambridge IGCSE Computer Science Workbook
b Explain how you would change your flowchart to work for 30 numbers that are
between 0 and 100. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
65
Cambridge IGCSE Computer Science Workbook
Only two values TRUE and FALSE Integer
Real
String
Boolean
Char
A single character
A whole number
A number with a fractional part
Several characters
11 Programming concepts
1 Five descriptions are shown on the left and five data types are shown on the right.
Draw lines to connect each data type to the correct description. [4 marks]
2 Explain, using examples, when you would use a variable and when you would use
a constant. [4 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
3 State, giving reasons, whether these data stores should be variables or constants. [6 marks]
a Average Mark
........................................................................................................................................................................
........................................................................................................................................................................
b Number of months in a year
........................................................................................................................................................................
........................................................................................................................................................................
c Number of pupils in a class
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
66
11 Programming concePts
Cambridge IGCSE Computer Science Workbook
4 a Here are three problems. For each one, write an efficient program to solve the problem.
i Input eight whole numbers and print out their total. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
ii Input some whole numbers and calculate their total, an input of −1 stops
the process. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
iii Input some whole numbers and calculate their total, stop when the total is greater
than 10. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
67
Cambridge IGCSE Computer Science Workbook
11  Programming concepts
b Give a set of test data that you could use for each program. [3 marks]
i ...................................................................................................................................................................
ii ...................................................................................................................................................................
iii ...................................................................................................................................................................
c Explain whether you would need to make any changes to your programs if real
numbers were used instead of whole numbers. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
5 a Write a program to input 10 numbers and find the average of the negative numbers. [7 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b Explain how you would change your program to reject any positive numbers. [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
c Give a set of test data that you could use for the program. [1 mark]
......................................................................................................................................................................
Photocopying prohibited
68
Cambridge IGCSE Computer Science Workbook
12 Data structures: arrays and
using pre-release material
1 Explain what the terms below mean when used about arrays. [6 marks]
Name: .............................................................................................................................................................
........................................................................................................................................................................
Size: ................................................................................................................................................................
........................................................................................................................................................................
Element: .........................................................................................................................................................
........................................................................................................................................................................
Index: ..............................................................................................................................................................
........................................................................................................................................................................
Type: ...............................................................................................................................................................
........................................................................................................................................................................
Dimension: .....................................................................................................................................................
........................................................................................................................................................................
2 Explain, using an example, when you would use an array. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
3 Using a high-level programming language, declare arrays to be used in the following situations.
a The names of 20 students. [1 mark]
........................................................................................................................................................................
b The marks of 200 students. [1 mark]
........................................................................................................................................................................
c Whether 30 students have enrolled or not. [1 mark]
........................................................................................................................................................................
Photocopying prohibited
69
Cambridge IGCSE Computer Science Workbook
12  Data structures: arrays and using pre-release material
4 a Here are three problems. For each one, write an efficient program using an array to solve the
problem. You can extend your program for each problem.
i Store the number of enquiries made each day for a week. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
ii Find the day with the most enquires and the one with the least enquiries. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
iii Find the total number of enquiries for the week and the average number of
enquiries per day. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Give a set of test data that you could use for these programs. [1 mark]
........................................................................................................................................................................
Photocopying prohibited
70
12 Data structures: arrays anD using pre-release material
Cambridge IGCSE Computer Science Workbook
You will need to use the pre-release material for your examination to answer the following questions.
5 a Write an algorithm, using pseudocode for task 1. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Write an algorithm, using pseudocode for task 2. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
71
Cambridge IGCSE Computer Science Workbook
12  Data structures: arrays and using pre-release material
c Write an algorithm, using pseudocode for task 3. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
d For task 3 use a flowchart to show the algorithm. [6 marks]
Photocopying prohibited
72
12 Data structures: arrays anD using pre-release material
Cambridge IGCSE Computer Science Workbook
6 a Choose three sets of test data for task 1: normal, abnormal/erroneous and boundary. [3 marks]
Normal: ..........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Abnormal: ......................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Boundary: ......................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b Choose three sets of test data for task 2: normal, abnormal/erroneous and boundary. [3 marks]
Normal: ...........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Abnormal: ......................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Boundary: .......................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
c Choose three sets of test data for task 3: normal, abnormal/erroneous and boundary. [3 marks]
Normal: ...........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Abnormal: ......................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Boundary: .......................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
73
Cambridge IGCSE Computer Science Workbook
12  Data structures: arrays and using pre-release material
7 a Draw and complete a trace table for task 1. Use your normal data for the trace. [5 marks]
b Draw and complete a trace table for task 1. Use your abnormal data for the trace. [5 marks]
Photocopying prohibited
74
12 Data structures: arrays anD using pre-release material
Cambridge IGCSE Computer Science Workbook
8 a For every variable you have used in your program(s) for tasks 1, 2 and 3, write the
variable declaration and explain why you have used this variable. [6 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
b For every constant you have used in your program(s) for tasks 1, 2 and 3, write the
variable declaration and explain why you have used this variable. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
c For every array you have used in your program(s) for tasks 1, 2 and 3, write the variable
declaration and explain why you have used this variable. [3 marks]
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Photocopying prohibited
75
Cambridge IGCSE Computer Science Workbook
13 Databases
1 Give three benefits of using databases. [3 marks]
1 ....................................................................................................................................................................
.......................................................................................................................................................................
2 ....................................................................................................................................................................
.......................................................................................................................................................................
3 ....................................................................................................................................................................
.......................................................................................................................................................................
2 Explain the following terms used about databases. [4 marks]
Table: ............................................................................................................................................................
......................................................................................................................................................................
Record: .........................................................................................................................................................
......................................................................................................................................................................
Field: .............................................................................................................................................................
......................................................................................................................................................................
Primary key: .................................................................................................................................................
......................................................................................................................................................................
3 A school keeps a database table (TEXTBOOK) of all the textbooks that are available for student use.
The following information is stored for each set of books: the name of the textbook, the ISBN, the
authors, the number of copies available for use, the subject it is used for.
a Select names and data types for each field in the table. [5 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
b i Name the fields that should be verified. [1 mark]
......................................................................................................................................................................
ii Name the fields that should be validated. [1 mark]
......................................................................................................................................................................
Photocopying prohibited
76
13 Databases
Cambridge IGCSE Computer Science Workbook
c Which field would you choose for the primary key and why would you choose it? [2 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
d Give the validation rules you would use for each field that is to be validated. [4 marks]
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
e A teacher wants to know the names of the textbooks available for a history class with 30 students
in it.
Complete the query-by-example grid below to show the search condition required. [3 marks]
Field:
Table:
Sort:
Show:
Criteria:
or:
4 a Write a query-by-example grid for the search condition in end of chapter question 3b
(on page 177 of the textbook); the table name is OILCO. [3 marks]
Field:
Table:
Sort:
Show:
Criteria:
or:
Photocopying prohibited
77
Cambridge IGCSE Computer Science Workbook
b Write a query-by-example grid for the search condition in end of chapter question 4b;
the table name is SHOP. [3 marks]
Field:
Table:
Sort:
Show:
Criteria:
or:
5 a Write a query-by-example grid for the search condition in end of chapter question 3c;
the table name is OILCO. [3 marks]
Field:
Table:
Sort:
Show:
Criteria:
or:
b Write a query-by-example grid for the search condition in end of chapter question 4c;
the table name is SHOP. [3 marks]
Field:
Table:
Sort:
Show:
Criteria:
or:
13 Databases
This workbook supports students using the Cambridge IGCSE
Computer Science textbook,providing plenty of extra practice
questions and activities.
■ Perfect for using throughout the course – ensures students
learn each topic thoroughly
■ Covers the two sections in the syllabus – Theory of
Computer Science and Practical Problem-Solving and
Programming
■ Answers are available online
Cambridge IGCSE®
Computer
Science
Workbook
For 25 years we have been trusted by Cambridge schools
around the world to provide quality support for teaching and
learning. For this reason we have been selected by Cambridge
International Examinations as an official publisher of endorsed
material for their syllabuses.
For 25 years we have been trusted by Cambridge schools
For 25 years we have been trusted by Cambridge schools
around the world to provide quality support for teaching and
around the world to provide quality support for teaching and
learning. For this reason we have been selected by Cambridge
learning. For this reason we have been selected by Cambridge
International Examinations as an official publisher of endorsed
International Examinations as an official publisher of endorsed
material for their syllabuses.
material for their syllabuses.
25
YEARS
C
a
m
b
r
i
d
g
e
International Ex
a
m
i
n
a
t
i
o
n
s
Working with
I S B N 978-1-471-86867-2
9 7 8 1 4 7 1 8 6 8 6 7 2

More Related Content

PDF
CAMBRIDGE IGCSE COMPUTER SCIENCE
PDF
Late modern english
PPTX
The origins of the english language
PPTX
Oliver Cromwell the Protector and the English Civil War
DOCX
Themes of psycholinguistics
PPT
English language presentation
PPTX
Edmund spenser’s ‘faery queen’
PDF
CS Workbook P1dfdfdfdfdfdfdfddfdffff.pdf
CAMBRIDGE IGCSE COMPUTER SCIENCE
Late modern english
The origins of the english language
Oliver Cromwell the Protector and the English Civil War
Themes of psycholinguistics
English language presentation
Edmund spenser’s ‘faery queen’
CS Workbook P1dfdfdfdfdfdfdfddfdffff.pdf

Similar to CAMBRIDGE IGCSE COMPUTER SCIENCE WORKBOOK (20)

PDF
IGCSE & O Level Computer Workbook for P1 by Inqilab Patel
PDF
Binary-systems_ANSWERS.1.1.1 cambridge o level
PDF
0478_w18_ms_11.pdf
PDF
2 problem solving and programming workbook by inqilab patel
PDF
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
PDF
Building a Simple Network - Study Notes
PPTX
technology111110000000000000000000000000000000000000000000
PDF
Cambridge International As A Level Computer Science Answers David Watson
PDF
IGCSE & O Level Computer Workbook for P2 by Inqilab Patel
DOCX
0417_Scheme_of_Work_(for_examination_from_2023) (1).docx
PDF
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
PDF
9th_Computer Full Exercise
PDF
Computer paper 3 may june 2008 9691 cambridge General Certificate of educatio...
PPTX
Part#1_Logic_Design.pptx LOGIC Circuit Course
PDF
Building a Simple Network - Study Notes
PDF
June 05 P1
PPTX
Computational Methods in Scientific Programming
PPTX
Computer Science: The best fun there is? @ Fareham Byte
PDF
Basics of computer and Number conversions.pdf
PDF
Computing 9691 Test paper Paper 1 for May / June 2007 Cambridge
IGCSE & O Level Computer Workbook for P1 by Inqilab Patel
Binary-systems_ANSWERS.1.1.1 cambridge o level
0478_w18_ms_11.pdf
2 problem solving and programming workbook by inqilab patel
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Building a Simple Network - Study Notes
technology111110000000000000000000000000000000000000000000
Cambridge International As A Level Computer Science Answers David Watson
IGCSE & O Level Computer Workbook for P2 by Inqilab Patel
0417_Scheme_of_Work_(for_examination_from_2023) (1).docx
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
9th_Computer Full Exercise
Computer paper 3 may june 2008 9691 cambridge General Certificate of educatio...
Part#1_Logic_Design.pptx LOGIC Circuit Course
Building a Simple Network - Study Notes
June 05 P1
Computational Methods in Scientific Programming
Computer Science: The best fun there is? @ Fareham Byte
Basics of computer and Number conversions.pdf
Computing 9691 Test paper Paper 1 for May / June 2007 Cambridge
Ad

Recently uploaded (20)

PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
RMMM.pdf make it easy to upload and study
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
Computing-Curriculum for Schools in Ghana
PDF
Classroom Observation Tools for Teachers
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Trump Administration's workforce development strategy
PDF
1_English_Language_Set_2.pdf probationary
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
advance database management system book.pdf
PDF
Complications of Minimal Access Surgery at WLH
Orientation - ARALprogram of Deped to the Parents.pptx
A systematic review of self-coping strategies used by university students to ...
RMMM.pdf make it easy to upload and study
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Computing-Curriculum for Schools in Ghana
Classroom Observation Tools for Teachers
Final Presentation General Medicine 03-08-2024.pptx
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
History, Philosophy and sociology of education (1).pptx
Trump Administration's workforce development strategy
1_English_Language_Set_2.pdf probationary
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
advance database management system book.pdf
Complications of Minimal Access Surgery at WLH
Ad

CAMBRIDGE IGCSE COMPUTER SCIENCE WORKBOOK

  • 3. Hachette UK’s policy is to use papers that are natural, renewable and recyclable products and made from wood grown in sustainable forests. The logging and manufacturing processes are expected to conform to the environmental regulations of the country of origin. Orders: please contact Bookpoint Ltd, 130 Park Drive, Milton Park, Abingdon, Oxon OX14 4SE. Telephone: (44) 01235 827720. Fax: (44) 01235 400454. Email education@bookpoint.co.uk Lines are open from 9 a.m. to 5 p.m., Monday to Saturday, with a 24-hour message answering service. You can also order through our website: www.hoddereducation.com ® IGCSE is the registered trademark of Cambridge International Examinations. This text has not been through the Cambridge endorsement process. © David Watson and Helen Williams 2016 First published in 2016 by Hodder Education, An Hachette UK Company Carmelite House 50 Victoria Embankment London EC4Y 0DZ www.hoddereducation.com Impression number10 9 8 7 6 5 4 3 2 1 Year 2019 2018 2017 2016 All rights reserved. Apart from any use permitted under UK copyright law, no part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, or held within any information storage and retrieval system, without permission in writing from the publisher or under licence from the Copyright Licensing Agency Limited. Further details of such licences (for reprographic reproduction) may be obtained from the Copyright Licensing Agency Limited, Saffron House, 6–10 Kirby Street, London EC1N 8TS. Cover photo © Scanrail – Fotolia Illustrations by Aptara Inc. Typeset by Aptara, Inc. Printed in the UK A catalogue record for this title is available from the British Library. ISBN: 978 1471 86867 2
  • 4. 3 Contents 1 Binary systems and hexadecimal 2 2 Communication and internet technologies 13 3 Logic gates and logic circuits 18 4 Operating systems and computer architecture 26 5 Input and output devices 30 6 Memory and data storage 38 7 High-and-low level languages 42 8 Security and ethics 48 9 Problem-solving and design 53 10 Pseudocode and flowcharts 59 11 Programming concepts 65 12 Data structures: arrays and using pre-release material 68 13 Databases 75
  • 5. Photocopying prohibited Cambridge IGCSE Computer Science Workbook 2 1 Binary systems and hexadecimal 1 Convert the denary number 165 into: [3 marks] a binary ........................................................................................................................................................................ ........................................................................................................................................................................ b hexadecimal ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 2 a Convert the following binary number into denary: [6 marks] 0 1 1 1 0 1 1 0 ........................................................................................................................................................................ ........................................................................................................................................................................ b Convert the following hexadecimal number into denary: 5F ........................................................................................................................................................................ ........................................................................................................................................................................ c Convert the following binary number into hexadecimal: 1 0 1 0 1 1 0 0 0 1 0 0 ........................................................................................................................................................................ ........................................................................................................................................................................ d Convert the following hexadecimal number into binary: 3ED ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 6. Cambridge IGCSE Computer Science Workbook Photocopying prohibited 3 1  Binary systems and hexadecimal 3 a How many megabytes (MB) of storage would be needed to store 800 photographs each of which are 16 MB in size? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Write your answer from part a in gigabytes (GB). [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ 4 The ASCII code for ‘A’ is 65 and for ‘a’ is 97. a Write these denary values in 8-bit binary: [2 marks] i 65 ........................................................................................................................................................................ ........................................................................................................................................................................ ii 77 ........................................................................................................................................................................ ........................................................................................................................................................................ b Predict the denary ASCII code for ‘V’ and ‘v’: [2 marks] i ‘V’ ........................................................................................................................................................................ ........................................................................................................................................................................ ii ‘v’ ........................................................................................................................................................................ ........................................................................................................................................................................ c Write the two denary values in part b in 8-bit binary format: [2 marks] i ‘V’ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 7. Photocopying prohibited Cambridge IGCSE Computer Science Workbook 4 1 Binary systems and hexadecimal ii ‘v’ ........................................................................................................................................................................ ........................................................................................................................................................................ d Using your answers to part a and part b, suggest an easy way of finding the ASCII binary code for a lower case letter (e.g. ‘m’) if the ASCII code for the upper case letter (e.g. ‘M’) is known. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 5 A computer system uses binary codes for letters of the alphabet as follows: A = 10, B = 11, C = 12, …… , X = 33, Y = 34, Z = 35 a Write the denary value for ‘X’ in binary using an 8-bit register: [1 mark] b To convert the binary code for ‘X’ to the binary code for ‘x’, all the bits in the 8-bit register in part a are moved (shifted) two places to the right. i Write down the contents of the 8-bit register after the bits have been moved to the right. [2 marks] ii Convert the binary value in part bi into denary: [1 mark] ........................................................................................................................................................................ ........................................................................................................................................................................ c Predict the denary values for the following two letters using the method described in part b: [4 marks] i r ........................................................................................................................................................................ ........................................................................................................................................................................ ii m ........................................................................................................................................................................ ........................................................................................................................................................................
  • 8. Cambridge IGCSE Computer Science Workbook Photocopying prohibited 5 1  Binary systems and hexadecimal 6 a Describe how hexadecimal notation is used in the following: [6 marks] i MAC addresses ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ii Memory dumps ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ iii HTML ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Using the ASCII table (Figure 1.7) on page 12 in the Cambridge IGCSE® Computer Science textbook, write down what web address/URL is being represented below: [3 marks] %77%77%77%2E%48%26%53%73%74%75%64%79$20%62%6F%6F%6B%73%2E%63%6F% 2E%75%6B ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 7 a Convert the denary number 44801 into hexadecimal. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ b Convert the hexadecimal number in part a into a 16-bit binary number. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................
  • 9. Photocopying prohibited Cambridge IGCSE Computer Science Workbook 6 1 Binary systems and hexadecimal 8 a Explain the two parts that make up a typical MAC address. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b A MAC address can be termed either UAA or LAA. Give two reasons why MAC addresses need to be changed when using LAA. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 9 An 8-bit register is used to control a paint spray gun. Each position in the register refers to a specific function: paint levels are OK paint levels are low spray gun switched on spray gun switched off red paint chosen green paint chosen blue paint chosen yellow paint chosen A 1 value in the register indicates that a specific function is ON; a 0 value indicates it is OFF. For example: 1 0 1 0 1 0 1 0 indicates: • all paint levels are OK • spray gun is switched on • red and blue paints have been selected. a What does the following register indicate: [3 marks] 0 1 0 1 0 0 0 1 ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 10. Cambridge IGCSE Computer Science Workbook Photocopying prohibited 7 1  Binary systems and hexadecimal b What would be the contents of the 8-bit register if the following conditions existed: [3 marks] • all paint levels are OK • the spray gun is switched off • red and green paint had been selected? c i What conditions would be represented by: 0 0 0 0 0 0 0 0 ? [1 mark] ........................................................................................................................................................................ ........................................................................................................................................................................ ii Describe what would happen if the register contained: 1 1 1 1 1 1 1 1 [1 mark] ........................................................................................................................................................................ ........................................................................................................................................................................ 10 Six questions are shown on the left and eight numerical values are shown on the right. By drawing arrows, connect each question to its correct numerical value (two of the numerical values are not used). [6 marks] What is the denary value of the hexadecimal digit ‘E’? 10 22 12 28 14 32 16 40 What is the denary value of the binary number 0 0 0 1 1 1 0 0 ? If the download speed for broadband is 64 megabits per second, how long would it take to download a 96 megabyte file (in seconds)? If 2x = 1 terabyte (TB), what is the value of x? How many bits are there in two bytes of data? What is the hexadecimal value of the denary number 5 0 ?
  • 11. Photocopying prohibited Cambridge IGCSE Computer Science Workbook 8 1 Binary systems and hexadecimal 11 START INPUT number X ← number D ← 128 X ← X – D is X < 0? OUTPUT 0 X ← X + D D ← D/2 is D < 1? STOP No No OUTPUT 1 Yes Yes a Trace through the flowchart for the following two values: i 220 [4 marks] Number X D OUTPUT continue on the next page...
  • 12. Cambridge IGCSE Computer Science Workbook Photocopying prohibited 9 1  Binary systems and hexadecimal Number X D OUTPUT ii 73 [4 marks] Number X D OUTPUT b State the function of the flowchart in part a. [1 mark] ........................................................................................................................................................................ ........................................................................................................................................................................
  • 13. Photocopying prohibited Cambridge IGCSE Computer Science Workbook 10 1 Binary systems and hexadecimal 12 a The HTML value # FF 00 00 represents the colour red, value # 00 FF 00 represents the colour green, and value # 00 00 FF represents the colour blue. i If the colour orange requires value ‘FF’ for the red hue and value ‘80’ for the green hue, what is the HTML representation for orange? [1 mark] ........................................................................................................................................................................ ii If the colour tan requires value ‘B1’ for the red hue, value ‘89’ for the green hue and value ‘04’ for the blue hue, what is the HTML representation for tan? [1 mark] ........................................................................................................................................................................ b Describe how HTML is used when developing web pages. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ c An internet service provider offers the following specifications: • download speed: 80 megabits per second data transfer rate • upload speed: 16 megabits per second data transfer rate i John wishes to download a movie which is 650 megabytes (650 MB) in size. Calculate how long it would take (in seconds) to download the movie. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ii John also wishes to upload 30 photographs onto a social media website. Each photograph is 15 megabytes (15 MB). Calculate how long it would take to upload the 30 photographs (in seconds). [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 14. Cambridge IGCSE Computer Science Workbook Photocopying prohibited 11 1  Binary systems and hexadecimal 13 By drawing arrows, connect each term on the left to its correct description on the right. [5 marks] 14 A computer uses a binary system known as Binary Coded Decimal (BCD). In this system, each denary digit (0 to 9) is represented by a 4-bit binary value: 8 4 2 1 a Give the 4-bit binary codes for the digits 9 and 6. [2 marks] 8 4 2 1 8 4 2 1 b Which denary numbers are represented by the following 4-bit binary codes: [4 marks] 8 4 2 1 8 4 2 1 1 0 0 0 0 1 0 1 .................................................................................... 8 4 2 1 8 4 2 1 8 4 2 1 0 1 1 1 0 0 0 0 0 1 0 1 .................................................................................... hypertext mark-up language (HTML) the contents of the computer memory are output to a screen or printer; this enables a software developer to locate errors also identified as a URL such as: www.books.com this is used to develop web pages; it is used in the processing, definition and presentation of text (e.g. the specification of a text colour) value, written in hexadecimal, which is used to uniquely identify a device on the network; it is often written in the form: NN-NN-NN-DD-DD-DD number system which uses the values 0 to 9 and the letters A to F to represent digits hexadecimal number system memory dump media access control (MAC) address web address 9 6
  • 15. Photocopying prohibited Cambridge IGCSE Computer Science Workbook 12 1 Binary systems and hexadecimal c What is the largest denary number that can be represented by two bytes using this BCD system? [1 mark] ...................................................................................................................................................................... d Using normal binary notation, what is the largest denary number that could be represented by two bytes? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ e Suggest a use for the BCD system. [1 mark] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 15 Write down a series of steps that could be used to convert a denary number into a hexadecimal number. Your steps should allow somebody to follow them clearly to give the correct converted value. [7 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 16. Photocopying prohibited 13 Cambridge IGCSE Computer Science Workbook 2 Communication and internet technologies 1 Name the type and method of data transmission being described below: a Data transmitted in one direction only; one bit at a time over a single channel or wire. [2 marks] ...................................................................................................................................................................... b Several bits of data transmitted in both directions at the same time over several channels or wires. [2 marks] ...................................................................................................................................................................... c Data transmitted in both directions, but not at the same time, along a single channel or wire. [2 marks] ...................................................................................................................................................................... 2 a Describe how it is possible to ensure data arrives correctly identified at its destination when using asynchronous data transmission. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b Describe how it is possible to ensure that data is received in the correct groups when using synchronous data transmission. [3 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... c Give one advantage and one disadvantage of using synchronous data transmission. [2 marks] Advantage: .................................................................................................................................................. Disadvantage: ..............................................................................................................................................
  • 17. Photocopying prohibited 14 Cambridge IGCSE Computer Science Workbook 3 a Give the meaning of the term USB. [1 mark] ...................................................................................................................................................................... ...................................................................................................................................................................... b Indicate with a tick (3) which of the following statements about USB connections are true: [5 marks] Statement about USB connections True (3) All the wires in a USB connector are used in data transmission The maximum cable length in a USB connection is 2 metres Devices plugged into the computer using the USB connection are automatically detected The USB connection has become the industry standard for most computers The user will always be prompted to download a device driver when the device is plugged in to the computer c Give two examples of devices which can be connected to a computer using a USB connection. [2 marks] 1 ............................................................................................................................................................... 2 ............................................................................................................................................................... 4 a A system uses even parity. Indicate which of the following bytes has even parity: [3 marks] 1 1 0 0 0 0 1 1 ....................................................................... 0 0 0 1 1 1 1 1 ....................................................................... b Explain why parity checks are used. [1 mark] ........................................................................................................................................................................ ........................................................................................................................................................................ i iii 1 0 1 1 0 1 1 0 ....................................................................... ii 2 CommuniCation and internet teChnologies
  • 18. Photocopying prohibited 15 Cambridge IGCSE Computer Science Workbook 2  Communication and internet technologies c Nine bytes of data were transmitted from one computer to another computer. Even parity was used by both systems. An additional byte, called the parity byte was also sent at the end of the transmission. The following table shows the nine bytes and parity byte following transmission: parity bit bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 8 byte 1 1 1 1 0 1 1 1 0 byte 2 1 0 0 0 0 1 0 0 byte 3 0 1 1 1 0 0 1 0 byte 4 0 1 1 1 1 0 1 1 byte 5 1 1 0 0 0 1 1 0 byte 6 0 1 1 0 1 1 0 1 byte 7 1 0 0 1 0 0 0 0 byte 8 0 1 1 1 1 1 0 1 byte 9 0 0 0 0 1 0 0 1 parity byte: 0 0 1 1 1 1 0 0 i One of the bits has been transmitted incorrectly. Indicate which bit is incorrect by giving its bit number and byte number: [2 marks] bit number: ........................................................................................................................................ byte number: ..................................................................................................................................... ii Explain how you arrived at your answer to part ci. [3 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... iii Write down the corrected byte: [1 mark] ...................................................................................................................................................................... iv Describe a situation where a parity check would not identify which bit had been transmitted incorrectly. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ......................................................................................................................................................................
  • 19. Photocopying prohibited 16 Cambridge IGCSE Computer Science Workbook 2 CommuniCation and internet teChnologies v Name and briefly describe another method to check if data has been transmitted correctly. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... 5 Which internet terms are being described below? [5 marks] Companies that provide the user with access to the internet; a monthly fee is usually charged for this service A unique address that identifies the location of a device which is connected to the internet A unique address that identifies the device that is connected to the internet A set of rules that must be obeyed when transferring files across the internet Software that allows a user to display a web page on their computer screen; they translate the HTML from the website 6 a HTML is made up of structure and presentation. Explain the difference between these two terms. [3 marks] Structure:...................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... Presentation: ................................................................................................................................................ ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b Indicate how you would know whether or not a website was secure. [1 mark] ...................................................................................................................................................................... ......................................................................................................................................................................
  • 20. Photocopying prohibited 17 Cambridge IGCSE Computer Science Workbook 2  Communication and internet technologies 7 Look at the following two HTML parts: Part A Part B a Which of the above parts shows the .css file? [1 mark] .............................................................................. b Using parts A and B from above, give two examples of tags. [2 marks] ...................................................................................................................................................................... c Show how a tag is closed. [1 mark] ...................................................................................................................................................................... d Explain why there are three groups of data in the color definition. [1 mark] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... e Which number base is used to represent values in the color definition? [1 mark] ......................................................................................................................................................................
  • 21. Photocopying prohibited 18 Cambridge IGCSE Computer Science Workbook 3 Logic gates and logic circuits 1 Which logic gates have the following three truth tables? [3 marks] a A B X 0 0 0 0 1 1 1 0 1 1 1 1 ........................... 2 Complete the truth table for the following logic circuit: [4 marks] A B C X A B C Working area X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 3 a Write the following statement as a logic statement: [3 marks] X is 1 if A and B are on or if B is off and C is on ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b A B X 0 0 1 0 1 1 1 0 1 1 1 0 ........................... c A B X 0 0 0 0 1 1 1 0 1 1 1 0 ...........................
  • 22. Photocopying prohibited 19 Cambridge IGCSE Computer Science Workbook 3  Logic gates and logic circuits b Draw the logic circuit to represent your statement in part a. [4 marks] A B X C 4 a Complete the truth table for the following logic circuit: [2 marks] A B X A B Working area X 0 0 0 1 1 0 1 1 b Which single logic gate is represented by the truth table in part a? [1 mark] ...................................................................................................................................................................... c Explain why a single logic gate is often replaced by a logic circuit such as the one shown in part a. [1 mark] ...................................................................................................................................................................... ......................................................................................................................................................................
  • 23. Photocopying prohibited 20 3 Logic gates and Logic circuits Cambridge IGCSE Computer Science Workbook 5 a Complete the truth table for the following logic circuit: [4 marks] A B C X A B C Working area X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 b Which simplified logic circuit could replace the logic circuit in part a? [1 mark] ...................................................................................................................................................................... 6 a Complete the truth table for the following logic circuit: [4 marks] A B C X
  • 24. Photocopying prohibited 21 Cambridge IGCSE Computer Science Workbook 3  Logic gates and logic circuits A B C Working area X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 b What single logic gate could replace the following logic circuit? [2 marks] ....................................................................................................................................................................... 7 a Write down the logic statement to represent the following logic circuit: [3 marks] A B C X ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ......................................................................................................................................................................
  • 25. Photocopying prohibited 22 3 Logic gates and Logic circuits Cambridge IGCSE Computer Science Workbook b Draw the logic circuit which corresponds to the following truth table: [4 marks] A B C X 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1 A B X C 8 A chemical process is monitored using a logic circuit. There are three inputs to the logic circuit representing the parameters being monitored in the chemical process. An alarm, X, will give an output value of 1 depending on certain conditions. The following table describes the process conditions being monitored: Parameter description Parameter Binary value Description of condition reaction temperature T 0 temperature > 120°C 1 temperature <= 120°C pressure of CO gas evolved P 0 pressure > 2 bars 1 pressure <= 2 bars acid concentration A 0 acid concentration > 4 moles 1 acid concentration <= 4 moles An alarm, X, will generate the value 1 if: • either temperature > 120°C and acid concentration <= 4 moles • or temperature <= 120°C and gas pressure <= 2 bars • or acid concentration > 4 moles and gas pressure <= 2 bars
  • 26. Photocopying prohibited 23 Cambridge IGCSE Computer Science Workbook 3  Logic gates and logic circuits a Write the logic statement to represent this system. [3 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b Draw the logic circuit to represent this system. [7 marks] T A X P c Complete the truth table to represent this system. [4 marks] T A P Working area X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
  • 27. Photocopying prohibited 24 3 Logic gates and Logic circuits Cambridge IGCSE Computer Science Workbook 9 A safety system uses the input from three sensors A, B and C. The binary values from these sensors form the input to a logic circuit. Logic circuit ‘X’ Output, X, from logic circuit Sensor A Sensor B Sensor C The output, X, from the logic circuit is 1 if: • either A is 1 and B is 1 • or A is 0 and C is 1 • or B is 0 and C is 1 a Draw the logic circuit to represent the above system. [7 marks] A B X C b Complete the truth table for the above system. [4 marks] A B C Working area X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
  • 28. Photocopying prohibited 25 Cambridge IGCSE Computer Science Workbook 3  Logic gates and logic circuits c For safety reasons, the sensors feed into three different logic circuits (numbered 1, 2 and 3) which produce the outputs X, Y and Z. These three outputs then form the inputs to another logic circuit that has the output, Q. The three logic circuits are connected to this extra logic circuit as shown below: Logic circuit 1 Output X Output Y Q Output Z Logic circuit 2 Logic circuit 3 inputs from the three sensors A, B and C Complete the truth table for this system. [4 marks] X Y Z Working area Q 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
  • 29. Photocopying prohibited 26 Cambridge IGCSE Computer Science Workbook 4 Operating systems and computer architecture 1 Give six functions of a typical operating system (OS). [6 marks] 1 ................................................................................................................................................................. 2 ................................................................................................................................................................. 3 ................................................................................................................................................................. 4 ................................................................................................................................................................. 5 ................................................................................................................................................................. 6 ................................................................................................................................................................. 2 a Describe three different types of interrupt. [3 marks] 1 ................................................................................................................................................................. ................................................................................................................................................................. 2 ................................................................................................................................................................. ................................................................................................................................................................. 3 ................................................................................................................................................................. ................................................................................................................................................................. b What is meant by the term buffer? [1 mark] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... c The flowchart on the opposite page shows how buffers and interrupts are used when the processor sends data to a printer. Some of the items are missing from the flowchart. Using item numbers only, complete the flowchart using the following list of items: [6 marks] Item number Item 1 contents of printer buffer emptied to printer 2 current task is suspended while interrupt is serviced 3 data to be printed out is sent to the printer buffer 4 processor continues with its current tasks 5 processor continues with current tasks while printer buffer is emptied 6 when all the data is printed, printer buffer becomes empty
  • 30. Photocopying prohibited 27 Cambridge IGCSE Computer Science Workbook 4  Operating systems and computer architecture Any data to be sent to printer? No No All data sent to printer? Interrupt signal is sent to request more data to be sent to printer Yes Yes 3 a Name three types of bus used in the von Neumann architecture. [3 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b Name three types of address used in the von Neumann architecture. [3 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ......................................................................................................................................................................
  • 31. Photocopying prohibited 28 4 Operating systems and cOmputer architecture Cambridge IGCSE Computer Science Workbook c The memory contents of a computer are shown below. Address Contents 1000 0000 0111 1100 1000 0001 1000 0011 1000 0010 1111 1101 1000 0011 0111 1110 1000 0100 1100 1101 1111 1100 1111 1101 0110 0011 1111 1110 1010 0111 1111 1111 1111 0011 i Show the contents of the MAR and MDR if we want to READ the contents of memory location 1 1 1 1 1 1 1 0. [2 marks] MAR: MDR: ii Show the contents of the MAR and MDR if we wish to write 1 1 0 0 1 1 0 1 into memory location 1 0 0 0 0 1 0 0. [2 marks] MAR: MDR: iii If MAR contains 1 1 1 1 1 1 0 0 and MDR contains 0 0 1 1 1 1 0 0, fill in the shaded cell of the memory contents diagram above. [1 mark] 4 The diagram on the opposite page shows a typical fetch–execute cycle; however, five of the stages have been omitted. Complete the cycle by writing the following stages in their correct position. Stage Description of stage 1 Address is then copied from PC to MAR via the address bus 2 Contents of memory location contained in MAR are then copied into MDR 3 Instruction is decoded and then executed by sending out signals via control bus to the computer components 4 The PC contains the address of memory location of the next instruction to be fetched 5 Value of PC is then incremented by 1 so it now points to the next instruction to be fetched [5 marks]
  • 32. Photocopying prohibited 29 Cambridge IGCSE Computer Science Workbook 4  Operating systems and computer architecture Contents of MAR are then copied and placed in the CIR 5 a Explain why some devices do not need to have an operating system. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b Give an example of a device which does not require an operating system. [1 mark] ......................................................................................................................................................................
  • 33. Photocopying prohibited 30 Cambridge IGCSE Computer Science Workbook 5 Input and output devices 1 Describe how face recognition software is used at an airport to verify the identity of passengers. [4 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 2 Explain each of the following scanner terms. [6 marks] CCD: ................................................................................................................................................................ ......................................................................................................................................................................... ......................................................................................................................................................................... CT: ................................................................................................................................................................... ......................................................................................................................................................................... ......................................................................................................................................................................... MRI: ................................................................................................................................................................ ......................................................................................................................................................................... ......................................................................................................................................................................... 3 a A barcode showing three digits is shown below. A B 1 C
  • 34. Photocopying prohibited 31 Cambridge IGCSE Computer Science Workbook 5  Input and output devices Give the binary value of each digit. [3 marks] A: ............................................................................................................................................................... B: ............................................................................................................................................................... C: ............................................................................................................................................................... b A supermarket uses barcodes on all its items. When a customer goes to check out, a number of input and output devices may be used. Name two input devices and two output devices. Give a different use for each named device. [8 marks] Input device 1: .......................................................................................................................................... Use: ........................................................................................................................................................... .................................................................................................................................................................... Input device 2: .......................................................................................................................................... Use: ........................................................................................................................................................... Output device 1: ....................................................................................................................................... Use: ........................................................................................................................................................... .................................................................................................................................................................... Output device 2: ....................................................................................................................................... Use: ........................................................................................................................................................... .................................................................................................................................................................... c Give two benefits to the supermarket manager and two benefits to customers of using barcodes on all items. [4 marks] Manager 1 ................................................................................................................................................................. .................................................................................................................................................................... 2 ................................................................................................................................................................. .................................................................................................................................................................... Customer 1 ................................................................................................................................................................. ................................................................................................................................................................... 2 ................................................................................................................................................................. ....................................................................................................................................................................
  • 35. Photocopying prohibited 32 5 Input and output devIces Cambridge IGCSE Computer Science Workbook 3 The barcode on the right is known as a QR code: a What does ‘QR’ mean? [1 mark] ...................................................................................................................................................................... b Give two benefits of using QR codes. [2 marks] 1 ................................................................................................................................................................. ................................................................................................................................................................ 2 ................................................................................................................................................................. ................................................................................................................................................................ c Explain how a tourist could use QR codes at an airport to help plan a holiday. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 4 Give the most suitable input device for each of the following applications. A different device must be given in each case. [5 marks] Application Suitable input device Entering text and data into a word processor or spreadsheet Selecting an option or icon from an onscreen menu Input a user’s voice into a computer as part of a voice recognition system Converting a hard copy document into an electronic form to be stored in a computer System that allows a user to write and draw on a screen which then automatically saves the text and images in a memory
  • 36. Photocopying prohibited 33 Cambridge IGCSE Computer Science Workbook 5  Input and output devices 5 a Inkjet printers usually fall into two categories: thermal bubble or piezoelectric. Choose one of these categories and describe how ink droplets are produced. [3 marks] Category: ........................................................................................................................................................ ........................................................................................................................................................................ Description: .................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Give one advantage and one disadvantage of inkjet printers compared with laser printers. [2 marks] Advantage: .................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ Disadvantage: ................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ c The diagram on the following page shows the steps carried out when an inkjet printer prints a document. The steps have not been written in the correct order. By writing the numbers 1 to 9 next to each step, place them in the correct order. The first one has been done for you. [8 marks]
  • 37. Photocopying prohibited 34 5 Input and output devIces Cambridge IGCSE Computer Science Workbook Steps Order The printer driver checks whether the chosen printer is ready to print the document Once the printer buffer is empty, the printer sends an interrupt to the processor requesting more data to be sent; this action continues until the whole document is printed A sheet of paper is fed into the printer body; if no paper is available or the paper is jammed, an error message is sent to the computer At the end of each full pass of the print head, the paper is advanced slightly to allow the next line to be printed The printer driver ensures that the data is in a format that the chosen printer can process Data is sent to the printer and is stored in a temporary memory, known as the printer buffer Data from the document is first of all sent to the printer driver 1 As a sheet of paper is fed through the printer, the print head moves from side to side printing text/image in the four colours The whole process is continued until the printer buffer is empty 6 a 3D printers use various ways to produce solid objects. Explain each of the following terms: [3 marks] Additive: ......................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ Direct 3D printing: ......................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ Binder 3D printing: ........................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 38. Photocopying prohibited 35 Cambridge IGCSE Computer Science Workbook 5  Input and output devices b A car enthusiast has bought a car made in 1921. Unfortunately, none of the parts for the car are still made. Explain how 3D technology could be used to create any part for this car. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ c Describe three other uses of 3D printers. [3 marks] 1 ................................................................................................................................................................. .................................................................................................................................................................... .................................................................................................................................................................... 2 ................................................................................................................................................................. .................................................................................................................................................................... .................................................................................................................................................................... 3 ................................................................................................................................................................. .................................................................................................................................................................... .................................................................................................................................................................... 7 a Most modern televisions and computer screens are LCD and use LED back-lit technology. Give three advantages of using LED back-lit technology rather the older CCFL (fluorescent lamp) technology. [3 marks] 1 ................................................................................................................................................................. .................................................................................................................................................................... 2 ................................................................................................................................................................. .................................................................................................................................................................... 3 ................................................................................................................................................................. ....................................................................................................................................................................
  • 39. Photocopying prohibited 36 5 Input and output devIces Cambridge IGCSE Computer Science Workbook b i Explain the term OLED. [1 mark] ........................................................................................................................................................................ ........................................................................................................................................................................ ii Give two benefits of using OLED technology rather than LCD. [2 marks] 1............................................................................................................................................................. ............................................................................................................................................................... 2 ............................................................................................................................................................ ............................................................................................................................................................... 8 Describe a suitable different application that uses each of the following sensors. [4 marks] Sensor Application temperature light infrared magnetic field
  • 40. Photocopying prohibited 37 Cambridge IGCSE Computer Science Workbook 5  Input and output devices 9 A burglar alarm system uses pressure sensors and acoustic (sound) sensors to detect the presence of an intruder. A microprocessor is used to monitor and control the whole system. A keypad is used to key in a 4-digit PIN that either activates or deactivates the system. If an intruder is detected, an alarm is sounded and also a blue flashing light outside the building. Describe in detail how the sensors and microprocessor interact to detect and warn of an intruder. [7 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 41. Photocopying prohibited 38 Cambridge IGCSE Computer Science Workbook 6 Memory and data storage 1 Five file terms are shown on the left and five file descriptions are shown on the right. By drawing arrows link each file term to its correct file description. [5 marks] MP3 file BMP file MIDI file jpeg image lossy file format uses compression technology to reduce the size of an image uses compression technology to reduce the size of a music file by up to 90% file compression algorithm that reduces file size by eliminating unnecessary bits of data a raw bitmap image that has not yet been compressed communication protocol that allows electronic musical instruments to interact with each other 2 a Give three differences between RAM and ROM memories. [3 marks] 1 ................................................................................................................................................................. ................................................................................................................................................................... ................................................................................................................................................................... 2 ................................................................................................................................................................. ................................................................................................................................................................... ................................................................................................................................................................... 3 ................................................................................................................................................................. ................................................................................................................................................................... ................................................................................................................................................................... b Two types of RAM are DRAM and SRAM. In the diagram below, draw arrows to link each type of RAM to its correct feature(s). [5 marks] DRAM SRAM needs to be constantly refreshed to retain the data consumes the least power of the two types of RAM makes use of ‘flip flops’ to hold bits of memory used in computers where high speed processing is needed; e.g. memory cache has the higher storage capacity of the two types of RAM
  • 42. Photocopying prohibited 39 Cambridge IGCSE Computer Science Workbook 6  Memory and data storage 3 a Give an example of data which matches the data formats below. [3 marks] Real: ................................................................................................................................................................ Integer: ........................................................................................................................................................... Currency: ........................................................................................................................................................ b i Assuming each character is 1 byte in size, and ignoring spaces, how many bytes of memory would be needed to store the following sentence? [1 mark] ‘this shows you how lossless would use less memory’............................................ ii A file compression system replaces parts of the text in the sentence as follows: th = 1, is = 2, how = 3, ou = 4, less = 5 Rewrite the sentence in part bi using the above numerical values where possible. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... iii How many bytes of memory does your new sentence in part bii require? [1 mark] ...................................................................................................................................................................... iv Explain why the method described in part bii is lossless compression. [1 mark] ...................................................................................................................................................................... ...................................................................................................................................................................... 4 a Place each of the following storage and memory devices into their correct category: [6 marks] • Blu-ray disc • DVD-RAM • Fixed hard-disk drive (HDD) • Fixed solid-state drive (SSD) • Flash memory/memory stick • RAM • Removable hard-disk drive (HDD) • ROM Primary Secondary Off-line
  • 43. Photocopying prohibited 40 6 MeMory and data storage Cambridge IGCSE Computer Science Workbook b Give three advantages of using SSD rather than HDD in a computer system. [3 marks] 1 ................................................................................................................................................................. .................................................................................................................................................................... 2 ................................................................................................................................................................. .................................................................................................................................................................... 3 ................................................................................................................................................................. .................................................................................................................................................................... 5 a The following table shows six features of optical media. By placing ticks (3) in the correct boxes, indicate which features refer to which optical media. [3 marks] Optical media Use red lasers to read/write Use blue lasers to read/write Use two polycarbonate layers Use one polycarbonate layer Track pitch < 1µm Track pitch > 1µm CD DVD Blu-ray b Describe three advantages of using Blu-ray discs rather than normal DVDs to store movies. [3 marks] 1 ................................................................................................................................................................. .................................................................................................................................................................... .................................................................................................................................................................... 2 ................................................................................................................................................................. .................................................................................................................................................................... .................................................................................................................................................................... 3 ................................................................................................................................................................. .................................................................................................................................................................... ....................................................................................................................................................................
  • 44. Photocopying prohibited 41 Cambridge IGCSE Computer Science Workbook 6  Memory and data storage 6 A student wrote: ‘The future of optical media is one of obsolescence in the next five years’. Discuss this statement by reference to modern technologies. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 45. Photocopying prohibited 42 Cambridge IGCSE Computer Science Workbook 7 High- and low-level languages 1 What is a program? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 2 The following terms are used about high-level programming languages. [3 marks] State what each term means. a Portable ........................................................................................................................................................................ ........................................................................................................................................................................ b Problem solving ........................................................................................................................................................................ ........................................................................................................................................................................ c Translation ........................................................................................................................................................................ ........................................................................................................................................................................ 3 Give four examples of high-level programming languages. [4 marks] 1 ...................................................................................................................................................................... 2 ...................................................................................................................................................................... 3 ...................................................................................................................................................................... 4 ......................................................................................................................................................................
  • 46. Photocopying prohibited 43 Cambridge IGCSE Computer Science Workbook 7  High-and low-level languages 4 Give four benefits to a programmer of developing a program using a high-level programming language. [4 marks] 1 ...................................................................................................................................................................... ........................................................................................................................................................................ 2 ...................................................................................................................................................................... ........................................................................................................................................................................ 3 ...................................................................................................................................................................... ........................................................................................................................................................................ 4 ...................................................................................................................................................................... ........................................................................................................................................................................ 5 The following terms are used about low-level programming languages. [2 marks] State what each term means. a Machine code ........................................................................................................................................................................ ........................................................................................................................................................................ b Assembly language ........................................................................................................................................................................ ........................................................................................................................................................................ 6 Give four benefits to a programmer of developing a program using a low-level programming language. [4 marks] 1 ...................................................................................................................................................................... ......................................................................................................................................................................... 2 ...................................................................................................................................................................... ......................................................................................................................................................................... 3 ...................................................................................................................................................................... ......................................................................................................................................................................... 4 ...................................................................................................................................................................... .........................................................................................................................................................................
  • 47. Photocopying prohibited 44 7 HigH- and low-level languages Cambridge IGCSE Computer Science Workbook 7 Using the programming statements in Chapter 7 of the Cambridge IGCSE Computer Science textbook, show what the program code for adding two numbers (FirstNumber and SecondNumber) together could look like: [4 marks] a HLL ........................................................................................................................................................................ b LLL ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ c Hexadecimal ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ d Binary ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 8 a What is a translator? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Name three different types of translator. [3 marks] 1 ................................................................................................................................................................. 2 ................................................................................................................................................................. 3 .................................................................................................................................................................
  • 48. Photocopying prohibited 45 Cambridge IGCSE Computer Science Workbook 7  High-and low-level languages c For each translator describe which type of language it is used for and what is produced after a successful translation. [6 marks] 1 ................................................................................................................................................................. .................................................................................................................................................................... .................................................................................................................................................................... 2 ................................................................................................................................................................. .................................................................................................................................................................... .................................................................................................................................................................... 3 ................................................................................................................................................................. .................................................................................................................................................................... .................................................................................................................................................................... 9 a What is meant by a syntax error? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b What is meant by a logic error? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ c What happens when a compiler finds a syntax error? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 49. Photocopying prohibited 46 7 HigH- and low-level languages Cambridge IGCSE Computer Science Workbook d What happens when an interpreter finds a syntax error? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 10 Eight statements are shown on the left and three translators are shown on the right. Draw lines to connect each statement to the translator it applies to (there can be more than one line to a translator). [8 marks] Compiler Interpreter Assembler One low-level language statement is usually translated into one machine code instruction. Translates a high-level language program into machine code. Assembled programs can be used without this. No executable file of machine code is produced Executes a high-level language program a statement at a time Compiled programs are used without this. Translates a low-level language program into machine code. One high-level language statement can be translated into several machine code instructions. 11 What is an IDE? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 50. Photocopying prohibited 47 Cambridge IGCSE Computer Science Workbook 7  High-and low-level languages 12 a Give three disadvantages of using a compiler rather than an interpreter. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Give three advantages of using a compiler rather than an interpreter. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 51. Photocopying prohibited 48 Cambridge IGCSE Computer Science Workbook 8 Security and ethics 1 Six security terms are shown on the left and six descriptions are shown on the right. By drawing arrows, link each security term to its correct description. [6 marks] hacking legitimate-looking email sent out to a user; as soon as they click on the link in the email, they are sent to a fake website malicious code installed on a user’s hard drive or on a web server; the code will redirect the user to a fake website without their knowledge program or program code that can replicate/copy itself with the intention of deleting or corrupting files or to cause a computer malfunction act of locating and using wireless internet connections illegally; requires a mobile device, wireless network card and an antenna to pick up wireless signals act of gaining illegal access to a computer system software that gathers information by monitoring key presses on a user’s computer; the key presses are sent back to the person who sent the software viruses phishing pharming war driving spyware 2 a Describe how websites make use of cookies. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Give three of the tasks carried out by a firewall. [3 marks] 1................................................................................................................................................................. .................................................................................................................................................................... 2................................................................................................................................................................. .................................................................................................................................................................... 3................................................................................................................................................................. ....................................................................................................................................................................
  • 52. Photocopying prohibited 49 8  Security and ethics Cambridge IGCSE Computer Science Workbook c Describe three ways to prevent accidental loss of data such as file deletion, software or hardware fault. [3 marks] 1................................................................................................................................................................. .................................................................................................................................................................... 2................................................................................................................................................................. .................................................................................................................................................................... 3................................................................................................................................................................. .................................................................................................................................................................... 3 a What is meant by the two terms SSL and TLS? [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Describe how TLS differs from SSL. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ c The five stages when a user wants to access a secure website using SSL are shown in the diagram below. However, four of the stages are missing. Complete the diagram on the following page using the following descriptions in their correct order. [4 marks] Stage number Description 1 If the web browser can authenticate the SSL certificate it sends a message back to the web server to allow communications to begin 2 Once the message is received from the browser, the web server acknowledges the web browser and SSL two-way data transfer begins 3 Web browser then requests that the web server identifies itself 4 Web server responds by sending a copy of its SSL certificate to the user’s web browser
  • 53. Photocopying prohibited 50 8 Security and ethicS Cambridge IGCSE Computer Science Workbook User’s web browser sends a message so that it can connect with the required website secured by SSL 4 a Complete the diagram about encryption below by using the following terms. [3 marks] 1 Cypher text 2 Plain text 3 Encryption algorithm Encryption key b Explain what is meant by the following terms. [3 marks] i Hashing algorithm ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ......................................................................................................................................................................
  • 54. Photocopying prohibited 51 8  Security and ethics Cambridge IGCSE Computer Science Workbook ii Encryption algorithm ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... iii MD4 software ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... c Explain what the advantage is of using 128-bit or 256-bit data encryption rather than 56-bit encryption. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... 5 a Explain what is meant by denial of service attack. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b Describe how it is possible for a user to guard against denial of service attacks. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ......................................................................................................................................................................
  • 55. Photocopying prohibited 52 8 Security and ethicS Cambridge IGCSE Computer Science Workbook c Describe what signs would indicate to users that they had become victims of denial of service attacks. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... 6 Describe five ways a bank can protect its customers from security risks when visiting its website. [5 marks] 1 .................................................................................................................................................................... ...................................................................................................................................................................... 2 .................................................................................................................................................................... ....................................................................................................................................................................... 3 .................................................................................................................................................................... ....................................................................................................................................................................... 4 .................................................................................................................................................................... ....................................................................................................................................................................... 5 .................................................................................................................................................................... ....................................................................................................................................................................... 7 Which five terms are being described below? [5 marks] Description Term Set of principles set out to regulate the use of computers and computer systems The taking of another person’s idea or work and claiming it as their own work without any acknowledgement to the originator Software a user can download from the internet free of charge; once downloaded, there are no fees when using it; however, it is subject to copyright laws Software that users are allowed to try out free of charge for a trial period; at the end of the trial period, users will be requested to pay a fee if they want to continue using it Users have freedom to run, copy, change or adapt this software without the need to seek permission; the software is not protected by copyright but there are still some restrictions
  • 56. Photocopying prohibited 53 Cambridge IGCSE Computer Science Workbook 9 Problem-solving and design 1 What makes up a computer system? [5 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 2 What is top-down design? [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 3 Using the structure diagram in Figure 9.1 of the textbook, break down the check off/snooze sub-system into further sub-systems. [3 marks] Check off/snooze 4 Describe a library routine and give an example of one. [3 marks] Description: .................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ Example: ......................................................................................................................................................... ........................................................................................................................................................................
  • 57. Photocopying prohibited 54 9 Problem-solving and design Cambridge IGCSE Computer Science Workbook 5 a What is an algorithm? [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ b Give two ways of representing an algorithm. [2 marks] 1 ................................................................................................................................................................. 2 ................................................................................................................................................................. 6 Name and describe three types of test data. [6 marks] 1 ...................................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ 2 ...................................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ 3 ...................................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ 7 Explain, using an example, what is meant by a set of test data. [3 marks] Explanation: ................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ Example: ......................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................
  • 58. Photocopying prohibited 55 Cambridge IGCSE Computer Science Workbook 8 a Explain the difference between validation and verification. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Give two examples of validation. [2 marks] 1 ................................................................................................................................................................. .................................................................................................................................................................... 2 ................................................................................................................................................................. .................................................................................................................................................................... c Give two examples of verification. [2 marks] 1 ................................................................................................................................................................. .................................................................................................................................................................... 2 ................................................................................................................................................................. .................................................................................................................................................................... 9 Name and describe two validation checks. Give an example of each validation check in use. [6 marks] Name: ............................................................................................................................................................. Description: .................................................................................................................................................... ........................................................................................................................................................................ Use: ................................................................................................................................................................. ........................................................................................................................................................................ Name: ............................................................................................................................................................. Description: .................................................................................................................................................... ........................................................................................................................................................................ Use: ................................................................................................................................................................. ........................................................................................................................................................................ 9 Problem-solving and design
  • 59. Photocopying prohibited 56 9 Problem-solving and design Cambridge IGCSE Computer Science Workbook 10 Six examples are shown on the left and six validation checks are shown on the right. Draw a line to connect each example to the validation check it applies to. [5 marks] Range check Format check Presence check Length check Type check Character check The number of pupils in a class is a whole number. A person’s name only contains alphanumeric characters. Check that a code contains two letters followed by three numbers. A name field is not left blank Numbers are in the range 10 to 20. A password must contain exactly 10 characters. 11 a What is a check digit? [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b Is this ISBN correct? Use the ISBN 13 method on page 122 of the textbook to check and show your working. [3 marks] 9780 7487 8296 3 ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ......................................................................................................................................................................
  • 60. Photocopying prohibited 57 Cambridge IGCSE Computer Science Workbook c Use the modulo 11 method to calculate the check digits for these numbers. Show your working. [4 marks] 1127 ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... 47857 ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... 12 The following algorithm shown as a flowchart checks the marks that are input and outputs the sum of all the marks. START Sum ← 0 Reject ← 0 input Mark is Mark–1? Yes output Sum, Reject is Mark > 100 or Mark < 0? Reject ← Reject +1 Sum ← Mark + Sum END Yes No No 9 Problem-solving and design
  • 61. Photocopying prohibited 58 9 Problem-solving and design Cambridge IGCSE Computer Science Workbook a What are the rules for a mark to be accepted? [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... b What value terminates the input? [1 mark] ...................................................................................................................................................................... c Use this data and the trace table below to dry run the algorithm. [4 marks] 17, 35, 24, −5, 0, 67, 82, 97, −21, 45, 23, −1, 99 Sum Reject Mark Output d Explain why this is an effective solution to adding up marks and point out any improvements that could be made. [3 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ......................................................................................................................................................................
  • 62. Photocopying prohibited 59 Cambridge IGCSE Computer Science Workbook 10 Pseudocode and flowcharts 1 What values will be stored in the following variables when the assignment statements below are completed? [5 marks] Age ← 21 Name ← "Richard" Value ←18 * 2 Sum ← Value + Age Flag ← True Age.......................................................................... Name........................................................................ Value...................................................................... Sum.......................................................................... Flag........................................................................ 2 Write down two types of conditional statement and for each one show how you would select someone whose age was either 10 or 20. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 63. Photocopying prohibited 60 10 Pseudocode and flowcharts Cambridge IGCSE Computer Science Workbook 3 a Write down three different types of loop structure. [3 marks] 1 ...................................................................................................................................................................... 2 ...................................................................................................................................................................... 3 ...................................................................................................................................................................... b Here are three problems. For each one, choose a different loop structure for your pseudocode solution. i Input 10 numbers and print out their total. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ii Input some numbers and calculate their total, an input of −1 stops the process. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ iii Input some numbers and calculate their total, stop when the total is greater than 20. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 64. Photocopying prohibited 61 Cambridge IGCSE Computer Science Workbook 10  Pseudocode and flowcharts 4 a Write down two different statements that can be used for input. [2 marks] 1 ..................................................................................................................................... 2 ..................................................................................................................................... b Write down two different statements that can be used for output. [2 marks] 1 ..................................................................................................................................... 2 ..................................................................................................................................... 5 Write a pseudocode algorithm to check the level of stock, StockLevel, and output 'Reorder' when the value falls below 10. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 6 a Write a pseudocode algorithm to input 20 numbers and find the average of the positive numbers. [7 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Explain how you would change your algorithm to reject any negative numbers. [2 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 65. Photocopying prohibited 62 10 Pseudocode and flowcharts Cambridge IGCSE Computer Science Workbook 7 Seven examples are shown on the left and four types of statement are shown on the right. Draw lines to connect each type of statement to the example(s) it applies to. [7 marks] WHILE … DO … ENDWHILE Conditional Loop Assignment Input/Output Sum ← Num1 + Num2 REPEAT … UNTIL INPUT Num1 PRINT 'Goodbye' IF … THEN … ENDIF FOR … TO … NEXT 8 Four flowchart symbols are shown on the left and four descriptions are shown on the right. Draw lines to connect each symbol to the correct description. [3 marks] Process Terminator Decision Input/Output
  • 66. Photocopying prohibited 63 Cambridge IGCSE Computer Science Workbook 10  Pseudocode and flowcharts 9 a Draw a flowchart to input 20 numbers and find the average of the positive numbers. [7 marks]
  • 67. Photocopying prohibited 64 10 Pseudocode and flowcharts Cambridge IGCSE Computer Science Workbook b Explain how you would change your flowchart to work for 30 numbers that are between 0 and 100. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 68. Photocopying prohibited 65 Cambridge IGCSE Computer Science Workbook Only two values TRUE and FALSE Integer Real String Boolean Char A single character A whole number A number with a fractional part Several characters 11 Programming concepts 1 Five descriptions are shown on the left and five data types are shown on the right. Draw lines to connect each data type to the correct description. [4 marks] 2 Explain, using examples, when you would use a variable and when you would use a constant. [4 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 3 State, giving reasons, whether these data stores should be variables or constants. [6 marks] a Average Mark ........................................................................................................................................................................ ........................................................................................................................................................................ b Number of months in a year ........................................................................................................................................................................ ........................................................................................................................................................................ c Number of pupils in a class ........................................................................................................................................................................ ........................................................................................................................................................................
  • 69. Photocopying prohibited 66 11 Programming concePts Cambridge IGCSE Computer Science Workbook 4 a Here are three problems. For each one, write an efficient program to solve the problem. i Input eight whole numbers and print out their total. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ii Input some whole numbers and calculate their total, an input of −1 stops the process. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ iii Input some whole numbers and calculate their total, stop when the total is greater than 10. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 70. Photocopying prohibited 67 Cambridge IGCSE Computer Science Workbook 11  Programming concepts b Give a set of test data that you could use for each program. [3 marks] i ................................................................................................................................................................... ii ................................................................................................................................................................... iii ................................................................................................................................................................... c Explain whether you would need to make any changes to your programs if real numbers were used instead of whole numbers. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... 5 a Write a program to input 10 numbers and find the average of the negative numbers. [7 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b Explain how you would change your program to reject any positive numbers. [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... c Give a set of test data that you could use for the program. [1 mark] ......................................................................................................................................................................
  • 71. Photocopying prohibited 68 Cambridge IGCSE Computer Science Workbook 12 Data structures: arrays and using pre-release material 1 Explain what the terms below mean when used about arrays. [6 marks] Name: ............................................................................................................................................................. ........................................................................................................................................................................ Size: ................................................................................................................................................................ ........................................................................................................................................................................ Element: ......................................................................................................................................................... ........................................................................................................................................................................ Index: .............................................................................................................................................................. ........................................................................................................................................................................ Type: ............................................................................................................................................................... ........................................................................................................................................................................ Dimension: ..................................................................................................................................................... ........................................................................................................................................................................ 2 Explain, using an example, when you would use an array. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ 3 Using a high-level programming language, declare arrays to be used in the following situations. a The names of 20 students. [1 mark] ........................................................................................................................................................................ b The marks of 200 students. [1 mark] ........................................................................................................................................................................ c Whether 30 students have enrolled or not. [1 mark] ........................................................................................................................................................................
  • 72. Photocopying prohibited 69 Cambridge IGCSE Computer Science Workbook 12  Data structures: arrays and using pre-release material 4 a Here are three problems. For each one, write an efficient program using an array to solve the problem. You can extend your program for each problem. i Store the number of enquiries made each day for a week. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ii Find the day with the most enquires and the one with the least enquiries. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ iii Find the total number of enquiries for the week and the average number of enquiries per day. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Give a set of test data that you could use for these programs. [1 mark] ........................................................................................................................................................................
  • 73. Photocopying prohibited 70 12 Data structures: arrays anD using pre-release material Cambridge IGCSE Computer Science Workbook You will need to use the pre-release material for your examination to answer the following questions. 5 a Write an algorithm, using pseudocode for task 1. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b Write an algorithm, using pseudocode for task 2. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 74. Photocopying prohibited 71 Cambridge IGCSE Computer Science Workbook 12  Data structures: arrays and using pre-release material c Write an algorithm, using pseudocode for task 3. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ d For task 3 use a flowchart to show the algorithm. [6 marks]
  • 75. Photocopying prohibited 72 12 Data structures: arrays anD using pre-release material Cambridge IGCSE Computer Science Workbook 6 a Choose three sets of test data for task 1: normal, abnormal/erroneous and boundary. [3 marks] Normal: .......................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ Abnormal: ...................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ Boundary: ...................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ b Choose three sets of test data for task 2: normal, abnormal/erroneous and boundary. [3 marks] Normal: ........................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ Abnormal: ...................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ Boundary: ....................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ c Choose three sets of test data for task 3: normal, abnormal/erroneous and boundary. [3 marks] Normal: ........................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ Abnormal: ...................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................ Boundary: ....................................................................................................................................................... ........................................................................................................................................................................ ........................................................................................................................................................................
  • 76. Photocopying prohibited 73 Cambridge IGCSE Computer Science Workbook 12  Data structures: arrays and using pre-release material 7 a Draw and complete a trace table for task 1. Use your normal data for the trace. [5 marks] b Draw and complete a trace table for task 1. Use your abnormal data for the trace. [5 marks]
  • 77. Photocopying prohibited 74 12 Data structures: arrays anD using pre-release material Cambridge IGCSE Computer Science Workbook 8 a For every variable you have used in your program(s) for tasks 1, 2 and 3, write the variable declaration and explain why you have used this variable. [6 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ b For every constant you have used in your program(s) for tasks 1, 2 and 3, write the variable declaration and explain why you have used this variable. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ c For every array you have used in your program(s) for tasks 1, 2 and 3, write the variable declaration and explain why you have used this variable. [3 marks] ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................ ........................................................................................................................................................................
  • 78. Photocopying prohibited 75 Cambridge IGCSE Computer Science Workbook 13 Databases 1 Give three benefits of using databases. [3 marks] 1 .................................................................................................................................................................... ....................................................................................................................................................................... 2 .................................................................................................................................................................... ....................................................................................................................................................................... 3 .................................................................................................................................................................... ....................................................................................................................................................................... 2 Explain the following terms used about databases. [4 marks] Table: ............................................................................................................................................................ ...................................................................................................................................................................... Record: ......................................................................................................................................................... ...................................................................................................................................................................... Field: ............................................................................................................................................................. ...................................................................................................................................................................... Primary key: ................................................................................................................................................. ...................................................................................................................................................................... 3 A school keeps a database table (TEXTBOOK) of all the textbooks that are available for student use. The following information is stored for each set of books: the name of the textbook, the ISBN, the authors, the number of copies available for use, the subject it is used for. a Select names and data types for each field in the table. [5 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... b i Name the fields that should be verified. [1 mark] ...................................................................................................................................................................... ii Name the fields that should be validated. [1 mark] ......................................................................................................................................................................
  • 79. Photocopying prohibited 76 13 Databases Cambridge IGCSE Computer Science Workbook c Which field would you choose for the primary key and why would you choose it? [2 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... d Give the validation rules you would use for each field that is to be validated. [4 marks] ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... ...................................................................................................................................................................... e A teacher wants to know the names of the textbooks available for a history class with 30 students in it. Complete the query-by-example grid below to show the search condition required. [3 marks] Field: Table: Sort: Show: Criteria: or: 4 a Write a query-by-example grid for the search condition in end of chapter question 3b (on page 177 of the textbook); the table name is OILCO. [3 marks] Field: Table: Sort: Show: Criteria: or:
  • 80. Photocopying prohibited 77 Cambridge IGCSE Computer Science Workbook b Write a query-by-example grid for the search condition in end of chapter question 4b; the table name is SHOP. [3 marks] Field: Table: Sort: Show: Criteria: or: 5 a Write a query-by-example grid for the search condition in end of chapter question 3c; the table name is OILCO. [3 marks] Field: Table: Sort: Show: Criteria: or: b Write a query-by-example grid for the search condition in end of chapter question 4c; the table name is SHOP. [3 marks] Field: Table: Sort: Show: Criteria: or: 13 Databases
  • 81. This workbook supports students using the Cambridge IGCSE Computer Science textbook,providing plenty of extra practice questions and activities. ■ Perfect for using throughout the course – ensures students learn each topic thoroughly ■ Covers the two sections in the syllabus – Theory of Computer Science and Practical Problem-Solving and Programming ■ Answers are available online Cambridge IGCSE® Computer Science Workbook For 25 years we have been trusted by Cambridge schools around the world to provide quality support for teaching and learning. For this reason we have been selected by Cambridge International Examinations as an official publisher of endorsed material for their syllabuses. For 25 years we have been trusted by Cambridge schools For 25 years we have been trusted by Cambridge schools around the world to provide quality support for teaching and around the world to provide quality support for teaching and learning. For this reason we have been selected by Cambridge learning. For this reason we have been selected by Cambridge International Examinations as an official publisher of endorsed International Examinations as an official publisher of endorsed material for their syllabuses. material for their syllabuses. 25 YEARS C a m b r i d g e International Ex a m i n a t i o n s Working with I S B N 978-1-471-86867-2 9 7 8 1 4 7 1 8 6 8 6 7 2