Professional Documents
Culture Documents
UNIVERSITY PRESS
ENDORSED BY
®
Cambridge IGCSE
Computer
Science
Revision Guide V
<
tfi
8*
a C9 c®
Cambridge IGCSE ®
Computer
lienee
Revision Guide
David Watson and Helen Williams
m CAMBRIDGE
-
Pi E? PRESS
UNIVERSITY
CAMBRIDGE
UNIVERSITY PRESS
Example answers and all other end - of -chapter questions were written by
® IGCSE is the registered trademark of Cambridge International
the authors
Examinations.
*
\
Contents
Introduction
vi
Chapter 1 Introduction to
Computer Science
1.1 An overview of chapters 1
2 to 12
1.2 Components of a typical 1
computer system
2
Chapter 2 Computer applications
2.1
5
Computer interfaces
2.2 Communication systems 5
2.3 Monitoring and control of processes 6
2.4 Robotics 11
2.5 End of chapter questions 16
17
Chapter 3 The Internet
19
3.1 The Internet
3.2 Broadband and dial up 19
3.3 Recent developments 22
3.4 Intranets 23
3.5 End of chapter questions 29
30
Chapter 4 Security aspects 32
4.1 Security and data integrity
32
4.2 Other ways data can be lost or corrupted
35
4.3 Spam and cookies
36
4.4 Firewalls and proxy servers 36
4.5 Secure sockets layer ( SSL ) 38
4.6 Transport layer security (TLS ) 39
4.7 Encryption 39
4.8 Online safeguards 41
4.9 End of chapter questions 43
i
Contents
This book has been written as a form of revision for students preparing -
for the Cambridge IGCSE or Cambridge O Level examinations. It has been
assume d thr ou gh ou t tha t the stu de nt ha s alr ea dy stu die d the top ics to th e
"
required level an wi d ll us e th is bo ok as a for m of ex am ina tio n pre pa rat ion ,
alt ho ug h it sh ou ld be po int ed ou t tha t th is re vis ion bo ok is als o a sta nd -
alone source of information.
To get a good understan din g of Co mp ute r Sc ien ce, a stu de nt sh ou ld no t
just rely on one source of inf or ma tio n; it sh ou ld be a co mb ina tio n of two or
fire
more of the following.
Asp
- Textbooks
- Notes from teachers/lesson notes
Student's own research from libraries/Internet sites
Revision of past papers and mark schemes lute
Student's own experiences
Revision notes based on all of the above
- A revision textbook . forexa
se ly fol low s the Ca mb rid ge Co mp ute r Sc ien ce sy lla bu s toptc
This revision book clo
top ics the rei n . It als o tak es the su bje ct sli gh tly fur the r
and covers all of the
to take into account po ten tia l sy lla bu s rev isi on s wi thi n the ne ar fut ure .
There are a number of rev isi on qu es tio ns at the en d of ea ch ch ap ter wh ich Adva
an din g of the stu de nt . At the ve ry en d of the bo ok , yo u
test the underst S
pa pe rs wh ich wi ll co ve r mo st of the top ics in the
will find two practice
thi s bo ok . Th e two qu es tio n pa pe rs clo se ly fol low the ne w
12 chapters of
ien ce sy lla bu s wh ere pa pe rs wi ll be sa t for the firs t tim e in
Computer Sc
an sw ers ha ve als o be en su pp lie d so tha t the stu de nt ca n
2015. Sample
self -assess his / he r pe rfo rm an ce ac co rd ing ly . Th e sa mp le an sw er s ha ve be en
written by the au tho rs . Ca mb rid ge Int ern ati on al Ex am ina tio ns be ar s no
responsibility for these answers or for the comments offered.
K
"
Introduction
Name
In these questions, one word answers would suffice.
For example, ‘ Name three devices used to input data into a computer.
'
Acceptable answers would be: ( 1 ) Keyboard (2 ) Barcode reader (3) Microphone
Describe
In these questions, you are expected to write a sentence to describe the
computing term, feature, process, etc.
For example, ' Describe what is meant by the term interrupt /
Acceptable answer would be: This is a signal from a device, such as a printer,
sent to the CPU; the CPU will then temporarily stop what it is doing.
For example, ' Give one advantage and one disadvantage of using emails
rather than the normal post to send a message.'
Acceptable answer could include: Advantage: emails are delivered almost
immediately; Disadvantage: emails require investment in a computer system.
Trace tables
In these type of questions, you are likely to be given a flowchart and asked
to trace through the flowchart using some given data. You would be
expected to show the value of the variables in the table at all stages of
the process.
Cambridge IGCSE Computer Science Revision Guide
<
It is a goo d pra ctic e to dra w a line acr oss the tab le afte r any out put ; this
makes it eas ier to go bac k and rec tify any mis tak e you ma y ma ke . The re are
sev era l exa mp les of this typ e of que stio n in cha pte r 6, but bas ica lly the y will
look like this.
X y z TOTAL OUTPUT
1 3 9 1 2
2 7 14 2
3
4
1
6
1
36
/
5
1 5 25 1
2 11 132
etc. etc. etc . etc. etc.
Flowcharts
to
se que stio ns, you wo uld be giv en a com put er pro ces s , suc h as ' usi ng
!
H
'
:
' to car ry out aut om atic sto ck con trol' . The flow cha rt ma y hav e all
the outline box es but the act ual item s sho wn in the se box es mig ht hav e
bee n om itte d. The item s cou ld be giv en in a num ber ed list and you r tas k
would be to place each stage in the appropriate box. You are well advised
just to use the number of the item rather than trying to write the whole
description in the given box. al
Also remember the function of each flowchart box. ' Sftior
Instruction box - for example,
subtroctl from the total
>;
Input/output box - for example,
read data from the barcode
Introduction
START
*
*
/ get light
sensor reading
3
List of items
1 computer sends
signal
2 is light reading
< minimum?
5
3 switch on the
light
7 1
5 use of DAC
Write an algorithm
In these questions, you are likely to be given a problem which needs to be
solved using either a flowchart or pseudocode (whichever is easier).
For example , ' Write an algorithm, using pseudocode ora flowchart, which
inputs 100 numbers and outputs the average.'
By pseudocode
total <- 0
for count <— 1 to 100
input number
By flowchart
^ START
total <- 0
J
/
count e- 1
input /
^
/
/
STOPJ
average W
/
/ number /
average *—
total total + total/100
number
No
is count
count e -
count + 1 * 100?
Yes
to
Linking boxes
In these questions, you would be given a description on one side and a
computer term or application on the other side of the diagram.
k
You may be asked to draw arrows to show which description and computer
term/application match. For example,
%
Used to make hard
copies
Mouse
*
Used to produce voice k
Printer
output
\
\
Used to select an icon
by clicking on it Microphone
\
Introduction
Truth tables
In these questions, you could be expected to complete a truth table to
show the output from a logic gate (such as AND,
OR, NOT, NAND, NOR or
XOR ) or from a logic network ( which is a
combination of these logic gates).
You may be given the binary inputs and it
would only be necessary to
complete the output part. For example,
A B C OUTPUT X
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
0 1 0
0 0
1 0
>v
output after ^ )
' ess likely to mqke a mistake if you
do this. For mpfe e chapter 9. ~
’ ti
' ' *.
*> » .
-t .
< : .
.f
Drawing of logic networks v
As with above, these are a recent addition to the type of questions which
may be asked. You may be asked to draw a logic network based on either
a given problem or a logic statement. A blank space would be provided to j1;
a
allow you to draw your logic network (again there are many examples of ^
•V -
T*
>
- y
,
c
Co mp ute r Sc ien ce Re vis io n Gu id e
Cambridge IG CS E
Example 2: 'Draw the log ic ne two rk for the foll ow ing pro ble m.'
L 1 landing gear OK
JK
0 landing gear failed
X = if
|Q
Introduction
Miscellaneous types
There are many one - off question types set each year in Computer Science
exams. Guidelines would always be given on how to set out your answers.
The most common type seems to involve binary or hexadecimal registers in
control applications such as elevators (lifts), robots, vending machines.
For example, the value 200 (base 10) would convert into binary as follows:
128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0
8 4 2 1 8 4 2 1
1 1 0 0 1 0 0 0
c 8
r\
v
Chapter I
0Seioo
j; Introduction to
Computer Science
Learning Summary
Rich Cook
Computers are
useless. They only give
you answers!
Pablo Picasso
There’s
word in business circles that the
/ computer industry likes to measure itself
the Big Thre e ( USA ) car -makers. The >
/ against
If autom otive techn ology had
comparison goes this way :
Silico n Valle y , moto rists could buy a V - 32
kept pace with
engine that does 10 ,000 m .p . h . or a 30 - poun d car that gets
,
, 1,000 miles to the gallon - both at a sellin g price of less
\ ’ than $50. Detroit’s response: “OK. But who would /
want a car that crashes twice a day? ”
Popular 1997 joke
Cambridge IGCSE Computer Science Revision Guide
Whatever any of us may think, computers are here to stay. We have come
a long way since the Manchester 'baby' computer of 1948 - this machine
could make about 700 instructions per second and used about 3.5 kilowatt
of power. Sixty years later, a typical embedded computer can make 200
million instructions per second and uses only 20 milliwatts of power. The
computer in 1948 nearly filled a room, whereas now a computer occupies
only about 0.5 m2 - a considerable size reduction! These advancements
continue at an amazing rate and will be further discussed in chapter 12 as
part of the future predictions.
Chapters 2 to 12 of this book will take the reader through a number of
applications, discuss the impact of the Internet, look at problem-solving
tools, give an insight into hardware and software currently available and
how computer systems operate. The final chapter will discuss some of the
possible advancements we all might see in the coming decades.
processor + •
fei
monitor internal
memory
mouse keyboard
Computer system
\
r Introduction to Computer Science 1
The function of the above components will be discussed iin greater depth in
the following chapters.
The hardware usually comprises the following.
- Input devices (such as keyboard, mouse, microphone)
- Output devices (such as monitor, printer, speakers)
- Secondary storage (such as DVD/CD reader /writer) .
chapter 12.
various components that make up a typical computer system. I
Interrupts also allow for more efficient operation of a computer system.
A device will send an interrupt signal to the CPU indicating that it needs
attention (for example, a printer is out of paper or out of ink and a CD is
almost full). The CPU will suspend what it is doing to service the interrupt
and then return to its task once the problem is cleared.
I
U
:<a
m
%
4
Chapter
O i C o m p u t e r a p p li c a t io n s
Learning Summary
• Computer interfaces
• Communication systems
• Mo nit ori ng an d con tro l of pro ces ses
0 Robotics
The applies - -sed in this chapter are by no means the only ones that exist,
'
but have be - sen o their diversity and also to reflect the wide range of special
applications n . - he individual and to industry. You will learn about how
these appi ; ;. d their advantages and disadvantages.
grwoiot r
2.1 Computer interfaces
To permit any applicatio n to wo rk eff ect ive ly, the re ne ed s to be an inte rfa ce
*
which is user friend iy an d ge ne ral ly eas y to use . Th is sec tion ou tlin es the two
main types of interface tha t the rea de r wil l no rm ally enc oun ter.
This avoid s the need to know wher e the applic ation resid es
in your computer and involv es simpl y clickin g on the icon
(using a mouse usual ly) rathe r than havin g to type in a set
of instructions. Thus, the CLI instru ction abov e could be
represented by a single graphs icon.
Example of GUIs includes the WIMP environment (windows,
icons, menu and pointing device). Here each application to be opened
is called a window . An icon from the windows environment is selected
using a pointing device (for example, mouse) and this opens and runs the
application.
Electronic mail
A very common way of communicating is via electronic mail (email ). This
has some advantages over video conferencing in that you can read emails
whenever you like ( which overcomes time zone differences) and also the
equipment needed is nothing more than a computer and a modem link. It also
has obvious advantages when compared to traditional mail; i.e. it is faster to
deliver the email (and get a reply) and you need not leave your house or office
to send the email (very useful if you are disabled, elderly or even just very busy).
* •* x
~T — Jr£ ** a r J2SL &
. - ,
RI I . T »«*
»•« « »
l I
* •• ••» «
E
e
ft
li
K
3 —
—
• o«
*
An email page
H
So what happens when an email is sent ?
f
sender composes message and
attaches a file if required ^
j
sender clicks on SEND button
after entering address
I f/0
( No
computer
computer
computer
mobile phone
computer
landline phone
pm The user can either plug in a compatible telephone (via one of
the USB
Computer applications
%
2
ports) or use a headset to allow audio communication to take place Universal serial bus
over the
Internet. The main advantage of this is cost; for example, option ( ( USB) is a standard
1 computer for connection ,
to computer ) is essentially free. In option 2 (computer to mo
bile phone) the communication and
costs are in many cases 90 per cent less than with mobile to mo
bile. power supply between
two electronic
The main disadvantages are:
devices.
* - the caller needs to have a broadband connection and computer
- sound quality can be poor (drop out, echoes, etc.).
• Resistive
• Capacitive
• Infrared
I
. This makes use of an upper layer of polyester and a bottom
layer of glass.
• When the top flexible polyester layer is pushed, it touches
the bottom glass layer and completes a circuit.
• Signals are then sent out which are interpreted by a microchip
and the location of where the screen was pushed is determined.
Disadvantages
Advantages
• relatively inexpensive
. poor screen visibility in sun light
technology • does not permit multi-touch
capabilities
• can use bare fingers,
gloved fingers or stylus to
. durability of screen only fair;
vulnerable to scratches and
input.
screen wears out in time.
Capacitive
*0
S
Advantages
. medium cost technology .
Disadvantages
allows only the use of bare
i
nii d!
Sens
jtfra red
'V
, Twc
.
Heatser siti', Optical
m
- Uses glass for screen material - Uses glass for screen material
- Touch screen needs a warm - Uses an array of sensors in the
object ( for example, fingers) to
form of a grid; point of impact
register input point.
calculated based on which grid
position touched.
Advantages
Disadvantages
• both systems allow multi
touch capabilities
- • relatively expensive
• optical system allows the technology in both systems
use of bare fingers, gloved • allows only the use of bare S
fingers or stylus to input fingers as the form of input
• both systems have good • both have ‘ fairly good’
*
durability; glass shatters visibility in sun light but
on major impact only. strong ambient light impacts
on precision and on
productivity.
Computer applications 2
There are many app : i c e - ions that use sensors. The following table shows
which sensors are 1
a number of common applications.
humidity greenhouse
—4 control or monitor the humidity levels in the air in a
greenhouse
—> monitor the dampness / humidity in the air in an industrial
process or application
oxygen/ —> environment monitoring (for example , measuring the
Q
r
magnetic field
^ mobile phone or CD/ DVD players)
used in anti-lock braking systems in cars/ vehicles
used in traction control systems in cars/ vehicles
The sensors are part of a system which is used to either monitor or control
a process or application. There are subtle differences between the two
methods.
Examples of monitoring
• Monitoring a patient's vita! signs in a hospital
Monitoi hemical or nuclear process
• Bui qiar or : . Here monitoring for intruders is carried out)
• Pollution monitoring in rivers and the atmosphere.
Examples of control
• Controlling the operation of industrial process; for example:
- Conditions in chemical reactions for safety and quality control
- Nuclear power stations (maintaining correct conditions)
- Production/reprocessing of nuclear fuels (safety and quality control)
• Controlling the temperature in a central heating system
• Controlling the environment in a greenhouse (temperature, moisture, soil
pH, carbon dioxide/oxygen levels and so
on)
• Traffic control (timing of traffic lights, etc.)
• Street lighting (controlling the switching on and switching off the street
lighting).
In monitoring, the sensors send data
/signals to a computer via an ADC.
computer analyses the data received
and if it is 'outside normal values , 1
a warning and/or gives out
some form of a readout on a screen or printer
computer cannot change anything
to alter the data being read by the sys
,
^
In controlling, again
s*
sensors are used to gather data and send it to a
computer via an ADC. If the
received values are 'outside the acceptable
range', the computer sends <Qi
signals to devices (such as pumps, valves,
motors) to open/close, switch on
or off, etc. so that the computer, in e
is controlling the process.
Consequently, the next sets of sensor reading
different.
J
Computer applications 2
Most industrial applications use monitoring and control since it is necessary to
see what is happening in the process; but for safety reasons, the processes are
controlled by computer systems as their response time is much quicker than humans.
The following flowchart summarises the key differences.
process
£
sensors read data
i
ADC
^
L
computer reads data
No
1
es outside
^
momitoring >>v
^ normal
range Yes *^
DAC j
No
warns operators
>
No
1 Yes
i DAC
Let us now consider in detail two very different systems. %DAC is used to convert
(1) Monitoring signal to analogue so
that computer can
ts Example 1 - a burglar/security alarm system interface with alarm.
e infra red,
• gather data from sensors ( pressure,
motion) in the house
• signals are sent to an ADC where they are
converted into digital
• the information is then sent to the computer
• the computer compares this information
; with pre -set data
Cambridge IGCSE Computer Science Revision Guide
if it is out of ran ge (for exa mp le , pre ss ure too hig h and beam has been
•
broken ) the n a sig na l is sen t to so un d an ala rm
• alarm continues to so un d un til sys tem is re -set
sensors
river
sensors • sensors at position 'B ' also take readings to
at at measure the same set of parameters
position position • the sensor data is converted to digital using
‘A’ data logger B’
an ADC
• the data is then stored in the data logger
• the collected data is downloaded every 24 hours from the data logger or
is sent automatically via a communications link ...
• ... to a computer in the research laboratory
• readings from the sensors at position 'A' and position 'B' are compared by
the computer
• the results are > o . , n on a screen in the form of graphs, for example, or
stored in a spreadsheet for further analysis
• theresu * o . e sensors are also compared to data stored in the
compe te : or example, acceptable values or data readings taken
on previous days)
• this allows predictions of pollution levels to be made or supply evidence
that pollution is getting worse or better.
(2) Control
f u o
heater
sensors
collect data from the reactor vessel
this data is sent to an ADC where is co
to digital
it nverted
the information is then sent to
the computer
temperature reading is compar
ed to pre-set value
reactor if temperature < 80°C a signal
vessel - is sent to an actuator to
switch on the heater
K
computer
pressure reading is com
pared to pre -set value
if pressure < 2 bar a sig 1
nal is sent to an actuator to Pef
°
t
the valve
valve
- DAC is used to convert
heater and valves
this continues until the
signals to analogue to control
Note
E'
Some stree rk using electronic clocks rather than using light
sensors and c : alically switch the lamp on or off at fixed times during
the day. Since :he on or off times are dependent on the time of year, a
microprocessor is used to store these on or off times and it sends out
signals to switch the lamp on or off. The microprocessor will check the
actual time against the stored times ( which will be different for every day in
the year) and when a match is made , a signal will be sent out to switch the
lamp on or off.
B
Computer Science Revision Guide
Cambridge IGCSE
Actuators
many control applications involving sensors and
Actuators are used in
microprocessors . They are usually electromechanical devices
computers or
such as a motor, relay or solenoid . Actuators can be digital (solenoid) but
2.4 Robotics
Robots are used in many industrial applications. They basically carry out
humans but have many advantages which will be
ually either linked to a computer system or have
processor. Before carrying out any tasks, they
are programmed by one of two methods.
( 1) he tot.
1
s programmed with a series of instructions which allows it to
carry out a set of pre-determined tasks.
(2) One of the skilled workers carries out the tasks manually and the
movements/actions are relayed back to a computer; these actions are
I
converted into instructions which are then stored in the memory. The
robot is then operated under computer control copying the movement/ I
actions of the human operator.
Robots rely on the use of sensors which continually gather data about its
surroundings. Example is a car in the correct position to be sprayed with
paint, is the paint spray gun empty, is there an obstruction in the way,
is a part missing off a circuit board, etc. They are capable of doing some
pseudo- intelligent tasks (for example, different sized cars needing to be
painted) but in reality any non-standard routine is better carried out by a
human operator. There are a number of advantages and disadvantages of
using robots as discussed below.
Advantages
• Robots are capable of working in conditions which may be hazardous
to humans.
• They can work non-stop , only needing a
break when maintenance
is due.
Computer applications 2
,
TheV a e less exPensive in the long run since they do not need a
salary.
Robots are generally more productive (they can usually do a given
task in a shorter time than a human).
They are not necessarily more accurate than humans - however, the
work that they do is much more consistent.
They remove the need for humans to do boring, repetitive tasks
leaving them free to do operations such as quality control.
Less cost on factory environments - if human workers are absent
from the factory floor then heating and lighting, for example , only
need to be a minimum.
Disadvantages
Robots can find it difficult to deal with non-standard situations,
for exa , a door missing from a car waiting to be sprayed; a
Windsor about to be fitted to a car being cracked.
They te reduce the need for human operators causing
unemplc; - ent.
Also since - take over the tasks done by humans, there is
a risk cr c U king within the work force.
Since wen done anywhere using robots, factories are often
moved to < es where labour and operation costs are much lower.
•K• • • i « l
the ro bo ts mi gh t en co un ter wh en
(a) Describe: (i) Tw o pr ob lem s
se me tal co mp on en ts.
spraying the
co uld be ov er co me.
(ii) How these problems
s an d dis ad va nta ge s of us ing
are the ad va nta ge
(b) In general, what ma nu fac tur ing
us ing hu ma n wo rke rs in a
robots rather than
company ?
Cambridge IGCSE Computer Science Revision Guide
wheels
• &
s\
\\
V
{
\
A
\
)
Chapter
The Internet
Learning Summary
# The Internet
0 Broadband and dial up
0 Recent developments
0 Intranets
Studying the Interne: s a arge topic on its own. This chapter will deal with some of
the key features learn about website designing and how developments,
:
such as socia r : sites, have changed the way we interact and communicate.
In reality, the Internet took off in the 19 90 s wit h the int rod uc tio n of HT ML
(hypertext markup language) and WWW (world wide web), which uses
HTTP ( hypertext transfer protocol ).
The following is an example of the use of HTML code when defining part of a
<html>
<head>
<title > This is an example of the use of HTML code </ title > v
</ head>
<body>
<p> This shows you how the home page for a web page can be created in
HTML </ p>
<h 2> HTML examples </ h 2>
</ body>
i
i </ html>
i
seture and presentation
ed, it is very important to realise that there is a difference
r ? / ctiire and presentation:
s»ss
— A
les the semantics (i.e. the meaning) and structural •
S;
markup of the document ”*5
..
rr is the document style (i.e. how the document will look or
sound)
It is important to keep structure and presentation separated throughout
the design of the web page. Once the design is completed, the writer will
end up with an HTML document (containing the structure and content) and
a css file (cascading style sheet) which contains everything to control how
the web page will be presented to the web browser.
>
HTTP ( hypertext transfer protocol )
This is a set of rules for transferring files on the web (see example above);
A
'
http was later developed to allow secured transactions on the web to take
place. The http protocol works by transmitting the information using some
form of encryption. In theory this should mean that the information cannot
be accessed by anybody other than the user and web server.
'
VN
Encryption is a process of transforming information using
Key Point an algorithm which makes it unreadable to all except those
possessing special knowledge.
Web page
Web page
Search engines
They are a way of find iq information (i.e. from websites and web pages)
on the Internet A over, needs to be very careful when carrying
out such searches to / the following reasons:
Type in CUP+sample papers+ Ge ogr aph y and the sea rch eng ine
returns ~ 29 900 hits.
we bsi tes is bas ed on a num ber
Tne order in which search engines display
typ ed key wor ds to pick up
of factors. Search engine optimisation allows
cer tain web site s is dow n to com ple x
web site s The succes s and pop ula rity of
eng ine s. It has also bee n sug ges ted
ranking algorithm s use d by the sea rch
eng ines is rev enu e ind uce d.
that website ranking by certain search
a
Computer Scien ce Revision Guide
Cambridge IGCSE
- dial up
- broadband. *
Dial up Broadband
0
Features of broadband
SUM
Features of dial up
Kbps = kilobits per
- this offers a fairly slower data - this has a much faster data test
second
-
transfer rate (typically 60 kbps) transfer rate (> 50 000 kbps)
- there is a need to dial one of the - there is often an upper limit on
numbers supplier by the ISP every the monthly download/upload file
time one wants to connect to the size (typically 20 Gbyte)
Internet; therefore, dial up is not
:
on all the time
- the ISP contracts are usually for a - it has the advantage of always r
* Phone calls can still
be made even when
the internet is being
accessed.
number of hours per month and if
this is exceeded additional charges
are incurred
being on and it does not tie up
the phone line
tm«il / Uw « name .
P uword
New User
Blogs
%Blogs are an personal Internet journals where a writer ( called a blogger ) can
These are
abbreviation for weB some text about a topic or person; it is even possible to include links t
write
LOGs. training is needed to create a blog.
to certain websites. No real
Blogs can be day - to - day gossip ( for example , my favourite rock star ) to
serious topics such as car safety issues, politics or even to organise a protest
rally. However, it is still important to remember that comments made on
t
blogs are still subject to the usual libel laws (which vary from country to t-
country). f
A
'V
Web browsers
A
Web browsers are software that allow a user to display and interact with
web pages and files from the Internet.
The software interprets the coding language of the websites and displays
the translation instead of showing the actual coding . Consequently, a 4$
user can simo ! launch a web browser by clicking on the appropriate icon
from the desk nd there is no need to know the commands which are
requirec ) ret the website coding once it has been accessed. Every
web brov - s a screen toolbar with functions such as:
revision_guide.html
vv
Then the three parts in this URL would be:
The web browser translates the web server name into an IP address which
is used to connect to the web server. Following the http protocol, the web
browser asks for file: computer _science_revision _guide.html .
The web server returns the HTML text for the selected web page to the web
browser, this reads the HTML <tags> and shows the correctly formatted
page on the computer screen.
The video files are stored on the server and allows either free access to
anyone or some form of code is required before the videos can be viewed.
For example, YouTube .
Since most users I ave unlimited web space, this type of website is
becoming increas / opuiar as a way of storing/archiving a number
of videos.
Podcasts
ser ies of me dia files ( aud io
Podcasts are essentially a
reg ula r inte rva ls and
and video) that are released at
. Bec aus e of the me tho d
downloaded to a user's computer
acc ess ing me dia files.
of delivery, this is a different way of
S
Cambridge IGCSE Computer Science Revision Guide
.1
Tagging
Tagging is a type of bookmarking where a user tags a web page or
photograph using some text to describe its contents. Anyone can view the i
Interactive maps
ge ne ral ad ver tisi ng
On many websites (for example, hotels, shops, or
som eth ing) int era cti ve ma ps are av ail ab le.
ing
involv the wh ere ab ou ts of
These usually show 3 options:
na min g of roa ds)
- road maps (conventional
of the are a )
- satellite views (aerial views
- a hybrid of both the above.
sa tel lite s cu rre ntl y ca n on ly pic k
Satellite maps are a bit of a mi sn om er sin ce
ea rth su rfa ce . As you zoo m in,
up something about 2 square metre s on the
an ae ria l vie w sho win g
at some point the satellite image is replaced with
the close details of the area.
ma ps is ver y us efu l since
The combination of aerial views and conventional the re
ex am ple, is it bu ilt up , or are
it gives users 'a feel for the area ' ( for
any parks/green areas nearby ?).
/
S
Cambridge IGCSE Computer Science Revision Guide H
superimposed with traditional
%
An example of a satellite /aerial view road
mapping (option 3 on page 27 ) is shown below .
/
<r
NJ
Satellite mapping
%
The most common features of interactive maps include:
Q l\
k
The Internet 3
the device manufa cturer ( first 24 bits in groups of 3) and the serial number
of the device (second 24 bits in groups of 3). The MAC address is very rarely
changed so that a device can be identified no matter where it is.
However, each device using the Internet also has another unique address
known as the Internet protocol (IP) address. This is a 32-bit number (e.g.
100.140.145.1). As soon as a device connects to the Internet, it is allocated
an IP address and is unique for that session. It is possible to use the IP
address to connect directly to a Webserver instead of using the normal URL;
for example : http://100.140.145.1
Tosummarise the differences between MAC addresses and IP addresses:
suppose a user logs on to the Internet on Monday and then again on
Tuesday:
Monday
MAC address of
computer: 00-14- 22-5 F-
20- AE 4 Internet web server
IP address of device:
108.105.108.1
Tuesday
MAC address of
computer: 00-14- 22-5 F-
20- AE 4 Internet web server
IP address of device:
108.100.100.1
3.4 Intranets
as the Internet . Basicall y, an intranet
Many companies use intranets as well
technolo gy ) but is designe d to
is a computer network (based on Internet the
is not availab le to users outside
work within the company only and
company.
Q
Cambridge IGCSE Computer Science Revision Guide
Advantages
A
The Internet 3
e company offers the
following Internet data transfer rates:
64 megabits per second
download speed
24 megabits per second upload
speed
(You may assume that 1 byte = 8 bits.)
A user wishes to download 80
music tracks which are 3.8 Mbyte
each. How long would it take to
download all the 80 tracks?
(c) Another user wishes to upload 50 holiday photographs
onto a
social networking site. Each photo is 2 Mbyte in
size. The user
also decides to tag each photograph so that his
friends can view
his holiday photos.
( 0 How long would it take to upload
all 50 photos ?
(ii) What is a social networking site ?
( iii ) What are the advantages in tagging the photos on the
social networking site ?
Another user wishes to upload 20 videos showing motor racing
events during 2011. What is the best way of making these
videos available to all interested people ?
.5.3 Describe the differences between digital media sharing websites and
podcasts.
3.5.4 Chat rooms are used by a number of people across the globe.
Describe:
(a) What safeguards need to be in place to protect people using
chat rooms.
(b) How chat rooms work.
(c) The differences between chat rooms and instant messaging.
3.5.5 A television company decides to offer customers the facility to view
its programmes over the Internet . Customers will be able to get
through a technique known as data (bit ) streaming .
programmes
data (bit) streaming is offered as true ( for all live sports
(a) The
events ) and on - demand . Describe the main differences between
the two methods.
advantages of using data (bit) streaming rather than
(b) Give the
simply downloading video files.
problems associated with data ( bit)
( c) Describe some of the
streaming of video and audio files.
Internet and intranet access to all its employees .
3.5.6 A company allows
exist in permitting access to the Internet ?
(a) What problems could
advantages of using an intranet ?
(b) What are the main
computer and wishes to access Internet websites .
3.5.7 A user is buying a new
user may need to access the Internet and to
Discuss the software the
via text and sound.
be able to communicate
Chapter
There are several security issues associated with computer systems and
Because this topic is
many of these can lead to data integrity issues.
K
continually changing
the reader is advised
The following pages consider a number of potential security risks and each
to get regular updates
from the Internet one has been split into four sections so that it is easy to compare their
impact on computer systems.
or from computer
magazines.
The four sections used are as such.
S
rm risk
- description of security risk
sv
- impact of risk on computer system
- safeguards available to remove or minimise the risk
IVN
4
•I -
With cracking, the 'cracker ' edits programme source coding so that the
software can be used or changed to meet a specific purpose. More likely
than not, this is done for a malicious purpose (for example, genuine
software could be modified to perform a task such as pharming or
spyware).
Hacking isn't necessarily harmful while cracking is always totally illegal and
can be potentially very harmful.
Many ISPs can filter out these phishing emails, but users
should always be aware of the risk and exercise caution when
opening emails. ]
%Users affected by i ing is where malicious code software is installed on the hard
. I the user’s computer or on the actual web server. This code
pharming are oblivious
ill direct users to bogus ( fake) websites without the user’s
to what is happening tor knowledge. Unlike phishing, which requires the user to
until it is perhaps too ; an email, in pharming there is no need for the userto
/
/
•Access to personal information, such as credit card numbers,
Pharming PINs, can lead to fraud and other illegal use of whatever
personal and financial information the creator can get.
\
ID
* Security aspects 4
*
Spywore is a software that gathers
information by monitoring
key presses on the user’s keyboard and
relays this information
%Banks try to
back to the person who sent the spyware. overcome
Spyware can also this risk by asking
gn&tall other spyware programs, read cookies
and can even a user to Input
change the user’s web browser.
characters from a
. Monitoring key presses gives the originator access to password using drop
characters in typed passwords, credit card number , down boxes ( thus
s sensitive
*1 data. etc . and can lead to serious fraud and
identity theft
eliminating key
implications. presses ).
user's computer and only allow detection of web pages viewed by the user on a -IB
particular website. 4
Although this information is used to form an anonymous profile of the user,
and do not contain personal data such as name and address, they have been
the subject of some privacy concerns lately. For this
reason, they have been
included here in the security issues section of the textbook. Nonetheless, %
cookies have been the subject of many misconceptions over the years. For
example, none of the following are actually
true: %
cookies are like viruses and can do harm to
data stored on a computer
- cookies are a form of spyware/key
logging software and can access
and transmit personal data when typed on
a computer keyboard
- cookies generate website pop ups/pop unders 1
- cookies are a form of spam.
Firewall
Essentially a firewall ils a program
*
information coming from the
or hardware device that filters
private network (for
Internet to a user's computer system or
example, iintranet ). It actually
between two networks, 6 private sits at the gateway
one Duhlir ffnr , °? (for example, an intranet) and
hardware firewauTd a soWe flrewA ' ^*
fi
Security aspects
\ In the hardware
I hardware
firewall Internet
version of the firewall
it is usually connected
to the IP router. In the
software version, the
firewall is stored on
one of the computers
which connects to the
Hardware firewall Internet.
Internet
Software firewall
security risk
getting into computers on the
it helps to prevent malware/viruses
private network
it keeps a list of undesirable websites or IP addresses .
Proxy servers
.
Proxy dryers connen users 0 the main website
intermediate.
sewer and act as an
Proxy server
Request sent by
L forwards request
web browser Internet web
> Proxy server l server
User ’ s computer
HA response is sent
Response from back to the proxy
server filtered and server
sent to user if OK
Cambridge IGCSE Computer Science Revision Guide
Proxy servers allow filtering of Internet traffic and can block access to
certain websites
proxy servers help to speed up the access of information from web
servers by using a cache ; the website home page is saved on the proxy
server cache (part of its memory area ) after it is accessed for the first
_
time the next time the user wants to visit the same website, it is now /
accessed from the proxy server cache rather than from the remote web 0
f
server; thus giving faster access
proxy servers help to keep a user 's IP address anonymous thus
improving Internet security
some proxy servers can act as a firewall improving security from, for
4
example, hacking.
}
4.7 Encryption
Symmetric encryption
key is used which can be a number or
With symmetric encryption, a secret
the message to change its content
letters. This key can then be applied to
and essentially make it unreadable unless the secret key is also known . As
secret key , they can encrypt and
long as the sender and recipient know this
decrypt all messages that use that particular key.
it is for a hacker to identify it.
Obviously, the longer the key the more difficult
combination s which is actually
For example, a 56-bit key has 7 x 101* possible
quite possible to crack with modern high speed computers . The advance
128 - bit and even 256 - it eys
encryption standard (AES) advises the use of
to improve security; a 128-bit key has 3 x 1035 possible combination s which
for the moment .
makes it considerably more secure - at least
Q
Cambridge IG m •L r
0
'
Authentication
art
Authentication is used to verify that information comes from a trusted
source. Encryption and authentication work together to further improve
Internet security. Methods of authentication include:
passwords - user name and password; when these are entered, ssMmei
they are checked against a secure file to confirm an «
* «85.
authorised person has 'logged in' to the system - if
!i
either user name or password are incorrect, access is
denied H
' i,
pass cards pass cards contain a magnetic stripe (which contains
security information) and/or an embedded chip (which
often contains a PIN)
digital signatures digital signatures are based on public key encryption
biometrics
( which use a private key and a public key)
- biometrics are a recent introduction; they rely on the
unique properties of certain aspects of the human
*
physiology:
- fingerprint scans
- retina scans
- face scan
- voice identification.
k
is called cypher text .
VS
Security aspects 4
However, many banks, for example, go one stage further when operating
online banking. They not only encrypt all data but also use some of the
following.
ittiaiy .
Home
2 . Input some of the characters from a PIN and some of the characters from
a password. This method prevents a hacker finding out the password/
PIN, since each time a user logs onto the bank they will be asked to key in
different characters.
In the example below, the user is asked to type in the 3 , 4th
and
rd1 st
Q0®
MS V
Home
charac ters from your PIN:
Please type in the following
rd
3
th
4
st
1
from your passw ord:
Please type in the following characters
nd
2
th
5
th
9
(b) DescriL i wh t
when a
-
ppens between web browser and web server
sr w hes to access a website which uses SSL certification.
(c) Describe idifferent types of authentication used as security
methods v ten accessing a secure website.
.
4.9 2 (a) Explain how a firewall could be used to secure the data in a
computer connected to the Internet.
(b) What additional features do proxy servers offer to Internet users?
4.9.3 (a) Name four potential security risks associated with connecting to
the Internet.
In each case, name a way of overcoming the risk .
(b) (i) What is meant by the term cook /e?
customer's computers ?
(ii) Why do websites send out cookies to
could occur and name
4- 9.4 Describe how each of the following problems
a way of recovering from them.
o
Cambridge IGCSE Computer Science Revision Guide
4.9. 5 A shopping mall offers customers WiFi hot spots (access points)
\
Chapter
e p ro g ra m m in g languages
°
Learning Summary
and programming
0 Databases
This chapter will look at programming languages and programming concepts including
the use of one-dimensional arrays.
SED
LDA NUM 1 L
CLC
ADC NUM2L
READ num1 STA RESL
READ num2 LDA NUM 1 M
Total= num + num2 ADC NUM 2M
STA RESM
CLD
RTS
asse mbly code
Low level
High level code
Cambridge IGCSE Computer Science Revision Guide
r
Advantages j
Low level • all ow s us er to ad dress computer
languages: memory/ addresses directly
• user learns how the computer works
\Portability means that High level • usually close to English and are
they can be used on languages: therefore easier to write and understand
any computer and are • they are portable
not machine specific.
• they are easier to debug and modify.
Disadvantages /
Compilers
these translate all of the original hig
into machine code
h level code (called the source code) k
- the whole of the source code
is compiled in one go
- a stand-alone program
code (called the object code ) is produced
- a list of errors is produced
at the end of the compilation
- whilst the compilation process pr oc es s
is itself quite slow, the object code
produced will run very
quickly
- because all the code is compiled,
when any changes need to be made,
the whole of the source
code needs to be re -compiled
.
Interpreters
- each line is decoded on
e by one and then
no stand- alone object executed
code is produced; the
present all the time interpreter needs to be
Programming languages and programming 5
- errors (if any) are produced at the end of each line and the program
usually stops at that point until the correction is
i made; this makes it easier
to develop new software
- whilst interpreting is faster than the compilation process because %Each statement
„ .
„
0 actual machine code is produced (i.e each
statement has to be
interpreted esrery me the program is run), interpreted
programs take
has to
be interpreted every
time the program
longer to run than programs converted into object is run.
code
The following flowcharts compare the two methods.
START ) START
4
4
Change source
Is
ruction
No
j OUTPUT code to object
code
correct? ‘error’
Make
Yes
4
END Any errors changes
Execute high level in the code? to
Yes original
instruction
program
No
*
Produce stand-
Any more alone program
instructions?
Yes
Store object
code
END
*
END Listing of final program
Compiler
Interpreter
Revision Guide
Cambridge IGCSE Computer Science
Assemblers
original low level assembly code into machine code
- translate the
/
Example 1
In the following drawing earh
10 Cm by 10 cm (and the dia9onalls
T° °
14 cm). Draw the shape
1 PENDOWN
0U ^' ^
d
^
shown usi 9 9 commands from the above table.
US6d t0 draW the n6Xt pagS
2 FORWARD 10 7 RIGHT 90
3 LEFT go 8 FORWARD 28
4 FORWARD 20 9 RIGHT 135
5 RIGHT 135 10 FORWARD 20
6 FORWARD 11 LEFT 90
42
12 FORWARD 20
L
Programming languages and programming 5
•y
“ “i
l
r
— i
i 45°
¥
*1
Start
t Finish
Example 2
r " r
i
i
_
, finish
Start
I i5
; draw the above s p
The following logo commands could be used to
»:
1 PENDOWN 7 PENUP
8 FORW ARD 10
2 LEFT 90
3 9 LEFT 90
REPEAT 3
4 10 PENDOWN
FORWARD 30 20
5 RIGHT 90 11 FORW ARD
6 12 PENUP
ENDREPEAT
Cambridge IGCSE Computer Science Revision Guide
18 FORWARD 20
13 LEFT 90
14 FORWARD 10 19 ENDREPEAT
15 PENDOWN 20 LEFT 90 r
16 REPEAT 3 21 FORWARD 10
17 RIGHT 90 22 PENDOWN
Programming statements
Assignment
Assignment statements are used to set a variable to a new value;
for
example, start := 1; or percent := value / total * 100 ,
new value can be set from a constant or an expression.
-The
Sequence
Repetition
. All the following
There are three common ways of carrying out repetition , .
numbers and output
Pieces of code carry out the same task: input 40
total.
be met before the code
The while loop is used when a condition must
within the loop can be executed.
m
Revision Guide
Computer Science
Cambridge IGCSE
count := 0 ;
total =
: 0;
while count < 40 do
begin
(firstnumber ) ;
readln ;
+ fir stnumber
total := total
+ 1
count := count
end;
is ' , total );
writeln ('The total
are a fixed number of repetitions known.
loop is used when there
The for
total := 0;
V
for count := 1 to 40 do 4
begin
readln (firstnumber) ; '
i
*
ft
count := 0 ;
total := 0;
repeat
begin
readln (firstnumber) ;
^ pr
Counting s
\
Counting is a very common task in many programming languages: for
example, count ;= count + l; which means, in programming terms
possible to
the value stored in the variable count is incremented by 1. It is
count in any increment required, for example:
s:
read / readln (temp ); and write/writeln ( sum);
Ulum lj
-
Functions
A function is a short piece of program code that carries out a task that
will be used more than once and part of this task is to provide a value. A
predefined function is program code that most programmers will need to
use and is usually available from a library of routines. A function can be
used on the right .le of an assignment statement. For example,
the
library CRT has a fun on readkey which can be used as follows:
Value := readkey;
Making a pi n understandable
Programs need to . . ierstandable to other programmers so that they
can be altered or d if required. Here are some of the methods used
to ensure programs g code is easier to understand. %For example, have a
Indentation look at the code in
Reading values into
All the programming statements inside a loop or as part of a selection are an array using a For
loop.
indented to make the code easier to read.
Meaningful names
All the identifiers for variables, constants procedures and functions should
be given meaningful names that show what they are used, for example,
counter rather than x to count the repetitions in a loop.
)
Comments
is ignored by
These provide extra information for a programmer that
make the source co e
compiler or an interpreter. Comments are added to
easier to understand.
5.4
of similar a a >
An array is a data structure that refers to a set
of the same type, that have a common name and eac in ivi
Declarations J
var indexl : integer ;
array [ 1..5 ] of integer ;
r.
var mynumbers : 7,
var index2 ; integer ;
var mynames : array [ 1..5] of string ;
•
use 7
mynumbers[1] : = 7;
mynumbers[5] := 12;
mynames[ 3] := 'David'
begin
readln (firstnumber );
mynumbers[index] := firstnumber
vv «
end ;
v\
This Pro9 ramrning is more efficient as there are
often less lines of code
required . Compare this program to find the
average, and highest marks for
three students without using an array:
var studentmarkl , studentmark ,
2 studentmark3 : integer;
var total , highestmark ; integer
;
Q YV
F I I
databases to allow
of filing info rma tion
Cabases are basically an electronic way data .
eff icient storage, retrieval and cross che ckin g of
Cambridge IGCSE Computer Science Revision Guide /
4
is stored in rows and columns. Each row is known as a record and the
Data fj
data items are known as fields . /
9
identification name date of birth telephone sex /
314 816 2000 t
record 101216 F. Bloggs 12/12/1964 M
101218 N. Smith 23/08/1984 381 2341268 F
record
5
fields !
:
Each field in a record has its own data type. The data types in the fields can
be text, alphanumeric, numeric, Boolean or date/time. In this example, the 0
*
following data types have been chosen.
Queries
$
NK
is
:rma
filtering so only the required
used to perform a search
,ion ,o be
^ ^
records and fields are seen. Query - by -
from given criteria.
examp e
' m
N
Programming languages and programming 5
Examples of query-by-example
this sec tion of a database table for WORLD CITIES:
Consider
Name of city Country Continent Population Density Area
Continent Population
Field: Name of city
WORLD CITIES WORLD CITIES
Table: WORLD CITIES
Sort:
Show:
> 8.0
Criteria: = ‘America ’
or :
that the field names in the query -by - example grid should match up
Note table.
the field names in the database
exactly with
are constructed using a column for each field require /
Query -by -examples
this contains the following information : ^
Field: name of field in database table
Criteria: all the criteria for each field in this row are joined with AND
or : use this row for OR
File maintenance
Files stored on databases need to be regularly maintained to ensure they
are up to date and accurate. Updating usually involves amending; inserting
or deleting of data. To show how this works, we will consider a hospital
keeping records of its patients on a database.
s
Programming languages and
programming 5
i ~ *i
i
i
45°
i
-- -- - --
i
-- A
5.6 2 .
Start
r i
Finish
—— J
ltr.
u J l
-
< J
I
JS
B
(d) -
Complete a query by-example grid to find all freezers which
operate below -25°C and have a capacity which is more than 0.24 m3.
Field:
Table:
r
Sort:
Show:
,
) Criteria:
-
or:
y
i .
5.6.10 A database tab e was set up to show variou s featur es
is
of a
show
numb
n
er
below
of
:
HOTELS near an airport. Part of this datab ase table
weekday weekend no of km to
ref hotel no stars
tariff ( $ ) rooms airport
no tariff ( $ )
40.00 21 5
1 Grand 3 50.00
60.00 64 4
2 Northern 4 70.00
40.00 20 8
3 Western 2 45.00
75.00 150 2
4 Quality 5 100.00
50.00 40 15
5 Albion 3 60.00
25.00 32 20
6 Orion 2 35.00
20 15
7 2 40.00 30.00
Denver
50 10
8 3 45.00 35.00
Wellbeing
75 6
9 4 80.00 60.00
Classic
Show:
Criteria: =4
or: >45
(d) Write down the query- by-example grid to find all hotels which are
less than 10 km from the airport or have more than 50 rooms and
a weekday tariff which is less than $ 100.
Field:
Table: w
Sort: HIS
Show:
Criteria:
s
( Mi
or:
( e) Write down the query- by -example grid to find all hotels showing
ref no only, with the records in ascending order after being sorted
on weekday tariff ($).
*
A
Field
Table Hi
Sort
\
Show
I
Criteria «in
or: S
5
,„ ,
6
mw Name:
Sex :
Department:
,
A company wishes o keep details aboo its
da abaM able TbS r 0rd
'
’
,
-
employees who work i
“ employee is
Alphanumeric
Alphanumeric
Alphanumeric
„
20 characters
1 character
1 character
European country:
Alphanumeric 12 characters
Number of years working
in company:
Numeric 2 digits
The following codes are used in the
records:
Sex: F = female
M = male
Department: A = administration
P = personnel
M = management
F = finance
Two records fror database table are shown below:
W L S 0 N F M I T A L Y
P H I L L K G M F R 0 M A N A
(b) Show how vould store the record for a Miss M Majid, who
works for the personnel department in Germany. She has worked
in the company for 9 years.
(c) Give two advantages of using codes when saving data in files.
(d) Why is it NOT a good years
idea to store No ofworking in
piece of information to store ?
company ? What would be a better
(e) Explain why none of the fields in this database table are suitable to
Q
I Chapter
\
f
A
Flowcharts
Learning Summary
In this chapter we will look at various uses of flowcharts and consider how to produce
them and also how to interpret them.
*
HI
V
r0
Flowcharts are a diagr: epresenting a problem, a task ora mt
sequence of instruction problems, they are also known as
tyit
an algorithm.
up
^
1
\
Store items
X
Clothing
Hardware
;
electrical furniture other h/ w
m
tv other
\
bedroom glassware
women men
\
packaged
\
I designer
j designer
[ tinned
computer other other
general
j general
frozen
Flowcharts 6
These modules are all put together to form the main program. This allows
several programmers to work on the same software package and makes
testing easier since each module needs to be tested separately. Finally, the
modules are linked and the whole program/package is again tested to
ensure that there are no clashes between these linked modules.
This method allows for a very structured approach and also permits a %Library of routines are
library of routines to be sed. This saves having to design the routines/ procedures, modules
modules each time (? ' ?refore saves time and money) and they will or subroutines stored
also be fully pre-testc i the routines/modules may be used in many in a ‘library ’ which
can be used in other
software packages, per nit compatibility (for example, passing of data
software where
between programs) . required.
Screen 1
hardware ( menu 1)
Screen 2
( menu 2)
women
select or touch
one of the two
men options
y\
m
Rev isio n Gui de
Cambridge IGCSE Computer Science
Screen 3
general (menu 3)
select or touch
one of the two
C designer 4 options
Screen 4
shirts jeans (menu 4)
select or touch
coats other one of the
four options
The menus could go one stage further offering price, colour, size or
style options. Note that once clothing is selected from menu 1 the user
5
is directed to another screen where a new menu appears. The user is
directed to new screens and menus until the required level of choice is
reached.
^ ^
°n ^Ch by '9hts the value they want. The to
* tben
User
recuirpri -
t 0
the menu
menu nnf *
options approach
0Sen dickin9 on a mouse. This is different s
shown in the previous example.
With drop down menus
, the possible on
the same screen men u optio ns are show n in a box
* 11 Flowcharts 6
hardware
clothing women
designer shirts
jeans price
coats size
other colour
style
Cascading series of drop down menus show which item was selected (using %Note that the menu
a pointing device) fro < menu. All the menu options are shown on one
ser options in the next
screen and the user lr : ie mouse across to each drop down menu in turn. menu are only
revealed after the user
IS
has selected an option
u
also
from the previous
menu.
v
mm
6.2 Common flowchart symbols 1
We will first consider the more common flowchart symbols. %Also refer to chapter
990
991
a:
c START
i
) start box shows the beginning
of any flowchart
5 which considers
systems flowcharts.
Revision Guide
bridge IGCSE Computer Science
Cam
is engine Y<
tax 4- 500
> 3?
No
is engine Yes
> 2? tax <- 300
*
No
is engine Yes
> 1?
* tax <- 100
No
tax 4- 0 s
*
OUTPUT tax
Yes
any more? No
* mm'
r
I
Problem 2
The heights of 500 students in a school are being measured Write
Flowcharts 6
an
Solution
^ ^ START
count <— 1
r
^
totall <- 0: total 2 <- 0
Yes
> totall <- totall + 1
No
v
is height Yes
total2 <- total2 + 1
< 1.45? * *
No
^
count count + 1
Yes is count
<= 500?
No
OUTPUT
totall, total2
( )
s
END
/
Cambridge IGCSE Co m puter Sc ie nc e R ev is io n G ui de
Problem 3
Write an algorithm, in th e for m of a flo wc ha rt, wh ich .
• inputs the weight of 1000 items
• outputs the weight of the heaviest and the lightest item
• outputs the average (mean) weight of all the items input.
Solution
START )
i
count <- 1
/ INPUT 7
L weight
No
^ No
I
count 4- count + 1
Yes is count
<= 1000 ?
No
' OUTPUT
average, heaviest, lightest
c END
)
Flowcharts 6
Problem 4
A small shop sells sweets, magazines and
drinks Fa h
by a unique 4 - digit code. All sweets sold have a
code that
sold ° ^
is identified
magazines sold have a code that starts starts with a 1, all
with a 2 and all drinks
code that starts with a 3. So: sold have a
1000 to 1999 are the codes for sweets,
2000 to 2999 are the codes for magazines,
and
3000 to 3999 are the codes for drinks.
(9999 is used to stop the algorithm)
sweets
*
Start
*
- 0: mags
^ - 0:
in the shop and outputs
how
many items sold were sweets,
problem since it
shows a clever way of
finding a value.
drinks — 0 * magazines or drinks.
*
INPU 7
coc
Yes OUTPUT
sweets,
999
* mags, drinks
END
number - 0 1
*
A—
*
code - code - 1000
*
is code Yes
number - number +1
>= 0? *
No
is number ^O
. = 1? ^* sweets - sweets +1
*
No
Yes
is number J mags - mags + 1
= 2? *
No
Yes
is number
> —
drinks < drinks +1
= 3? ^
No
OUTPUT
‘error!’
i
Guir, r~
Science Revision
IGCSE Computer
Cambridge
em 5
Solution have been carrying out 5
Some students
; 20 temperature readings were
experiments
START experiment.
taken in each
_ - the form of t
highest - intvtotal alU
° Write an algorithm
, which
, in
inputs all of the t
a flowchart it
expt <- t readings, and outputs the
temperature
temperature for EACH
average (mean)
average (mean) temperature
exoeriment ,the
totaLexpt * - 0
and the highest
for ALL 5 experiments
recorded from all the readings
reading <- 1 temperature
taken.
INPUT temp
totaLexpt + ternp
tntal expt <r -
\ _
total all <- total_ all + temp
is temp >
mp
highest?
No
~
No
_
'
avge _ expt «- total expt / 20 \
/ OUTPUT avge _expt y /
t
expt <- expt + 1
No
%
--
agve _ all <— total_all/ 100
Yes is expt
<= 5? *•
makes
I use other
OUTPUT
avge _all
( a loop
loop) since
tS
5 experiment & H
from
20 results
experiment.
END )
Q
Flowcharts 6
~ -
Dry running of flowcharts is done to:
-
i ror
: a 9 iven
\ r„,tc, s,rwn as a
-
——
,
n a9K in do ng his ra her hM
" '
I
I“u r°~,
'° he 9iC
** a
* « There are ,hree
Normal date
- to test for expec ilts
- the data used ir « 1 is normal data
Erroneous/abnormal data
- this data should be rejected and an erro r mes sage prod uce d
the calc ulat ion wou ld
- for question 6.5.6, a time of 0 must be rejected as
not work with this value
—
/•
erro r
track in orde
using this
r to find
method.
n
• There is also less chance of maki ng an
app roac h and helps to
&
• It encourages students to adop t ai logic al
out a give n algo rithm .
determine suitable test data to chec k
A
Cambridge IGCSE Computer Science Revision Guide
sets
^
counts, etc. Example:
a b c total A total B
0 0
readx
0 0 0
8
1 8
2
0 0 0
11
0 0
3
^
-2
The following three examples show the trace
tables for a given set of
It is advisable to go through each one data.
carefully to see what the
doing and make sure you get the same flowchart is
output.
Example 1
\
START i
J
INPUT number \
'v
count <r~ l
T <r- number
number number/io
( END )
is number
< 1? Yes
OUTPUT
T, count
No
-
count < count
+1
- \\
Flowcharts 6
\ Trace table
Example 2
id This flowchart inputs mbers and outputs how many were negative,
how many were pos id how many were zero.
The following data i jsed: -1, 2, 4, 0, 0, 2, -3, 0, 12, 8.
Flowchart
c START )
neg <— 0: pos <- 0: zero <— 0:
count <-l
trJ
i
INPUT
number
is number
— Jzero f- zero + 1
=0 ?
No
Yes
is number
< 0? *
neg <- neg + 1 *
No
M
is number Yes
> pos <- pos + 1
> 0?
: Revision Guide
Cambridge IGCSE Computer Science
Trace table
4 3 3 0 Y
5 4 0
6 5 2
7 - 3
8 0 V
9 12
S'
10 8 0
11
Example 3
r« J|S
This flowchart inpui sunshine each day over a 7 day raise
week. It outputs ded and the average (mean)
number of hours su
C START
INPUT hours
^ 5'
v
is hours Yes
high <- hours
> high ?
*
No U-
I
count <r - count + 1 END N
No is count OUTPUT
avge,
<= 7 ?
Yes a v g e <- t o t a l/7 [ * high \
Flowcharts 6
Trace table
START
is value Yes
send signal to valve
< 20 C ?
°
No convert signal
using DAC
is value
> 24°C ? No
actuator opens
Yes hot water valve
convert signal
using DAC
actuator closes
It hot water valve
R ev is io n G ui de
Cambridge IGCSE Computer Science
.
6.5 2 A large school categorises its students as Year 1, Year 2, up
to Year 7.
Mm
'
The school is interested i l finding out how many Year 1 students are Wnthi
taller than 135 cm and how many Year 7 students are shorter than total u$i
175 cm.
^,°^ ^ ^°
0 f Vehicles Per daV Passing
over a bridge near their
Wrife a„ algorithm i„ ,
number of vehicles per dav
^ o
^ rm
OWcbart, which inputs the
a
* *** “ >
%\a
PaSSIn9 over bri dg e for the wh ole
year (you may assume
that CO nta ins 36 5 days . e
) Th ou tpu t wi ll \
be the average (mean) \
^
f nicies per day and the highest
"^ber of vehicle ner aay °
during the survey.
6.5.4 A small store
sells 650 ite
a 3 digit code. All
'
items
3 day Each item so d is identified by
tlv T '
,
,
s ar w th a 0 ( zero ) are sweets, all
%
ltems that start with
a1a * * wi th a 2
||° ^
at ner
^
are )00 <s and all ite ms tha t sta rt
^ * items that s
000 t0 093 are
sweets
^^ a 3 are drinks. Thus:
*
100 to 199 are
stationery
mil! Flowcharts 6
\ 200 to 299 are books
300 to 399 are drinks
6.5.5 The rainfall (in mm) and number of hours sunshine are being
recorded for ten (10) holiday resorts. Readings were taken every day
s for a whole year (365 days).
• outputs the average rainfall for EACH resort over the year
Rl$::
or • outputs the age number of hours of sunshine for EACH
resort over the year
ana:;
onal • outputs st number of hours sunshine in a day for ALL
nit resorts over the year
s
• outputs lo est rainfall in a day for ALL resorts over the year.
6.5.6 Traffic enforc cameras read the time it takes a vehicle to pass
'ea r /
2 points in the 500 metres apart. The speed of the vehicle is
its are calculated using:
lan
30 km / hour
speed =
(time taken in minutes)
( 0 )
The maximum speed allowed is 100 km/hour. Eig ht tho usa nd 800
ca me ras ove r one day.
vehicles re monitored using these
we
nan) .
flo wc ha rt, wh ich
Write an algorithm, in the form of a
.
hig he st sp ee d ca lcu lat ed .
1 tpu ts the
• after all the data is input, ou
,,
a tennis court. If
^ ^,
5 »er h Ur P
A » rts ub
*° “ *
there are 3 or more players , the°re is 'l
a 25 / dis co un t
pe
on the o »l
.
cos
c START
)V
/
/ INPUT
number
»1
count «- 0
i
T E
is
Yes
number
< 0?
OUTPUT
‘error!’
< END
No
temp temp - io
No
is temp OUTPUT
< 10 ?
Yes
count, END
number *
Flowcharts 6
Trace table
ST
*
sunny 4- 0: wet 4— 0: f ggy <- 0
°
INPUT weather
No
is weather Yes
sunny 4- sunny + 1
= sunny ? *
No
Yes
is weather
wet 4- wet + 1
= wet?
No
foggy 4- foggy + 1
, Revision Guido
Cambridge IGCSE Computer Science
Trace table
•-
thetr
6.5 .10 Draw the trace table termine the output for the following ^t
flowchart using the foitwing data:
24, 16, 31, 20, 28, 21, IS, 16, 25, 25 .
i
totall <- 0: total2 0:
x <- 0: y - 0
*
l
count <-l
/ INPUT temp
L
is temp Yes
<= 20? > totall <- totall + temp
x <— x + 1
No
is temp Yes
> 20? » total2 <— total2 + temp
y <- y + l
NOL.
—
count < count + 1
OUTPUT END
avgel, avge2
Kin Flowcharts 6
Trace table
ring .
6.5 11 Draw the tra ^ tor the following flowchart using the following
data:
40, -5, 3400 00.
cf
J
~
H^ I
‘
total s— 0 : X <— 0
3L
INPUT number
*
total <- number
. < 1?
*/* number, X
No
i
C C+1
X X+1
Yes is
C <= 4?
No
END )
Science Revision
Guide f
Cambridge IGCSE Computer
Trace table
X number OUTPUT
C total
£
r
tip
jriiod
i* n
,
J501 p
* il
<
»' »»
v,
X
\
X
\
s
Chapter
seudocode
Learning Summary
7.1 Pseu
In chapter 6, you learn A/charts can be used to solve problems.
Another method invo <
7
use of pseudocode.
Counting
ramming languages; for example,
Counting is a very common task in many prog 7 It is possible to count
, newcount <r- old count +
count count + 7 which means, in computer terms in any increment
required; for example,
and is simply a count in 1's.
count <- count + 0.5
-
or count 4 count 1-
Totals ( this is counting
example , total 4- total + backwards).
This construct adds a series of values tog - ther; for
total - old total + number .
number which means, in computer term ^ , new 4
Loops ft
There are •
ying out a loop. All the following pieces
co 40 numbers and output their total.
The first loop is a for.. . to loop:
:
W -
S+-
CO
Pseudocode 7
Problem 1
A garage sells cars. The amount of road tax is based on engine size. Engines
over 3 litres in size incur a tax of $ 500, engines over 2 litres in size incur a
tax of $ 300 and engines over 1 litre in size are taxed at the rate of $ 100.
Cars with engines below 1 litre incur no road tax. Write an algorithm, using
pseudocode, to show the tax due on any car sold by the garage.
Solution
input engine
if engine > 3 then 500
else if engine > ax <r- 300
else if engine tax 4- 100
else tax 4-
output tax
Problem 2
.
The heights of 500 stuc . in a school are being measured. Write an
.
algorithm, using pseudocode, which inputs all 500 heights and outputs how
many students were taller than 1.45 metres or shorter than 1.45 metres.
Solution
total 1 <- 0 : total 2 4— 0
for count 4- 1 to 500
input height
if height > 1.45 then total1 4- total 1 + 1
if height < 1.45 then total2 4- total 2 + 1
next count
output total 1, total2
is not required here
Notice that the use of the else part of the if statement ,
in examp e
since the two if statements are not connected, unlike
previous step; i wo
each step was conditional on the result of the
... an repea
...
equally correct to use the while do endwhile
statements in this answer.
Problem 3
Wr | te an algorithm, using pseudocode, which.
inPuts the weight of 1000 items ite
outputs the weight of the heaviest and the lightest
the items i P
outputs the average (mean) weight of all
O
Cambridge IGCSE Computer Science Revision Guide
K
Solution
heaviest 0 : ligh test 100 : tota l < 0 — I
—
for count < 1 to 1000
input weight
if weight > heaviest then heaviest <- weight
/
/
—
else if weight < lightest then lightest < weight
total <- total + weight
next count
average <- total/1000 rtf
output average, heaviest, lightest •
In the first line, it was necessary to set lightest to a value which was unlikely
to be encountered - if it was set at 0, the value lightest = 0 would have
been retained throughout the program since none of the input weights
> *
.*«r
would have been smaller than 0; hence the lightest weight would probably
be missed altogether; in the fourth line, a check is made to see if the new
weight is greater than the existing value stored in heaviest - if the new
• h; r - s this new value; the argument in the fifth
,
7,» beencarr
:
' e cok ing for sma ller valu es bein g input. :
- each e;
Problem 4 ^Wtlieaver
usngpsei
Solution
It is also possible to
sweets <r- 0: mags 0: drinks 0
replace lines 9 to 14 with
input code .. .
if . then . . else statements: ^
while code
* 9999 do if number = 1 then sweets -*
(3t
number <- 0
<- swe ets + 1
repeat
else if = 2 then mags \
code <- code - 1000
if code >= 0 then number
number <- mags + 1 y\
<- number + 1
until code < 0
case number of
1: sweets sweets + 1
—
2: mags < mags + 1
Pseudocode 7
3 : drinks <- drinks + 1 else if number = 3
otherwise print ' error - wrong code' then drinks + 1
endcase else output 'error -
input code wrong code'
endwhile
output sweet s, mags, drinks
the seco nd line the first code is input outsid e the loop to allow the
In
program to deal with all data items - if 9999 is the first data item, then an
messa ge would be produ ced as the progra m tries to process the 9999 is in fact used to
error stop the program and
data - this meth od allows an outer loop to be used to control the inputs
allow output.
and also stops the progra m as soon as 9999 is input; the input code in
the end is used to input the next code which is now inside the while . ..
do ... endw hile loop ; note that a for .. . to loop could not be used since
we do not know how many data items need to be input.
Problem 5
Some students have beer rryii g out 5 experiments; 20 temperature
readings were taken in ea eriment.
.
inside anoth er
Notice that this problem uses nested loops, i.e. one loop
where as
lo P; the outer
° ,
loop (expt) controls the
^
numb er of expe rimen ts
pynprjment -
Pseudocode 7
• outputs the lowest rainfall in a day for ALL resorts over the year.
7.3. 9 Traffic enforcement cameras read the time it takes a vehicle to pass
2 points in the road 500 metres apart . The speed of the vehicle is
calculated using:
30
speed = km/hour
(time taken in minutes)
0
The maximum speed allowed is 100 km/hour. Eight thousand (8000)
vehicles were monitored using these cameras over one day.
Write an algorithm, using pseudocode only, which:
- inputs the time taken (in minutes) for each of the 8000 vehicles
- calculates the speed for each vehicle using the formula above ivtoof
- outputs the speed of each vehicle AND a message if the speed oflo
exceeds 100 km/hour ^
- after all the data is input, outputs how many vehicles in total
exceeded the 100 km/hour speed limit; outputs the percentage of tannoi
all vehicles which exceeded the speed limit %
- after all the data is input, outputs the highest speed calculated. %
.
7.3 10 A sports club charges $ 5 per hour per person
to hire a tennis court. /
If there are 3 or more players, there is a 25 per cent discount on the
total cost per hour. A further 10 per cent
i
discount on the total cost per
hour is given if they book the court for 3
hours or more. So 4 players
booking the court for 4 hours would be charged $80 - $ 20 - $ 8, i.e.
$ 52, 5 players booking the court for 2
hours would be charged $ 50 -
$ 12.50 - $ 0, i.e. $ 37.50.
Write an algorithm, using pseudocode
only, which inputs the
number of players and number of \
hours required and outputs the A
total charge for the hire of
the tennis court.
(Extension to question:
If one of the players is a member of the club, A
the charge per hour drops
to only $ 4. The player and one of the staff
at the club both have
to type in a 4- digit PIN to verify that the player
is a c u member.
The 2 PINs must match if the to receive his \
per hour discount.) playe r is
\
s
Learning Summary
H
deto In this chapter you will learn about:
9 Logic gates
§ Truth tables
In this chapter we will look at how logic gates are used and how truth tables are used
to check if combinations of logic gates ( known as logic circuits or logic networks)
carry out the required functions.
ind ®
I >-
I vehicte
%
abov* A large number of electronic circuits (in computers, control units and so on) Signals can be
espeec are made up of logic gates. These process signals which represent true or represented as ON or
false. OFF, 1or 0 as well.
i total The most common symbols used to repres ent logic gates are show n below.
cent#1 In this book, we will use the MIL symbols . But the reader may also see the
simpler, more general, logic gate representations.
Icula#
; court-
; ontfc
&n
)\ <
When constructing a truth table, the binary values 1 and 0 are used.
Every possible combination, depending on number of inputs, is produced.
Basically, the number of possible combinations of 1s and Os is 2n where n
= number of inputs. For example, 2 inputs have 22 combinations (i.e. 4), 3
inputs have 23 combinations (i.e. 8) and so on. The next section shows how
these truth tables are used.
A
* NOT + X A X
AND gate
A
X
B
1 1 1
Logic gates 8
A A
te OR
* X
B
B
INPUT A INPUT B OUTPUT X
NAND gate
/
A
* A
NAND
B
B
*
INPUT A INPUT B OUTPUT X
The output (X) is true (i.e. 1 or ON) if :
0 0 1
INPUT A AND INPUT B are NOT BOTH TRUE (i.e. 1 or ON) 0 1 1
Truth table for: X = NOT (A AND B) 1 0 1
1 1 0
X
NOR gate
NOR > X
B
gate
A
:
x
B
XOR
*
2
m
Science islon
Revi Guide
Cambridge IGCSE Computer
A AND B
A OR B
A.B
A+B
*
A NAND B A.B
ANORB (A + B)
AXOR B (A . B) + (A . B)
Example 1
Produce a truth table from
k
the following logic
circuit (network).
First part
There are three ilnPuts;
thus we must have 23 (
of 1s and Os. i.e. 8) possible combinations
To find the values (
outputs) at points
truth tables for the P and Q, it is necessary to consider the
NOR gate (output P)
and the AND gate (output Q), i.e.
P = A NOR B
Q = B AND C
\
To show how uns
works, we will split
the logic circuit into
two parts ( shown by
the dotted line ) .
Merits
* boot
We thus get:
Second part
the inputs to
There are eight values from P and Q which form
gate .
INPUT P OUTPUT X
rthe
i.«-
Cambridge IGCSE Computer Science Revision
* truth table for the logic circuit given at 1
us the final
Which now gives
start of the example:
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
Example 2
Consider the following problem.
A system used three switches A, B and C; a combination of switches
determines whether an alarm, X, sounds:
it If switch A or switch B are in the ON position and if switch C is in the OFF
Remembering that
position then a signal to sound an alarm, X is produced.
ON = 1 and OFF = 0;
also remember that It is possible to convert this problem into a logic statement.
we write 0 as NOT 1.
So we get:
/
The first part is two !
The output from the \
The third part is
inputs (A and B) first part and the one input (C) which is
joined by an OR third part are joined put through a NOT
gate by an AND gate gate
So we get the following logic circuit (network):
OR
B
AND X
C
Logic gates 8
\
' This gives the following truth
INPUT B
table :
INPUT C
INPUT A OUTPUT X
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0
1 0 1 0
1 1 0 1
1 1 1 0
Example 3
A manufacturing process is controlled by a built in logic circuit which is
made up of AND, OR and NOT gates only. The process receives a STOP signal
es (i.e. X = 1) depending on certain conditions, shown in the following table.
—
I0T = 1) occurs when:
either Volume, V > 1000 litres and Spee
" , ,,,
Tem( e a u e T
'
T
<= 7 <tn
75 ° C
shom a l
L
m/s
P
,
--
series of logic
X
* statement 1 can now be re-written1 as
V = 1 AND S
Value = )
= NOT 1 since V > 1000 (b n a.
.
,
T = NOT 1 AND
Va ue = 1)
S = 1 since T <= 75
va|ue = 0) and 5 >
T
Statement 2
S NOT OR X
Statement 1
AND
V
Qfc .
0 1
1 0
1 1
8.4.1
A
OR
OR X
AND
B
Science Revision Guide
Cambridge IGCSE Computer
8.4.2
A
OR NOT
OR X
AND
B
8.4 . 3
A
NOR NAND
B
C NOT
8.4 . 4
A
OR f«
B
AND
C X
8.4. 5
A 25
B XOR
OR
t
C
X \
\
23 \
Logic gates 8
8A 6 A
B
NAND
C
Questions 8.4.7 to 8.4.10 require both the logic circuit (network ) and the
truth table to be drawn. The truth table can be derived from the logic
circuit (network), but can also be derived from the original problem. This
could therefore be used as a cross-check that the logic circuit (network) iis a
correct representation of the original problem.
8.4.7 An electronic system will only operate if three switches P, S and T are
correctly set. An output signal (X = 1) will occur if R and S are both in
the ON position or if R is in the OFF position and S and T are both in
the ON position.
Design a logic circuit (network) to represent the above situation and
also draw the truth table.
8.4.8 A traffic light system uses logic gates as part of the control system.
The system is operated when the output D has the value 1 . This
happens when:
either (a) signal A is red
or signa ls B and C are both red
(b) signal A is green and
0 and green - 1 .)
(NOTE: You may assume for this problem that red -
truth table for the
Design a logic circuit (network) and draw the
above system.
8.4.9 A chemical process gives out a warning signal ( W - 1 ) when th
( netw ork ) is use
process operates incorrectly. A logic circuit
whet her W - 1•
monitor the process and to determine
A
L
Computer Science Revision Guide
Cambridge IGCSE
• Free software
• Freewa re
• Sharew are
There are many varieties of software available in the market; without
good software
computer systems would have had far less impact on society
as a whole.
ved
- effect of computers on society
As computers continue to increase in their se in everyday life, ethical
standards in their use will continue to evo v subjec t to more and
more legislation to protect the individual and to pro
^
tect the produ cers of
software and associated data.
rtv The Intern et is fast
•
kev issue here . It is Per eC
, acceptable to quote another person
's
'
'
H a nd
but some form of
these ideas to ,,
ur own opinions and conclusions
be made to indicate ha these
;
There is no need to pay or ask permission to do any of the above since the
software has no copyright restrictions. Free software can be commercial or
non-commercial in nature. But the original
software or modified versions
of it must not contain coding from
software which does not fall into this
category since the perpetrator would
then fall foul of copyright laws !
Freeware
Freeware refers to s ft any ne can download for free from the
,
Internet and then use without
or Skype) The usual
-
CenSe ls an important
modify freeware or view
part of
^tf
copyriahiT ^ ^
9
^
^
° 3 ny feeS for examP e' Adobe
^
3Pply to freeware and the user
Shareware
Shareware gives users the
chance to try out the software free of
before buying it (for example
copyright laws.
, Winzip ) . Clearly it is subject to all the u
However, all the features of the
full version of the so
^
*
\
I12IH Computer ethics 9
%
nuc are not made available and the user has to buy the full version if they
intend to use the software in the future. Usually
the copyright holder needs
l
^
Ofr contacted before copies of the software can be distributed to other
tobe
people -
needs
es as
icetl*
tjal 51
sioftf
31
\<e
Data systems
Learning Summary \
The problems
associated with manual input are of
data entry and the fact the relative slowness
th3 t it 's error - prone.
^ ^ ' 6
little or no huma ime
rventio ' ' 6rr
° r free and USUaMy
'
Data systems id
This technique involves
automatic data
collection using sensors.
Data logging
Barcode readers
Jillltllttl .
Iaser readers or ther types of reader.
°
Applications include automatic stock
control, automatic ovens, etc.
Voice recognition
These can be used in security systems and can allow
disabled people to communicate with a computer, etc.
1
10.2 Validation techniques
Validation is a computer check on data which is being input. It is a check
to see if the data satisfies certain criteria
and is reasonable, i.e. falls with
accepted boundaries. Some of the common
uses are described below.
^
SSWOrd c ntains 6 characters and a 5
or 7 char ter P
^ °
word is entered, then it should
be rejected.
2Q
Data systems 10
xmsesir
Example: a check if somebody’s age
is > 0, i. e. only the lower limit is checked.
adic*
| Presence check
Example: online data collection form when
somebody’s name is a required field; if name is
^-
|I5 V
! 0W
missing the user is alerted to correct error.
Consistency check
Example: if somebody has typed in MR. in the
field then they must type in MALE or M in
TITLE
the GENDER field to be consistent .
39
* Computer Science Revision
Guide
Cambridge IGCSE
— BMIM
Example 1
0 221 - 43256 -?
We will consider the number
-
%Here *?’ is the missing
(i) The position of each digit is first considered.
check digit. digit position
10 9 8 7 6 5 4 3 2 1
0 2 2 1 4 3 2 5 6 ? number
(ii) Each digit in the number is then multiplied by its digit position and the
totals added together:
( ) (1 x 7) + (4 x 6) + (3 x 5 ) + (2 X 4) + ( 5 x 3)
i.e. (0 x 10) + (2 x 9 + 2
) x 8 +
+ (6 x 2)
= 0 + 18 + 16 + 7 + 24 + 15 + 8 + 15 + 12
= 115 (total)
(iii) The total is then divided by 11 (modulo 11) and the remainder, if any, is
subtracted from 11. The answer then gives the check digit .
i . e. 115 / 11 = 10 remainder 5
i.e. 1 1 - 5 = 6 (check digit)
hence, the final number is: 0 - 221 - 43256 - 6
Example 2
This example shows how the check digit is re-calculated. To check the
correctness of the check digit, the computer re-calculates it as follows.
Suppose the following number has been input (using ISBN- 10 method to
calculate check digit):
0 - 444 - 39172 - X
ex °
( X1
|
^
x 9) + (4 x 8) + (4 x 7) ( (7 3) +
X = 10. + 3 x )
) + (9 x 5) + ( 1 x 4 +
*
2 ) 6
*
.
V|
= 0 + 36 + 32 + 28 + 18 45
+ + 4 + 21 + 4 + 1Q
(iii)
= 198 (total)
,, *
^“ ndMd6d b> i he is NO remainder hen the
i.e. 1 9 8 / 1 1 = 18
remainder 0
"
hence, the check digit i
was correct.
i
1)
Data systems 10
ere ar?1
%k Note that check digits can essentially identify three types
of err
er r:
use Of '
been °
digits have inverted:
- example, 23496 instead of 23946
if two
for
- if an incorr ect digit has been input -
for example, 23996 instead of 23946
has been omitte d or an ,„
- if a digit extra ri *
for example, 2396 or 239966 instead of 23946 ^
10.3 Verification techniques • I
2 \ " |l/
-
•
10 i
*V U
Visual check
he As the name suggests, this is a manual system; the original data is
vs
/ . compa red to data typed in by manually readin g it and checki ng agains t the
ydto 0riginal
document.
Parity check
This is a technique used to check whethe data has been corrup ted
following data transmission or copying rom one mediu m to
J ^ is adde d onto th
^
another A group of bits is allocated a
end before transmission takes place. use even par/ty require
an even number of 1 in each group of bits, system
sy s that use o Pa
+ s our group
x 3) assu me
squire an odd number of 1s in eac gr
of bits ( numb ^^
er )
^contain s sev
which we will now refer to as a
binary digits; for example: ^
,eck 1 0 0 1 0 1 1
is
be 0 since there
lfthe system uses even parity then the parity bit needs to
alreadV an even number of 1s.
Revision Guide
Cambridge IGCSE Computer Science
r
for an even
•
parity system , then
i
an error hasi
occurred; if it isn't odd for
odd parity system, then again an error has occurred.
(i) What is the parity bit for the following binary number which uses even
parity:
1 1 1 0 1 1 0
(ii) What is the parity bit for the following binary number which uses odd
parity:
0 0 1 0 1 1 0
If two bits have been changed after transmission, it is possible for this
parity check to fail to find the error. For example, using the above binary
number again, 0 1 0 0 0 1 1 1 is clearly incorrect, but the parity still
shows up as even and the parity check wouldn' t detect an error in this case.
ery often parity blocks are used to help
identify where an error has occurred, .
v
n t |s method, a block of data is sent
and the number of 1s are added
ca ly and horizontally in an attempt
to locate an error at the receiving end.
For example, suppose seven 'SC
binary numbers have just been transmitted and ViJ
an even parity check is
being used by the system. A parity byte is also sent
along with the seven binary
numbers. This parity byte consists entirely of St
additional parity bits found f rom a
vertical parity check on the seven binary
numbers and is usually sent to
indicate the end of the data block. «»
Now suppose the
transmitted data has arrived as follows (each binary
number sent is shown as l
|
row 1 to row 7 together with the parity byte).
parity bit column 2 column 3
column 4
row 1 1 0 1 1
column 5 column 6 column 7 column 8 1
row 2 0 1 1
1 1 0 0
row 3 0 1 0 0
1 0
row 4 0 0 0 1 1
1 0
row 5 1
0 0 1
0 0 0
0
row 6 1 0 1 1
1
row 7 0
1
0
1
0
1
l
0 0
1
0 0 N a
parity byte: o 0 o 0 0 l
1 0 0 1
*
1 1
\
Data systems 10
* <h
I
s It is de ar
(five is) and
fro m
co
the
lum
ab
n 4
ov e
als
da
o
ta tha t row 5 has an
has an incorrect odd
in co rre ct od o pa ritv
parity (three 1 s) The
intersection of row 5 and column 4 gives us the
in co rre ct bit va lue ( 0 in
this case ) . It is the re for e po ss ibl e to change this bit
value to 1 and produce
the co rre ct bin ary numbers. Alternatively, an
error message is sent to
sending computer to request the data to be re-sent the
lis
.
ng end However, if the sum of the other bytes in the block exceeds 255, then the
checksum is found from the remainder of this total value after it has been
ad and divided by 256. For example:
sent
let us assume that the byte total is 1107
of ~ 1107/256 gives the value 4.3242 (which is rounded to nearest whole
linaty
number of 4)
~ 4 x 2 5 6 equals 1024
1107 - 1024 gives 83 which is the checksum value.
Binary Systems
P
®
binary headings will be powers 22 (4), 23 (8),
. °
of 2, i e. 2 (1), 2 (
’2 ),
6) and so num r wo ul d be :
on. A typical 8-digit binary be
Revision Guide
Cambridge IGCSE Computer Science
25 24 23 22 21 2°
27 26
16 8 4 2 1
128 64 32
1 0 1 0
0 1
binary to denary
Conversion of
is equivalent to the denary ( base 10) number 110
.
The above binary number
adding up each of the headings where a binary value of
This was found by
1 appeared, i.e.
64 + 32 + 8 + 4 + 2 = 110
128 64 32 16 8 4 2 1
0 1 0 1 1 1 1 1
'
5
t0 as 8 binar di its (bits Thus a typiCa
9
* > ' l!
fir
0 1 1 1 0 0 0 1
The memory size of
a computer i
increases in multiples of 2 Thus,.
1 kilobyte (kByte)
210 bytes = 1 024 bytes
1 megabyte (
MByte) = 220 bytes
= 1 048 576 bytes
1 gigabyte (
GByte) = 230 bytes = 1 073 741 824 bytes
1 terabyte (
TByte) 240 bytes
= 1 099 511 627 776 bytes
ss
ar» d so on.
confusion exists around these terms since the
Some IEC convention is now
sometimes adopted . Manufacturers of computer storage devices
tend to use
denary values for memory; thus 1 kilobyte means 1 000 bytes
1 megabyte
means 1 000 000 bytes and so on. For this reason, the IEC
convention uses the
following new terms:
But these IEC ter ms are not universally used and would not be used in this
textbook nor are you likely to see them in questions in the foreseeable
Placing |5 r future.
I heunoca:-
’
Within the processor unit there are areas known as registers which have
a number of uses. A register is a group of bits in the computer memory
such as:
1 0 1 1 1 1 0 0
All data must be put into a register before it can be processed - refer to
chapter 12 for more details on how this works.
e division #
The following example shows how registers can be used in a number of
applications.
A car manufacturing company uses robots to spray their new cars with
paint. A special edition model is being made which is only available in
four colours and two paint finishes (metallic and non-metallic).
An 8-bit register is used to determine whether it is alright to paint the car
and to choose the correct paint colour and finish.
red blue
is a car metallic paint
finish? paint
in position?
39
Computer Science Revision Guide
Cambridge IG <
i
register contains:
Thus, if an 8-bit /
t
1 1 0 1 0 0
1 1 I /
0 1 0 0 0 0 0
0 p
(ii) What would be in the 8-bit register if the following conditions
occurred ?
Car is present but not in correct position, spray gun fill level is OK and
non-metallic white paint has been chosen. it
i
*si
Answers
(i) First register - car present, in position but a fault in spray gun fill
level; metallic blue paint chosen.
Second register - no car present (and therefore not in position),
and no paint colour or paint finish selected.
'
%
(ii) Register contains: 1 0 1 0 0 0 1 0
Si
SV ^ '
d so on Th er ef or e
f 16
0 tf ( (256), 1 6 3 (4096
'
3
°, ' ^ 16
yp cal 5 digit
° ( 1)
'
0 .
Conversion of hexadecimal to binary
To convert hexadecimal to binary, it is necessary to first find th» 4 blt blnary
U-
0 ; equivalent to each hexadecimal digit.
So, the hexadecimal number 3 A D in binary becomes:
itions I
8 4 21 8
I
4 2 1
I
8 4 21
Example 1
001 1110
binrt
1110
1 1 1 010
'
r
0001
\
1110
hexaderi
ec mal digits:
|
E 1 7
Sample 2:
sd o o o i o
1 1i 1 1 o |11111
'e S' f \1 1 1 1 0010
0011 1100
^* ,
e aderi
ec mal digits: 3 C F 2
Revision Guide /
Cambridge IGCSE Computer Science
There are a number of areas where the hexadecimal notation is used. For "f!
example:
• memory dumps
• HTML
• MAC addresses
• assembly code/machine code
Memory dumps
,
If there is an error in a
Pro 9 ram or systems software, it is useful to carry
J
out a
mTbis '
memory. The contents of a
S basical|y t le
^ contents of a section of computer
number of memory locations are output in
hexadecimal format. For example:
100FF110 6 F 51 20 4E ;
;
B 1 38 2F 31 0C 0E 20 A1
2F 32 1 F 23 20 15 3F 66
100FF117 20 36 41
51 EE E 1 3F 4F 3 E 20 A 6
54 61 23 20 18 6D 68 65 64
\
J00FF129 _ !llZj0 60_60 60 60 15
!L
^
The software engineer
can now look at the
15 1 F 20 20 20 20 20 20 20 20 20 20 ly
1
where the error lies memory dump and find out
and quicker to
. 09 hexadecimal va|
ues makes much easier
>1
carry ; this task
out
HTML (hype rtext mark up lang uage )
,;
>.
i
Hypertext markup language (HTML ) is used to write content on
mark up langu age and web paqe s;
it is a not a programming
language. HTML makes
use of <tags> , there must be a beginning tag and
an ending tag to make
Hr; the code display correctly. For example,
Pie
<0L> starts an organised list
<(/0L)> ends an organised list
HTML code makes use of hexadecimal when representing colours
on the
screen. For example;
# FF 00 00 represents the primary colour red
# 00 FF 00 represents the primary colour green
# 00 00 FF represents the primary colour blue.
Combinations of the above can be used to represent other colours
, for
example, # FF FF 00 represents yellow (red and green). It is
possible to vary
the hex values to create any colour the user wants. For example
:
# 41 69 E1 represents royal blue
# 00 7 F 00 represents lime green
# CC CC CC represents light grey .... and so on.
MAC (media access control) addresses
16 bits
A media access control (MAC) address is a unique number associated with network
;e the
interface cards which identify a particular machine or device. This allows all devices
to uniquely identify themselves on a computer network, for example, the Internet.
i sec/ . This address usually consists of 48 bits which are usually represented as
12 hexadecimal digits in the form:
MM - MM - MM - SS - SS - SS or MM:MM:MM:SS:SS:SS
where the first six hex digits represent the identification
,
manufacture of the device and the second six hex drg ts rep
serial number of the device.
. the
,
F 0<i
° "" 'P e;
W - A0 - C9 25 F4 3D represents a device manufactured by Intel with a
jrry
- - -
0P
** serial number of 25F43D.
n
Assembly language and machine code
Ue ( than:
ADD 1010 0111 1111 0100
Science Revision Guide
Cambridge IGCSE Computer
.
- Gender (i e. M or F)
8 4 2 1
hex B:
hex E 6:
1 0 1 1 0 1 1 0 1 1 1 1
onttj
10.6.6 A burglar alarm system uses an 8 -bit register. The first four bits %HINT: split the register
fHcreerS ! indicate if a sensor has picked up an intruder (shown by a 1 value)
up into four 3-bit
? manca;:- and the second four bits indicate the zone where the sensor has registers and then into
picked up the intruder. three 4-bit registers
boveofe 8 4 2 1 before converting into
hexadecimal.
lerate cries
f booh zones >
*
window door
sensor sensor
*
igitpos j
jied
indicates the following: door sensor and
detected an intruder
(a) What is indicated by the following two
in zone
registers .
10 (8 + 2 ).
^^
0 1 0 1 0 1 1 1
0 o 1 1 0 0
1 0
broken (picked
(b) What would be the binary pattern for a window
heat sensor detecting an
up by window sensor ) and infra red
intruder both in zone 15 ?
n
F
l
Cambridge IGCSE Computer Science Revision Guide i
1
8 4 2 1
can be
represented
0 0 0 1 1st dig : Y' A
Am
as:
0 0 1 o 2 nd dig
st
1 digit
_ nd
2
..
digit
rd
3 digit
1 0 0 1 3 rd dig /
(a) What values must be in the 4-bit registers to represent the
following speed shown on the speedometer ?
*
1stdigit
2 nd digit
*
st
1 digit 2 nddigit rd 3 rd digit
n s i
3 digit
11 0
(b) What is shown on the digital spee
dometer if the 4-bit registers
contain the following values:
0 0 1 0 1 st digit
0 1 0 1 2nd digit
1 0 0 0 3 rd digit
\
Data systems 10
(a) What process control is being shown
here:
4 8 4 2 1
0 0 1 0 1
(register A) (register B )
64 32 16 8 4 2 1
1 0 1 1 0 1 1 1
0 0 1 0 1 0 0 1
receiving computer )
(even parity is used by the sending and
Revision Guide
Cambridge IGCSE Computer Science
A
1
l
cuter
'
%
Vjar
^ 0!
Mi
^
In this chapter you will learn about:
# Features of laptop and desktop computers
ero a
*^ $ Household appliances
Laptop
k
/1
I
Revision Guide
Cambridge IGCSE Computer Science
Disadvantages
• They tend to be more expensive to purchase than desktop computers.
• Due to their portability, they are easier to steal.
• They tend to have a lower specification than the equivalent desktop
computer (i.e. memory size and processor power).
• Greater security risks if sensitive data is stored on the hard drive.
L
Hardware 11
Functions include:
•shutter speed
(sharpness of image )
•lens focussing
. aperture.
control of flash ( automatically set off flask, etc.)
also
prolong Aperture refers to
y their amount of light
the
entering camera .
iwever,
mters.
ktop
include: stations
Functions television
if tuning into quality
automatic signals to be decoded better sound and picture
,ny •
. allows digital
signals leading to
example, games machines)
Output devices
Printers
The most common type of printers are the dot matrix, inkjet and laser.
Disadvantages
V
They are relatively expensive to purchase 'A
in the first place.
They tend to be very noisy in operation .
Printing is slow and usually of a very poor
and inkjet.
Although they do work in colour (usually a
quality compared to laser
s
inkjet printer
Inkjet printe rs are made up of:
s
s . a print head which consists of nozzles used to spray droplets
of ink
. an ink cartridge which contains special ink; this can be either one
cartridge containing all the ink colours including
black of a number of
separate cartridges for each ink colour and black
,rs - a stepper motor and belt which moves the print head assembly back
'
*00fo and forth across the page
, , .*
Z“
Ch eedS !i 9 e sheeB of
•
" w N»
whidiaK
ystems. So what happens when the user selects OK to print ? The following
flow
diagram shows the stages in the printing process.
i
The printer driver also checks whether or not the printer is online or available
to print
I
iter while the printing process is being carried out, the computer can get
other tasks (printing is a relatively slow process)
-
I
“ ^
1
sSjtoSow 2ePnSeStobe printed This process continues
be data stored the buffer printed
* in is
w
See chapter 12 to
signal to the compute r
Pr nter buffer is empty, it sends an interrupt find out how these
° ‘ cfata to be sent. This process continues until the whole of the
requesi| rnore interrupts work.
do
* "? has been printed
* J
Cambridge IGCSE Computer Science Revision Guide
Advantages
Disadvantages
JBV.
• Ink cartridges do not last very long - which makes the printer
% unsuitable for any long print runs.
The increased cost • Printing can ’smudge’ if touched too early or the wrong paper type is used.
is mainly due to ink
cartridges.
• Relatively expensive to run.
Laser printers
' Tn r TtiVe * °
wTtK
ink)
areas
T °
the H
C atS
15
dmm
'
P SitiVe|y char 9 ed toner (powdered
°
nly StkkS t0 the natively charged
LTroTol aTheet
char9e
’
discharged). The drum
given a
^
ne9afce
«
' baskall» a »f hea ,ed
toilers. The heated roHersnteh th
, ” “
,
the paper. A discharge lamp then
making I ready for the e« page „ em
^ ^ ^“
1 Hardware 11
N have a number of advantages and disadvantages.
, |
inters
% Advantages
'Pses,i
V:
.. They have very
output and
low noise
well
levels
suited to
.
high volume printing.
P
% .. Fast
Toner cartridges last a long time.
Print quality is extremely good .
Disadvantages
%Laser printers are
'epaje^- .
rate. T . Maintenance and running costs can be expensive (for example colour
toner cartridges and replacement of diffuser packs are expensive). Printing
more cost effective
'9 j when compared to
- . can ' smudge '
if touched too early or the wrong paper type is used.
They produce ozone and volatile organic matter which can be harmful
inkjet printers.
phs.
3D inkjet printers ( stereolithography printers ) %It is based on the
~hese printers are primarily used in CAD applications and actually produce tomography principle
3D solid objects. The technology uses a modif ied inkjet printer and the object which involves
. material used breaking down any
is built up layer by layer until the solid object is produced The
object into a series of
in the printer to make the thin layers can be plaster , resin, concrete , plastics ,
thin layers.
laser printers rather than inkjet
is use: metai, etc. Some new developments are using
printers; but the principle behind the technology is the same in both cases
:
&
S3
- Solid bone structure
printer as part of
produced
medical
on
research
a - D
*
jet
et
n
0
*tl 1 o scan. The computer mod
a
*
# » o '-trica
thin dices;this data is
^ g 30 tnfcJe P ,
the TnV- s polymer which
Wens' cium phosphate «« d of paPef
bone strU
by printing
d Recessive
on contact. The pr«
£
° .
\ayers on top
here andin other ed app icat
\* '
(lds up
other;
' .-
tlU much
^producesearch to be
eth .
*Carnatic ^
^
teries, etc.), but this is a ve nterestin9 e
x \d C
3D printers
3 D printers are used in any application where a working prototype/
model needs to be made. They are being used increasingly in a number of
applications where other methods are very expensive or even impossible.
Examples include:
L
Hardware 11
v The first layer is security paper (
can't b
ho Seen
throu h)
,
The second layer is carbon ftr, 9
“
^ ^^
when i receives an
The third layer is the blank Paper
which is printed on
during the process
pli
The fourth layer is again security ,
pane
%. printer impacts on one of the security iayers to prX the printjng
I* !' ' °" “ ,
pap s a mlnuous » hat the wage/salary slips
KOduced hundreds a a time and ' ,„ ' .
then each one is to off t
are
tyw
( perforations to produce a secure wage/salary slip
ntj
%r The image on the right shows a typical security layer on a wage/
toposife salary slip; the dot matrix printer prints through this onto a
sheet
of paper inside; because of the pattern on the security sheet it is
impossible to read what is printed inside .
Way,
?r methx Inkjet printers
Mogrerc Inkjet printers are generally used where one - off high quality
image printing needs to be done - for example, production of a document
ere an with colour images and text.
) lastice
They are also excellent at producing photographs because of the nature of
the printing used and can therefore be used on glossy paper.
nger
able
Laser printers
fuced
jucec; '
1
,
Laser printers are used where h gh speed pnnt ng ,
,
ho ding
vreV
Monitors
Cathode ray tube (CRT ) monitors
' ded
^ ese ypes of monitors are being phased out, not only due to their bulk
and .
^ is very high. They
^ kUt a so because their power consumption
so' *
also
|en
*
er as they get older giving rise to headaches
'
if used for any
advantages :
f time . In spite of all this
, they do have two main
\ e
° ,« equivalent TFT monitor
% This difference is
the
^^
8 e ua ty is probably still better than
- a ie rr| ^
oment, only CRTs can be used with light pens (due to the high diminishing as the
TFT technology
every 85 times a second , so many
6
electron beam and screen refresh improves.
des 9n offlces still use CRT monitors for this reason.
*
Cambridge IGCSE Computer Science Revision Guide
TFT monitor *
% These monitors use thin-film transistor technology. The screen is made up of
Some newer versions
thousands of tiny pixels; each pixel has three transistors coloured red, green an
now use 4-colour <
blue and the intensity of each determines the colour seen by the human eye
transistors with a . J
yellow one added to TFT monitors have a number of advantages when compared to CRT
monitors.
further improve the
colour definition.
Advantages
- They are very light weight.
- They consume very little power and also have less screen gla
Iff re.
TFT screen can - They increase the flexibility of the computer system.
now be fitted into a - The only problem is the viewing angle which needs
to be considered
desktop and used when using a TFT screen to display some
in the same way you information; a CRT screen
may be the best option in certain applicatio
would read a book or ns.
document.
Many liquid crystal display (LCD )
monitors now also incorporate light emitting
diode (LED) technology. Such monitors
consist of a front layer of LCD (liquid
«
ch al diode/display) that makes up the imag
e from a number of pixels .
rnnt t ten u * ^ using LEDs wElicEl give it bette
r brightness and
flu ore srp IS 7* advanta9es over the older CCFC (
uorescent lamp) technology
used to back -lit LCD
co ld ca th
monitors in the past:
ode
2D and 3D cutters
A three-dimensional (3 D) laser cut is similar to a two-
dimensional (2D) cut
except it is able to recognise the object in an x-y-
z direction rather than in
just an x-y direction. The materials which can be cut
using 3D laser cutters
de up of include glass, crystal, metals, polymers and wood. Th
is enables much more
i green art complex shapes to be cut.
nan eye 3D cutters can go beyond the surface of the material
being shaped and
nontoi actually cut at the centre of the material.
Loud speakers
Essentially how sound is produced from a computer can be represented by
a fairly simple diagrammatic representation.
red
ien computer
* DAC
* amplifier
^ loudspeaker
^
jiittM
analogue voltage using a digital to analogue c nverter (QAC). This voltage
(liquid is then amplified and
then fed to a loud spea e voltage changes make
pixek a cone ins
ide the loud speaker vibrate producing
sand
This includes output devices such as loud speakers or head pho
IK
*
past-
it ® Light projectors
There are two used to project multimedia
^
common types of ght
onto a large
screen or whiteboard.'‘
. mon types are:
' Digital light projectors (DLPs), and
* Liquid crystal dis
play (LCD) projectors.
Digital light
projectors (DLPs)
Millions of tiny micro mirrors on a sen .
( gM projector (DLP )
^
are key to
the functioning of DLP te ^y^.
in the DLP chip determines
The number and arrangement of micro
. These
mirrors
micro mirrors can either tilt /
the resolution of the digital image
. . ) or away from the light source (i . e. OFF )
towards the light source i (
pixel
e ON
on the projection surface . Each of the micro
/
creating a light or dark
switch on or off several thousand times a second ; for example ,
mirrors can
switches ON more frequently than OFF, it produces a
if the micro mirror
micro mirrors can produce pixels in 1024 grey &
light grey pixel . Typically the
the video signal entering the DLP chip a greyscale image . A
shades giving
%It is suggested that A white light source in the projector passes through a colour filter on its path
to the DLP chip. This white light is split into the three primary colours : red,
the reader finds $
/
about the older green and blue, from which a DLP projector can create well over 16 million
LCD projectors and different colours. The ON and OFF states of each of the DLP micro mirrors
compares their are then linked with the colours of the colour filter producing the coloured
performance to these
image. This concept is similar to black and white photography where grey
DLP projectors.
scales on the photograph represent real life colours.
s 1
DLP technology is effectively reversing this concept and interpreting the
generated shades of grey as actual colours.
*
3619
LCD projectors
These are an older type of projector than the DLP variety. They are based SiQO
on a high intensity beam of white light passing through an LCD display.
m
The light beam is sent to mirrors coated in a light sensitive material;
when light is reflected back from the mirrors, its wavelength is changed
( corresponding to red, green and blue light). The reflected light passes
through three LCD screens (the image on the LCD screens is in the form of
millions of pixels representing the image as a grey scale). When each of the
three coloured beams of light pass through the LCD screens, they produce
S
the grey scale image in red, green and blue format.
Combining these
coloured images produces the full colour image which
is then projected \
V
onto the large screen or whiteboard. v%
\
Input devices
The most common examples of input
devices include:
- keyboards/keypads
pointing devices ( for example, Si
- touch screens.
^
^°
ad information about
'
5t Ck C ntro 1
convert hard o docu ients into an electronic
form; OCR software allows
"
the scanned text to be manipulated.
° ° '
\
23 \
IIV
1 Hardware 11
N
«lt OMR can read pencil /pen marks in a pre-dete
script; used in questionnaires, multiple choicermmed °
*
P sition on a
Papers and s on.
% - MICR (Magnetic
* in magnetic ink.
Ink Character Recognition! IS used to
read text °
printed
^°!?°
965 and d wnload
^ 3
them directly to the computer; digital earner °
memori«
and can also save the images. However webcamS n0t S3 Ve the
*9e ,
images and they are transmitted directlv tn th6 C mputer and
tend to
red,
ilfcn
ors
'
- be used in online chatting or in video confer
Microphones are used to capture sound/vokes "
presentations, online chatting, allowingy disahleH
into a computer.
^
9 '
•
V ice 0vers in
°
D ed users to input data
' ured
rey Touch screens
Touch screens are similar to normal monitors but in this case allow
the selections (and other features) to be made by touching the screen rather
than using a pointing device, such as a mouse.
%Also see notes in
chapter 2 regarding
When the screen is touched, sensitive layers on the screen convert mobile phone touch
the 'touch' into an electrical signal . Sensors can identify a touch has screens.
ed been made and a microprocessor is used to determine the position
on the screen where the touch was made. They are commonly used in
Information Centres.
Information centres
of Airports, bus stations, railway stations, supermarkets and any application
the
where information needs to be relayed to cus on a regular basis, all
:e gain benefit
^ kiosks /desks
nformation
.^
from having automatic (unmann | ,
j ^
|
^
they require it without having to interface w human operators,
Output is normally on a large screen, byt a of input
° ^ ^wing:
^^
can vary, they are ^
usually at least one o
- touch screens with menu options
- mouse/trackerball to select options from screen
~ limited options keyboard/concept key
‘ Tight pens when CRT screens are used. ^
the number of options
3' . Normal keyboards are not offered since keying
want customers
limited and the organisation does not the system .
n other information or attempting to ‘ hack ’ into
|*
Cambridge IGCSE Computer Science Revision Guide
Using these automatic inf or m at ion kio sk s/ de sk s loc ated around an airport
,
bus, train sta tion or su pe rm ar ke t wo uld ha ve the following advantages
to
the customers and the company.
Advantages
The system can be linked into websites .
The information is usually more up to date and accurate.
There are no language problems as language options can be given
on screen and the customer selects the most appropriate one; man-
%These are a very operated desks would have limited language capability.
useful option at Customers do not have to wait in queues.
airports, bus or railway Companies can advertise special offers, special services, immediate
stations where it problems and so on.
is possible to have
Lower overall costs to companies as fewer staff needed.
‘live’ arrivals and
departures boards. The kiosks/ desks are open 24/ 7 since they are unmanned.
Scanners
Scanners are used to input hard copy information into an
electronic format
which can be understood by a computer. When the docu
ment is placed on
the glass plate in the scanner, a light is used to
illuminate the document.
A scan head then moves across the document
and '
reads' the information
converting it into a form understood by the
computer. If the computer
is equipped with optical character recognition (
OCR ) software, then text
on the paper can be converted into
a text file format . This can then be
edited by importing the text file into
software such as a word processor.
Photographs and other images are often
converted into a file format such
as jpeg ( see later ) .
88
Hardware 11
s
a9es a laser beam is projected onto an object
tc and the reflected
light is captured by a sensor at a known
distance from the
Laser
trian£ulation * laser light source; this reflected light gives 3
of the object.
D measurements
ate
' Ormat Sometimes white light scanning is used instead of laser lights. In this case,
ed on a known pattern of white light is projected onto an object and sensors
ent. detect the reflected light allowing an image to be built up. Exa P eS
ition include: photogrammetry (used to digitize large objects sue as ui , , °
and CT (computed tomography )/MRI (magnetic resonance agm9 )
?r
ext
break down an object into 'slices' (used in hospitals to scan human '
and whole body scans) so each slice can be analysed if req
e
or. Use of scanners at airports
such Passport scanners are now used at airports to scan data from passports. It
Uses Q teChn 0l ,
9y to Prov de high quality digital images of the scanned
°
docum6nt n a f rrriat that can be unders ood by a computer. The data is
UsuaU ' °
red ln a database which allows easy searching and manipulation
,
ofthe ata ‘ astern will automatically:
ing
dentify a scanned document
* ‘ cate the required
0
text and ima9eS
“ tarry
) out any required error detection
~ tore the for storage of
text (common standard
c ^ ^ f rmat
°
^_
racterS f und on any computer keyboard; each
bin attern, °
character
represented as: 0100
has
0110
unique
(46 hex)).
for example, letter 'F' is
barcode readers
Barc des are rallel lines ot
x
°
SrV n9
|
made up of a series of black
anccode for the numbers
thickness. Each series of lines represe
/
Cambridge IGCSE Computer Science Revision Guide
nm
The following shows one of these
number: 2 number: 5
i
numbers: 5
mii 11 ii 7 o
The following sequence shows how a typical barcode is read:
3
- a barcode reader shines an LED or red laser light onto the barcode to be
scanned
- the light is reflected back off the barcode; the white lines reflecting
more light
- the reflected light is detected by photoelectric cells (sensors)
- as the light is scanned over the barcode, it generates a pattern which can
be interpreted by the computer:
for example, number 5 gives us: W B B W WW B (W = white, B = black)
or: 0 1 1 0 0 0 1 (binary equivalent)
- these binary codes can then be used by the
computer for stock control,
searching for items in stock, locating prices of items, identification of an
item and so on.
1 Hardware 11
\\r
; this tak es the user to a website or sirrmlv H - ays
phone P text or contact
I
on the phone. For example OR A
information
,6-dig it cod e (019 4 325 6 711
^ 238 8), which could ST*" ^ represen a
*
C de for a holiday
,
offer and onc e sca nne d, the use r will be sen t t tu u °
h llday website or
s contact det ails /brie f des crip tion of the hni °
iw
lona °
ay will appear on the screen.
Advantages
There is no need to physically write down details, By simply
scanning
the QR code , the desired information is captured automatically by
the mobile phone or other device.
QR codes can be used to store addresses and URLs that can appear
in magazines, on signs, buses , business cards or just about any
3
product that users might need information about .
? ad:
Disadvantages
he barcode J Users must be equipped with a camera phone and the correct reader
es reflectir; application that can scan the image of the QR code. Currently only
smartphones are technically capable of doing this.
;ors)
attemwfe: Microphones
Microphones are used to pick up sound directly and input this data into a %Microphones are
Me, computer. Inside the microphone, a diaphragm vibrates according to t e
usually either built-in or
nature of the sound detected (volume, pitch, frequency an so o
j equivM J connected externally
,,
produces an electric signal. This signal goes to a sound card which converts via a USB port.
--
tockcontfl the sign to a digital term
ficationd
lad X rs"
^ na llT det ect ed hy the phone.
~”^
mu nic ate with com pute r if
ridatthe can be used to help people com
inner
W
^ theycannot operate devices such as hoards
software is used to understand human spo ^ e " s
1 the key boa rd
wo rds on a
^
,
by
mu
thu
stro
sua
s
ng
l'
pro duc
acc
wa
ing
ents
ve pat
the
;nrrpasjnqly sophisticated
or
tern s,
dialects which 'confuse' the software by pro ucl
Keyboard
devjce use d on com put ers and
Keyboards are probably the most common
arcj can be either a physical
other equipment such as mobile phones. T e
jt can be a virtual device
device connected via a USB port or by wire e
such as those used on many mobile phones.
^ ^ case, a keyboard
latter
ent|y touching the letter on
dPPears on a touch screen and the user type
e the screen.
*&
0
I
Cambridge IGCSE Computer Science Revision Guide
Mouse
The mouse is an example of a pointing device and is usually used with a GUI
(graphical user interface) where items are selected and one of the mouse
buttons 'clicked' to indicate what action the computer needs to take next.
Applications of the mouse are mentioned throughout this textbook and are
similar to touch screens in the way that information is conveyed to a computer. 1
As with keyboards, the mouse can either be connected directly via the USB
port or wirelessly (WiFi).
Interactive whiteboards
a?
Interactive whiteboards are devices where users can actually write on the
board and their text or drawings are automatically saved in an electronic
form for later use. This is very useful at a meeting, for example, where a
number of people may be involved in a discussion on some new product,
for example.
\
\
\
\
c N
1 I
i Hardware 11
X
bZS
*\
: y
[ following graph showing performance of a restaurant indicates
V ' The
& » use
)u
typical ^ e of interactive whiteboards:
es a
I 04 i
103 -
102 - graph needs
to
S ! 101- some titles
St%N
Expansion and axis
C.
100 - 1 . Contraction
* 991
all these annotations
will be saved for later
use so none of the
981
Ni information from the
meeting is lost
971
r
jine 30
; projected Primary storage
sthegm
t. Or the
* ROM RAM
. used"
Offline storage
Secondary storage
DVD CD Blu- ray disc
Hard diskdrive (HDD)
USB flash Removable
Solid state drive ( SSD ) memory hard drive
Primary storage
Random access memory ( RAM )
nd m access memory (RAM ) has the following characteristics:
° of the memory are lost on
. the contents
^ eV are volatile memories
rn n
(i.e
computer )
the power to the being
~ |ey* store
tp ^ data, files, device drives and operating system currently
rary function
th^
temP
S8 contents can be
" * °
ese memories can be written to and read from; the
. Chan9edbythe user.
Cambridge IGCSE Computer Science Revision Guide
Buffers are usually composed of RAM chips. Printer buffers, CD / DVD read/
write buffers and keyboard buffers all store data temporarily until the
device is able to process the data (also refer to section 11.3). These buffers
stop slower peripheral devices holding up computer operations (they
compensate for the different operational speeds between the processor
Task: find out how and devices such as a printer ). This allows the processor to perform other
double buffering works tasks whilst, for example, printing out a document. Obviously, the larger
and what are its the buffer, the less often it has to be serviced by the processor speeding up
advantages.
operations even further.
Si
- they are non - volatile memories (i.e. permanent since the contents are
not lost when the power is turned off to the computer)
- the contents can be read only; it cannot be modified *
- the ROM often holds the instructions for starting up the computer
(for example, the BIOS - basic input/output system ) .
The access rate for ROM is less than the access rate for RAM; but RAM size is
usually larger in the majority of computers. Another type of memory often
<
described as primary memory is DVD-RAM. II
DVD-RAM
'{
DVD - RAM uses a different format to CD and DVD systems. They have the
following features:
- they store data in concentric tracks (see \
^
USe W Ch allows a
user pause a tv programme being transmitted
and
anri th '
then catch up later without
missing any of the tv programme.
Q
\
Hardware 11
V
ibJS Secondary storage
yaily Ha rd dis k driv e
s
% :
(Fixed
Ha rd
)
M size B
Offline storage
y often CD and DVD disks
These storage media are essentially different to hard disk s and flopp y disk s in
t
Tha they use the properties of light to read from/ write data on a disk surf ace
(known as dye is use d as
optical media ) . A thin layer of metal alloy or organ ic
The recording media . CDs and DVDs have only one spiral trac k ( see draw ing on
the
in pits ( spir al groo ves
the right). The data is stored .
of the disk to the edg e
that run from the cent re
A red laser read s the othe r side of the pits , know n %Due to dual-layering
, to allow the data to be read . The
as the bumps
DVD ( i.e . CD -R and DVD -R ) technology, the data
letter 'R' after the
be
CD or
read onl » onc e the d ,
sk has Ibee n
capacity of a DVD is
much greater than
means data tan DVD -RW
- RW and a CD.
W O - e - CD
/ finalised The
mean data can be
lette rs
writ ten to and read from the disk .
,
fi -ray
id “ discs
wnt e data ,
£ lk normal light to rea d/
* DVDs, which use a red laser wav elen g h
/scs use a blue laser . This has a much shorter
*d
3
X
(40S
nan om etre s) . The sma ller light
"anometres) than a red laser (650
89
Cambridge IGCSE Computer Science Revision Guide t,
%
x
V:
%
Pen drive
*
—
v^ 1
,
TZZu T ” T f Pe d ivei and U 5B fl h drives)
" “ » lid
oortaWeT,
,
tate technology (see earlier). They
usually cornea through the USB port
h ir POWer'
,,
V
' «icks are usually small,
ooem
most operating ”, "°' reqUire n ddi l al
>
systems usually automatically * software
“" to run since
recognise them as the E - drive,
$
\
89 V,
V
Hardware 11
\ ve nd so on . They are often used by users as a form of back up for
^
Hits -. "I dr
'
'
f‘
fj|es jn case of any problems with the fixed hard drive system.
tof;
% N V| e pe nsive software packages store security files on memory sticks
^C supn|y with the software. These are known as dongles and
% ** '
* h resent when the software is run. This prevents companies and
"" ^'
dualsfrom using the software for unauthorised use.
disk drives
-T“
Removab / e hard
IT ** *° < yes,
'
aunkjjt
ent
the computer fhroogh
, the USB
o increase every year where 3 or 4 Tbytes is now a common d2
Data storage
^
H' optics •
Here we will consider MIDI (Musical Instrument Digital Interface)
) fii
intertace files, jpeg
files, MP3 and MP4 files.
( distance
Musical instrument digital interface ( MIDI )
:h track]
The concept of MIDI is often confused . A MIDI file is NOT music and does
not contain any sounds nor is it a music file like MP 3 . MIDI is actually
nothing more than data that contains a list of messages that tell a device
mobile phone )
(such as a musical instrument, computer sound card or a
of these messages are .
howto generate a sound or music. Some examples
%There are clearly
- 'note on' signals that a key has been pressed or a note fr
many more messages
instrument (such as a guitar) has been playe and these just give a
- 'note off' signals that a key has been release
- 'key pressure' signals how hard a key has ee
. sample of those used.
saves the
When music is recorded on a computer using ^ ^ ^
Messages as a .mid file . When the file is P > aVe
electronic keyboard instrument, the keyboar
. Any
^ on, for
electronic
example , an
fo||0ws the . mid
lle instruction to faithfully play back the n
Mstrument can be hooked the
^^ notes
computer to play ac
up to
• ctual music
ad
*** . «
of using mid es is that
or sounds, so their file size is much MP3 « ««
of aUdio require
^ mple, using MP3
format to store one
« the same one minute of audio u ,
format on y re
.
^
9
^ Kbyte file size. This makes MIDI ea
0 " mg tones for
je
‘
"PS (MPEG-3)
,
Mf EG-3 (
flles/MP3 play«r*
MP3) uses audio compress ® tecWolo9V to «
"""“trtot
rt n
° MP3 format; normal music » e
01
' ^^ are compr ,a
exarnple
nce about 10 whilst retaining m
°
^Mbyte music file is compressed
s the mus>c ^
a64
* Cambridge IGCSE Computer Science
Revision Guide
It is a very complex process which goes way beyond the scope of this book.
Putting it in simple terms, it relies on the human eye being unable to
distinguish colours of similar brightness or similar hues. A typical RGB (red,
green, blue) bit map image is converted to a YCbCr image (where Y =
brightness of the pixel, Cb/Cr = chroma, which are the blue and red differences,
respectively); these images are considerably smaller in size than the original.
%
Refer to jpeg system
described earlier, for
Lolsy co%?ZioTaTgodthmSs e2n«? t0
' ° SSleSS
^ COmpreSSi n '
° .
example.
It becomes impossible to get
hi bac
^ o the 0
.
algorithm
“XnSdinnd aH klf
,
s^
0 00 0r
in a file and eliminates
te
» rr , ,
he Ne
Hardware 11
Photo at 11.5.3 A manufacturing company has decided to buy new input and output
Berthe devices to allow it to carry out its day-to -day operations. The company
Polity of, fc manufactures parts which require welding, grinding and painting.
eredunfe There is also considerable office space where finance, management,
research, design and customer relations/sales takes place.
(a) Discuss the relative advantages and disadvantages of using dot
s and other matrix, inkjet and laser printers in the company. Part of your
of human discussion should include where each printer type would be
most suitable.
(b) What input devices could be used in the company for :
lis book.
to (i) Administration work
3BM (ii) Design and research work
t~
(b) Why have CDs and DVDs taken over from floppy disks as the
main secondary (memory ) storage media on home computer
systems ? 4
11.5.6 A railway station management team has decided to introduce
information kiosks to keep passengers up to date regarding train
arrivals/departures and time tables. These kiosks will be unmanned
and each kiosk will have six large TFT monitors.
(a ) What input devices could be used at these information kiosks ?
(b) What advantages do these kiosks give customers compared to
manned information desks ?
(c) What advantages does the system give to the management team?
(d) Apart from arrivals/departures and time tables, what other
information could be made available to passengers at the
railway station ?
.
11.5 7 (a ) Describe how LED technology is used in LCD flat screen UH
monitors. What are the main benefits of using LED technology
in this application ?
(b) (i) Name the two types of technology used to 'spray' ink onto
paper using inkjet printers.
(ii) Give one difference of each type of technology.
2P
\
9 mit
Hardware 11
\Z\
H 5 9 (a) How are scanners used at airports to read passp
orts ?
d/ inko®
primary memory which holds data
ROM currently in use; data is lost when
power to the computer is turned off
5edty
makes use of NAND flash memories
which involve millions of transistors
Blu-ray wired in series on a single circuit
Itis board
,pe^ '
primary memory used to hold the
pixed hard BIOS; a permanent memory which
disk retains its contents even when the
power is turned off to the computer
Operating systems t
mm ’/
Learning Summary
0 Data transmission
Many of the tasks carried out by computers are taken for granted. This is often down
to a good operating system which automatically carries out many of the mundane
tasks such as interrupt handling, user interface and so on. There are also specialist
areas such as batch processing, real time processing and network systems.
Computer architecture is an important part in the understanding of how computers
work, together with the knowledge of how data is transmitted to and from a computer.
The operating system (OS ) manages the basic tasks carried out by
a computer, such as input from a keyboard, output to a printer, file
management, security and device drivers. It provides a software platform
:
which enables applications programs to run. On many computers, when
it is powered up, the first program that runs is stored on a ROM chip.
This program checks system hardware to make sure everything
normally. The next thing to check is the CPU, the internal
functions
memory and basic
/
' JMOT
\ <or*
input -output system (bios) for errors. If all proves to be
acceptable, the bios
activates the memory drives. When the hard drive
is activated, the operating
system is found and is loaded. - •
V
Input / output
control Multitasking
Security ( logon,
passwords, etc ) . Batch processing
( JCL )
Handling of
interrupts Multiprogramming
J
3
Spooling Error reporting/error
handling
Memory
Loading/ running
management
software
o
An interrupt is a signal sent from a device or from a running program to
the processor; this causes the processor to stop what it is doing and service
this interrupt signal. Interrupts can be caused by, for example:
e
•
the printer needs more data to be sent to it
*
errors, for example, printer has run out of pap paper is jammed
atfbrm
when
•
user interrupt, for example, user presses the <BREAK> key
*
.*
pe<
'" lermpK allow computers to bl '
whilst listening to some music ””from pute rllb, mD :|6 printing a documen t
^^
a
, „
the state o the current a heinq run 1S savecb . g
process or
state
goes
of
*° an interrupt
the interrupted
hand/er and one
resunne s
fully
from
the
1
the processor carries on with other tasks ....
I
.... from the printer, requesting more data to be sent
%It is suggested the current task is suspended whilst the interrupt is serviced
that
the reader carries
out some research to
find out how interrupt
priorities work.
I
the buffer is refilled and the above sequence repeate
d until
all the data has been sent to the printer
.3 Batch processing MB
*
%Usually In batch processing , a
the work is number of tasks called jobs are all tog ether
done when computer over a given period of time. col lec ted
resources are less system (this is called ' h ^
ese j s are then l aded into a computer
°^ °
busy ( during the
night).
b e s i n i' Ba ch ,
is required since file updating,
•or example, may not
be completed for severa
l hours (or days) later. Batch
processing is often used in
the following application areas:
- billing systems (gas,
electricity, telephone, water, etc.)
- payroll systems
- processing of bank
cheques.
Batch processing, for
example; electricity bills
i
u Operating systems 12
START
^^ j ectricity readings
wall customers NOTE
It is assumed here that any
save data
to Transaction
customer on the transaction
File (TF) file is also on the master
file. It is also assumed that
sort data into customer the master file is updated to
number order (as on MF)
include all customer records
p Compare Master File (MF) before the batch processing
with new Transaction File ( TF ) takes place. Thus, it is only
necessary to check which of
read customer
file from MF the files on the master file
need to be updated by new
i
read customer 'electricity reading' data
file from TF from the transaction file. If
* a customer is missing from
do files Yes update Master the transaction file then
match? +5 File (MF) they must have no electricity
No
No readings that month or have
calculate end of left the company.
read next customer bill MF?
customer file
from TF Yes
( END
>/ print out
customer bills
I
?thef
* a customer calls a travel agent to book a seat on a flight
* us|ng a computer terminal, the travel agent contacts the airline
the
‘ customer’s details (name , address , passport , da te an d tim e .
of ti gn
njjfdd ub le ha s
^
« 0
Po kin g, the ab ov e ap pli ca tio n an y
a abaSeS h3 Ve j e re sp on se to
t0 be Updat6d imme
Nalals0o has to be immediate. This is an exam mo le
ple of
ot re al tim e tra ns ac tio n
wh ere res po ns
n es an d
which is very different to batch pro ce ss ing
0
resPonses is not time critical.
Cambridge IGCSE Computer Science Revision Guide
Memory
I/O
1device
Key Input /
Output
iistype address bus
nts, for
data bus
control bus
I/O
device
I
:er
red
) L
nsor Von Neumann computer model
3I0gue
As can be seen in the figure above, information is moved around the system
;ample,
using connections known as a bus. Three main types of bus are shown in the
figure.
ute
0 Address bus - is
th carries sig na ls re lat ing to ad dr es se s be tw ee n th e
proc es so r and the m em or y; it is un id ire ct io na l (ca n
carry signal in one direction only)
te r fo r m or e in fo rm at io n on
- see later in this chap
addresses
Data bus n th e pr oc es so ,
r
- this is used to exchange data betwee
de vic es; it is bi - di re ct io na l
emory and input/output
m
(can carry signals in bo th di re ct io ns)
^Or> trol
bus - this carries signals relating to th e co nt ro l an d
wi th in th e co m pu te r (fo r
coordi na tio n of ac tiv iti es
example: the read and wr ite fu nc tio ns).
However the figure in fo rm at io n ab ou t
the actual' can be re-written to show more
in th e fol low ing
main components in a typical computer system
banner.
Cambridge IGCSE Computer Science Revision Guide UUII
//
/Jr
Memory
* MAR MDR
Input Output
device ;t {
device
Processing
A unit A
exercise to the
reader to link the two data I
l
figures - to confirm
control
that they both show
Control unit
the same links
between computer PC
n
CIR
components.
known as the MAR (memory address register ) and the MDR (memory data M
register ). These work as follows:
\
un
.epassing
“ unit is made
allows
up
arithm
of the
etic (
arithm
for
etic and logic unit (ALU ) and
example, add, and subtract) and
The ALU
Misters- le, AND , OR, NOT ) operations to be carried out. Registers
examp
I ic (for
also
are %
Si temp
°
rarysto rage areas anc
^ contam the results from the ALU.
Also refer to chapter
% 10 ( binary systems) for
devic es more information about
input/ Outpu t
registers.
are cover ed in great depth in chapter 11 and are the primary way of
These
entering data into and getting information from computer systems. Input
devices conve rt extern al data into a form the computer can understand
and can then proces s (for examp le, keyboa rds and microphones). Output
devices show the results of computer processing in a human readable form
(forexample, printers and monitors).
Control unit
The control unit controls the operation of the memory, processor and input/
output devices. It contains the current instruction register (CIR ) and the
program counter ( PC) . The CIR will contain the current instruction during
processing. The PC contains the address of the next instruction to be
executed.
/ers).
le right Basically, the control unit reads an instruction from memory (the address
its). of where the instruction is found is stored in the PC) and then interprets
:his !! this instruction, generating signals to tell the other components in the
ike the I computer what to do.
city) I
j
- fetch
';"the fetch-execute cycle the next instruction is fetched
ment
the
ed so
memory
ddr«s currently stored in the program counter (PC) and is then stored m
that the
the cy
o
^ decoder then interprets this instruction in the next part of
Execute
The ,
un t (CU) passes the decoded information as a set of
This
control
allows all
compu ter.
r
'^e $ st0
aPProPr a te components within
'
ry actions to be
'
carried out.
the
SB
at
*
Cambridge IGCSE Computer Science Revision Guide
W/
(the first five boxes are the fetch cycle and the last tw <
buses in the process
boxes are the execute cycle).
n
the instruction is finally decoded and then executed
- the direction of the data transmission (one way or two way transmission) V. »
" ft
- the method of transmission (number of bits sent simultaneously)
- the method of synchronisation between sender and receiver. *
Simplex, half-duplex and full-duplex connections
Simplex %
Simplex data transmission allows data
to flow in one direction only , i.e.
from sender to receiver only. An
example of this is when sending data from
a computer to a printer.
Half-duplex
Half - duplex data transmission
allows data to flow in both directions but
not at the same time, data
can be sent from sender to receiver and from
Operating systems 12
sender but only one way at a time. An example of
\ I r s c^ to this would be
I conversation where only one person speaks at a time.
Full -duplex
duplex data transmission allows data to flow in both directions
full-
simultaneously. An example could be when using a broadband connection
ona phone line.
8 bits sent
down 8
sender. receiver channels
This method works well over short distances and is a much faster method
0 °f data transmission than serial. However, since the conductive wires are
dose to each other in the ribbon cables used for parallel transmi '/ ion,
interference can occur and degrade the signal quality.
urnbtf An example of use of
parallel data transmission is sending data from a
c mputerto a
nssion
' ) ° printer.
Serial
Q\1
*
1 bit sent
down 1
fro ”
1 sender receiver channel
f
Cambridge IGCSE Computer Science Revision Guide
This method works well over long distances but has a slower transmission
rate than parallel. However, cabling tends to be cheaper since fewer »
channels are required. Since a single wire is used, problems exist in how
to synchronise the sender and receiver (i.e. the receiver cannot necessarily
distinguish characters being sent because the bits are sent one after the
other).
transmission
Asynchronous A&
c
0 Operating systems 12
x
er the devi
ce du e to a ch
dr
an
iv
ge
is
in
th
vo
en
lta
us
ge
ua
le
lly
ve l on th e data signal wires. The
de vi ce er loaded up so that all the device
appropn ate
ut an also allows communication between
can be ili se d d it
device
features
and C PU -
J 0li5
:he Error checking following data transmission
e.
The methods used to determine if a oc
have curr ed du rin g th e
V
transmission of data are covere in r of this book,
9
As mentioned
earlier, USB c o n n e d0n S use of serial data tr an sm is si on,
‘
Qf 64-bit the
e tr an
-
sm
th
in
e
si
^
de
it
ch
00
an
the
ne
buses (see
> r* |
' the data transmission rate. An interna
device ensures that al ar riv e in se qu en ce .
i d
l of the transm
^
Cambridge IGCSE Computer Science Revision Guide
address contents 12.9.4 (a) What is meant by the two computer terms: MAR and MDR1
12.9.5 Put the following stages in a typical fetch-execute cycle into their
correct order. The first one has been done for you.
Order of
carrying out
Description of stage
each stage
Address contained in PC is copied to MAR via address bus
Address part of instruction is placed in MAR
Entire instruction is then copied from MBR and placed
in CIR
Instruction is finally decoded and then executed
Instruction is then copied from memory location contained
in
MAR and is placed in MBR
(a) What is meant by parallel data being sent using simplex data
12.9 .6 transmission ?
(b) What is meant by serial data being sent using half -duplex data
transmission ?
in
to
M
Chapter
Practice papers t
V
t\
*
•
Automatic recording
of data monitoring
conditions in a river
-. SH
Controlling an operation
Biometrics
\
using human speech
S
Use of fingerprinting
in a security system Microphone
[5]
2 A large tank has its acidity monitored and
controlled by sensors and a
microprocessor.
Practice papers 13
be ad de d, as ne ce ssa ,
ry by con trol ling
9 a wai
Va lve an d by
jadcM switching
lla stirrer.
<4
* — Acid
Stirrer
Microprocessor
Sensor
(a) Describe how sensors and the microprocessor are used to control the
natic acidity level in the tank.
method
_ (b) Give two ad va nta ge s of usi ng mic rop roc ess or con tro l of a pro ces s.
[ 4]
2
.. [ 2 ]
>
(c n the
above example, what is the difference between
mo nit ori ng the
'*
ank tan
conditions and controlling
the k co nd itio ns ?
... [ 2 ]
hacking:
viruses: .•••• •
j
•
[ 5] !
4 Give a suitable application, with reasons for your choice, for each of 3
the following types of printer. A different application should be given '“
cl
in each case:
laserjet printer
311
application: ....
Ht
S ,
reason for choice:
application:
*\
m
reason for choice:
3D inkjet printer
application: v 4|
\
reason for choice:
[ 6]
%
runn A Practice papers 13
Ss
v
computer terms are described on the left below and five
Five computer
5 on the right below.
tern 1s are named
the correct description to the correct term by drawing
Connect arrows on
diagram below :
the
[ 5]
sens and no
eit er: door
^ intruder detected by window sensor or by
f 0ult condition identified
«
,i - o
Cambridge IGCSE Computer Science Revision Guide
logic circuit for the above system, showing all your working:
(a Draw
) the
working:
[2 ]
logic circuit:
[5]
o 0 0 0 1st digit
1M digit
5
2 nd digit 3 rd digit
is represented by:
0
8
1
1
0
1
1
0
2 nd digit
3 rd digit
4 2 1
\
\ Practice papers 13
(a) What values must be in the 4-bit registers t represe
speed shown on the speedometer ? °
t the followiing
"
1st digit
21
1 digit
st 2 digit
nd
3 rd digit
2 nd digit
3 rd digit
[3 ]
(b) What is shown on the digital speedometer if the 4-bit
registers
contain the following values:
0 0 0 1 1st digit
hex [ 2]
if ,b) 0) Perform
the AND logical function on the two values A and B below:
*
1 A
B
1 1 0 1 0 1 1
1
1
1 0 0 1 1 1
AAA/D B [2]
40
{0
( )
•'
What is the hexadecimal value of the above result ?
Cambridge IGCSE Computer Science Revision Guide
[ 1]
(b) The following seven bytes are transmitted together with a parity
1
byte (even parity is being used). One of the bytes has been incorrectly
transmitted since one of the bits is incorrect.
byte 7 1 1 0 0 0 1 1 0
.- 1
&
parity 1 0 0 1 1 0 0 1
byte
(i) Identify the column and row of the bit which has been
incorrectly transmitted:
column:
row:
••••
\
[ 3]
SB
Practice papers 13
is
times
maratho
in
disquali
minute
n race
fied .
s
.
for 20
Anyone
student
taking
s
Task 3. Select the students with the three fastest times and output their
1 name and times.
0 Your program must include appropriate prompts for the entry of
0 data. Error messages and other output need to be clearly set out and
understandable. All variables, constants and other identifiers should have
0
meaningful names. Each task must be a separate part of the program and
be fully tested.
1
Section A
1 (a)
Declare the arrays to store the students names an in minutes.
[2]
* * * •••••••
.
•••
[3 ]
Cambridge IGCSE Computer Science Revision Guide
MM
/
[7]
(c) Show two different sets of student data that you could use to check
the validation used in Task 1. Explain why you chose each data set i
Set 1 n
[4]
••••
[6 ]
(jj) How does your program work when there is more than one student
with the same time?
[ 1]
DOBJ Section B
tc set 2 A company offer back issues of football team annuals. The following
data has to be typed into a computer screen page t or
°
• 16-digit credit card number
• name of the person
• today's date in the form: dd/mm/yyyy
• price of the annual (in $)
• year of annual
• name of the football team.
Pfice of annual:
•••
ye r
° of annual:
. 14]
I
:
: *
Cambridge IGCSE Computer Science Revision Guide
li
( START )
±
D <— 0: M <- 0:
P <- 0: F <- 0
I
X <- 1
*
/ INPUT mark /
is mark
> 65?
YeS
»7 0UTPUT
7 ‘distinction’ D <- D +l N
/
No
is mark Yes V OUTPUT
> 50?
7 ‘merit’ * M <- M + 1
No
is mark Yes \
OUTPUT
> 30?
*5
‘pass’ P <- P + 1
No \
/ OUTPUT ‘fail’ X
*
F <— F + 1
X - X +l
* 1
No
OUTPUT D, /
M, P, F »( STOP )
/
m
Practice papers 13
••••a ........
Cambridge IGCSE Computer Science Revision Guide
2 ....
i
[ 3]
(b) The above code is an example of a high level language. High level
languages can use a compiler or an interpreter. Explain the difference
between a compiler and an interpreter.
[2 ]
3
5 The height of buildings and number of floors in buildings was being
analysed.
Write an algorithm, using pseudocode or flowchart only, which:
\
•••••••• •a
S3
Practice papers 13
.. [ 6]
i
i i
i i
i i
i i
i i
i i
i i
+ +i
+
i
i i
i i
i i
i i
i i
i
4- +I
I
I
I
I
I
I
+ +I
I
I
I
I
I
I
i Finish
Cambridge IGCSE Computer Science Revision Guide I
PENDOWN
LEFT 90
FORWARD 20
*
iLf&&
[ 6]
mttdto
«Wi
3TOHCD
ericas
sn
Vita
%
H
V
%
'
h
Vi
b.
S:
A EJJ irs to questions
moo
Chapter 2
(a) Monitoring a process: - Monitoring and control continues until system
- Sensors send data turned off.
- Data converted to digital data (c) Light sensor - automatic doors in a hotel
(using ADC) Acoustic sensor - picks up sounds, for example,
- Computer analyses/compares data a burglar alarm
If outside the range (when compared to stored Infra red sensor - counting items every time the
.
values) . . beam is broken.
.
- .. it sends a signal to sound alarm or produce 2.5.2 (a) (i) Two problems - out of paint
warning message on a screen. - component is missing
Controlling a process: - something is obstructing the
(First four lines are the same as above) paint spray gun.
[61
-'
- t sends signals to actuators
- Signals converted to analogue using DAC
(ii) Use of sensors to detect out of paint, item is in the
correct position, something is obstructing the spray
Pumps/valves (etc.) are opened/closed (etc.) to gun, etc.
alter the process conditions Use of CCTV/cameras to show the status of the
- The output affects the next input. process (e.g. these can check paint surface of a
Data gathered from temperature and car for imperfections).
pH sensors (b) Advantages:
Signals sent to ADC where they are converted to Can work in conditions hazardous/unpleasant to
digital humans;
Information is sent to the computer where it is They can work non-stop (no breaks);
compared to pre-set/stored values Less expensive in the long run (no wages required);
the temperature < 25°C, a signal is sent by the More productive (takes less time to do a task than
^ a human);
computer to switch on the heater (DAC is used
More consistent (everything is always made to the
to convert signal to analogue and actuators are
used to switch on the heaters)
same standard);
the need for humans to do boring/
Removes
lf the temperature > 30°C, a signal is sent by the
repetitive tasks;
computer to the motors to open the windows (can reduce heating, lighting
Less factory costs
(again DAC and actuators used) and to switch
levels, etc.).
ff the heaters
°
lf the temperature is between 25°C and 30°C, no
Disadvantages:
Difficulty dealing with non-standard situations;
action is taken
Can lead to unemployment
-
f the pH < 4, a signal is sent by the computer to
’0Pen a valve to add alkaline water OR close the
possible risk of deskilling;
Production process can be more easily moved to
of input; although the latest screens permit the - if the pH < 5, then no action is taken
use of a special stylus to be used - the use of a DAC may be required depending
Infra red on how the heater is switched on or valve is .ttethe 3t
Benefits controlled the monitoring continues until the terfttiei
- both systems allow multi-touch capabilities chemical process is completed stil be
- the optical system allows the use of bare fingers, Denqacces
gloved fingers or stylus for input
Chapter 3 •IbKspt
- both systems have good screen durability; it iroltim
takes a major impact to break the glass 3.5.1 (a) HTML
Me
Drawbacks - Hypertext markup language
- it is a relatively expensive technology - Type of computer language
- heat sensitive system only allows bare fingers to - All the text, graphics and design elements of a
• ttMbjte
be used for input (gloved fingers or stylus don't web page are tagged with codes that instruct a ^timeti eqabit: '
N - Bec a use of the abo ve , dial up isn't on all the time. 2 or 3 years' time? My cars? My 2010 pho
tos?
s - The ISP con trac ts are usually for a number My favourite beaches ? or in all three ( which
of hours per month and if this is exceeded then becomes a big waste of memory !).
additional charges are incurred. Tagging helps you out of this dilemma . It is
- An oth er dra wb ack is that the phone line is tied now possible to tag the photograph with key
up while the user is accessing the Internet . words such as: my cars, Ipanema Beach, 2010 .
’" * Kb I Features of broadband: So when you (or a friend) come to find this
- This has a much faster data transfer rate photo 2 or 3 years later, you don't have to
(> 50 000 kbps). remember where you stored it. Simply search
tocher - There is often an upper limit on the monthly
^ on the tag and all the matching photos will be
download/upload file size (typically 20 Gbyte); displayed.
m this is not usually a problem unless the user (d) This is data sent in a compressed form over the
leperrc frequently downloads music or film files Internet and is displayed in real time on the user 's
' valves - It has the advantage of always being on but it computer. The downloaded data is sent to a buffer,
• until tiie doesn't tie up the phone line (i.e. phone calls it isn't saved on the user's computer and needs to
can still be made even when the Internet is be streamed every time the video or audio file is to
being accessed) be accessed.
- Allows systems such as VoIP, on-line chatting 3.5.3 Digital media web sites: These websites allow users to
in real time, C2C (webcam to webcam) to take upload video files and other multimedia files for other
place effectively. users to access as required.
(b) 80 tracks = 80 x 3.8 The video files are stored on the server and allow either
= 304 Mbyte free access to anyone or some form of code is required
enoofe 64 megabits/second = 8 Mbyte/second before the videos can be viewed.
instruct * thus time to download 80 tracks Since most users don't have unlimited web space, this
of web site is bec omi ng incr eas ingly pop ular as a
jeen. = 304/8 type
way of stori ng /arch iving a num ber of vide os .
= 38 seconds
esse ntia lly a seri es of med ia files (audio
W (i) 50 photos 50 x 2 Podcasts : are
= ) that are rele ase d at regu lar inte rval s and
web- and vide o
= 100 Mbyte . Because of the
downloaded to a use
L r 's com pute r
24 megabits/second 3 Mbyte/second
= method of deliv ery , this is a diffe rent way of accessing
5 thus time to upload 50 photos = 100/3
= 33 seconds media files.
stor ed and ma inta ined centrally
,. All the media files are
(ii) These sites pro mot e the building
are des igned to or view er sim ply emp loys the
of online communities who in general share and the listener
soft war e to acc ess thes e files ,
appropriate application
same interests and activities. They are aime and dow nlo ad new files in the given
,ed check for updates
primarily at young people who can then sha auto mat icall y dow nlo ad
photos, videos, music, favourite foods an s ^
series. Thu s, it is pos sibl e to
you r favo urit e pro gra mm e or
each episode/track of
They are usually free of charge and allow t e it is mad e ava ilab le .
artist as soon as
o interaction of people. Users can add fr en ^ roo ms are war ned
^^
safe gua rd , use rs of cha t
id 3.5.4 (a) As a facil ity. It is
messages to each other (' write on about their language and use of the
update their personal profiles to notify fnen s pre ven t abu se , has sling of othe r
46 important to
about their likes and personal information a cod e of con duc t whi ch ,
, etc . and there
is
members being blocked
These sites are expanding quickly andthere a use r
iglpe
recent concern about their safety and
' if breached, would
takin g part in
lead
the
to
futu re .
from
ween mes sag ing (IM) to allow
e
However, they do allow easy intera i (b) Cha t roo ms use ins tan t
\
use r regi ster s with a
like-minded people from different parts ^ communication in rea l time
a use
. A
r nam e and password.
world which is a very positive move chat room and chooses
a user cha t roo m they log in
( I) to enter the
" Tagging is a type of bookmarkingfhatever When they wis h
nam e and pas swo rd .
tags a web page or photograp with the user
the users wishes) using some tex describe
Cambridge IGCSE Computer Science Revision Guide
Once they have entered the chat room, a list of - Companies can make sure that the information
people currently online will be alerted to them available to its employees is specific to their
joining in. To chat, the user types into a text box company needs.
and may sometimes use emoticons. - If there is a need to send out 'sensitive' information
The message becomes immediately visible to all (e.g. security risk and data which could give
those on line. It is possible to enter a chat room competitors an advantage) it is easier to ensure that
to read messages only and not contribute - this is this information remains within the company.
known as lurking . 3.5.7 Web browsers, ISP, VoIP software/communications.
(C) Instant messaging (IM ) is sending real time
messages to another Internet user. It is similar to
Chapter 4
chat rooms but is generally on a one-to- one basis
and is therefore more private. Instant messaging is
also a faster method of communication than using
.
4.9 1 (a) The private key is only known to the user 's
computer, while the public key is given by the
,#oP" 01
.
3.5 5 (a)
emails since it is in real time.
True: information is sent straight to the user's
user's computer to any other computer that wants
to communicate securely with it . To decode an
#
^
computer and there is no need to save it first on encrypted message, a computer must have the
the website server; the data is actually streamed public key and the private key.
live (i.e. in real time); The sending computer encrypts the message with . t canredu1
On-demand: the files are first saved on a hard disk a symmetric key, then encrypts the symmetric key private
on the web server and played back to the user when with the public key of the receiving computer.
• I allows a
they are requested. The receiving computer uses its private key to
(b) Buffering is an important component here to enable decode the symmetric key and then uses the
tobedow
continuous playback to an acceptable standard. The symmetric key to decode the message.
steady ir
main advantage is there is no need to store media (b) List of stages: .' Istoifeati
files and it is possible to always download the latest - The web browser attempts to connect to a - Pray $ei
version from the central web host. website which is secured with SSL andean
(C) There is a need to have media player software on - The web browser requests the web server to - Proxy
the user's computer that uncompressed the data identify itself
miorm;
and is then sent to a buffer before being played - The web server sends the web browser a copy of
thews
back on a monitor or through speakers. its SSL certificate
However, if the buffering is slow or the broadband - The web browser checks whether the SSL server
connection is slow, there will be delays in the certificate is authentic/trustworthy; if it checks
playback which can be very annoying. Many out as OK then the web browser sends a want
webcams also use this method to send video data message back to the web server horn
over the network. - The web server will then send back
some form
3.5.6 (a) Viruses, security issues, scamming, fraud, of acknowledgement to allow the SSL encrypted '
Pro:
pornographic website. session to begin anr
- Intranets are safer since there is less chance of - The encrypted data is then shared securely
external hacking or viruses. between the web browser and the web server.
lit
- It is possible to have more control, for example, ( c) Passwords - user name and password
; when these
19 V it is easier to filter out websites that you don't are entered, they are checked against a secure file
want your work force to access. to confirm an authorised person has 'logged in' to
- Companies can make sure that the information the system - if either user name or password are
fryt
available to its employees is specific to their incorrect, access is denied fra
company needs. Pass cards pass cards contain a magnetic stripe %
- If there is a need to send out 'sensitive' information ( which contains security
information) and/or an
It
(e.g. security risk and data which could give embedded chip (which often contains a PIN) ft;
competitors an advantage) it is easier to ensure that Digital signatures - digital signatures C
are based on
this information remains within the company. public key encryption (which
use a private key and
(b) Advantages: a public key)
- Intranets are safer since there is less chance of Biometrics - biometrics are a recent introduction;
external hacking or viruses. they rely on the unique properties
of certain
- It is possible to have more control, for example, aspects of the human
physiology:
it is easier to filter out websites that you don't - fingerprint scans
want your work force to access. - retina scans
Answers to questions
(b) (i) and (ii) 4.9.7 (i) Encryption scrambles the data, therefore doesn't
Cookies are small files sent to a user's computer prevent access to files, it just makes them
when they visit certain websites. They store unreadable if illegally accessed.
information about the user which is accessed every (ii) DPA simply sets out the rules to protect data, but ft
time they visit the website. still can't prevent hacking or remove the risk of
For example, every time the user logs on to a viruses; the act indicates that data security is a
website they may see a message such as ' Welcome necessary requirement together with protecting
y j
back, Dmitry' ; or ' If you are not Dmitry Serdyuk the integrity of the data but illegal acts can't be
then ' This allows a user 's preferences to be prevented by an act on its own.
recognised, for example, if a use often buys (iii) Spyware monitors actual key presses on a keyboard;
designer clothes, pop -ups (adverts) and pop-unders looking at a PIN as it is being entered at an ATM
related to designer clothes companies will appear is shoulder surfing and isn't a method of directly
on the user 's screen each time they visit the website. recording key presses as would happen with
They are not malicious or harmful and are simply a spyware.
w
way of letting the website know who you are. But (iv) The virus may be attached to the file itself; hence,
they can 'clog' up a computer which through time backing up the files would not be an effective way
will manifest itself as a slowing down of computer of recovering from a virus since using the backed up
performance. files may simply reintroduce the virus to the system.
4.9.4 (i), (ii) and (iii) (v) Call centres tend to save companies' money since
All of the answers in question 4.9.3 could lead to the workforce in the call centre countries tend to idineedK
data loss/ corruption and constitute illegal access. be less expensive to hire. tftstoacce
However, there are other factors which could 4.9.8 (a) Encryption is used in many cases to protect against Reinsert
lead to data loss or corruption and there are the effects of illegal access to data (i.e. to prevent dnjourP
certain measures which can be taken to prevent or the hacker from understanding the data that has
minimize these factors: been intercepted).
Accidental damage: use backups in case data is lost However, many banks, for example, go one stage
or corrupted; use passwords and user ids to restrict further when operating online banking. They
who has access to the data in the first place. encrypt all data but also use some of the following:
Hardware faults: hard disk (head) crash guarded 1 Use of user codes (this is often an 8- digit or
against by using backup files; use of UPS 10-digit code unique to a user):
(uninterruptable power supply) in case of power Please type in your user code:
loss; use of parallel systems.
Software faults: use backups in case data is lost or
2 Input some of the characters from a PIN and %coi
some of the characters from a password. This
corrupted by software failure.
Incorrect computer operation: correct training of
method prevents a hacker finding out the M<
'
' C
But, in general, tapping into a WiFi signal . 4 th
'{
st
(b) Use of WEP encryption; use of passwords; use of 1
firewall. Please type in the following characters from
your password:
4.9.6 Description Security risk
Yes No 2nd
spyware 5th
virus 9<h
cookie x 3 Alternatively, the user might be asked, for
phishing example, to key in the 2nd, 5 th and 9 th characters
spam X from their password using drop down boxes.
This method is a further attempt to stop spyware
pharming
X picking up key presses (since the user clicks on
RSI
Answers to questions
V
Answers to questions
(c) C, E, F, G, H
+ 1 (d)
count
cm/ =
•
nt capacity (m3)
Field: freezer id lowest temp (C)
end (gender = female)
male) or FREEZER FREEZER
gender = = 3); Table. FREEZER
!
L«ti
( or (count FEATURES FEATURES
FEATURES
string, Sort:
.7) of
V UHWjttPrtrp f1..7] of real; Show:
vrinay rainfall ;
real > 0.24
[1.7] of Criteria: < - 25
arraysunshine : real;
ainfall, totalsunshine or:
integer ;
nr 69 • )i :
Sunday ’; 5.6.10 (a) 9
neiji] -- ’; (b) ref no
•Monday
eek\2):= (c) 2, 4, 5, 9
*we ® := Tuesday
• *;
**
neetf ]:= ' Wednesday *;
Thursday’;
(d)
km to weekend no of
; = ' Field: i ref no rooms
•«Wkf* 6 '
5[
Friday*; airport tariff (S)
wa > S •mwkf7 = )
]:
c
'Saturday';
Table: HOTELS HOTELS HOTELS HOTELS
bar-
tor * to 7 do
Sort:
begin [ day]);
hours of sunshine forweek Show: 0
write ('Enter
sunshine[dayl
) ;
readln (
sunshineldayl ; Criteria:
: totalsunshine +
totalsunshine = week (dayl); or:
]n». cms of rainfall for \
write ('Enter
(rainfall[day ]);
readln ] (e)
rainfalltday
[rdeni totalrainfall := totalrainfall +
_ weekend tariffJS )
Field: [ refno
end
wntein (Total sunshine for week is \ .
totalsunshine );
Table HOTELS HOTELS
totalrainfall);
wrneln Total
( rainfall for week is *, Sort:
ter day := 1 to 7 do Show:
begin
if rainfall[day] = 0 then Criteria
week [day]) or :
writeln (*no rainfall on \
end,
(a) Finance 0 9
5.6.11
D M F P G E R M A N Y
• rdocounfl , discount2, cost : real;
«noplayers , nohours : integer;
(b) M A J I
(c) Fewer typing errors;
data ;
to type in the
in (noplayers, nohours); Faster .
^
tor. Uses less memory to store data
change/ update the data
noplayers * nohours * 5; necessary to
be
if noplayers > 3 then discount1 = cos * 0.25; (d) It would
= * every year. joined the
•Inohours > 3 then discount2 = cost * 0.1«
; It would be better to use date person
2
^ * cost - discount! - discount
company. be
" tteln (cost) . (e) none
of the fields can be guaran teed to
^ U) 0) 8
to) freezer id
(»i) 6
Cambridge IGCSE Computer Science Revision Guide
6.5.3
Chapter 6
6.5.1
c START )
total 0
highest 0
( START ) I
count 1
INPUT H, M
INPUT country
INPUT
Yes no vehicles
is country = H H+6
Singapore? M M
total total + no _ vehicles
No
is country = Yes H H - 10
West Canada ? is
M M
_
no vehicles
Yes
highest _
no vehicles — •v
> highest ?
No
No
is country Yes H H+ 3
India ? M M + 30
count count + 1
No
OUTPUT / INPUT H, M
“error” OUTPUT country Yes is count No
<= 365?
average total/365
7
( END ) / OUTPUT
average, highest
6.5.2
( START ) ( END )
6.5.4
suml 0
~
sum2 0 ( START )
I T
count 1 drinks 0: books 0:
start 0 sweets 0
INPUT year, I
height count 1
i
is year = Yes is heightX, Yes X'INPUT code ^X
suml suml + 1
1? s> 135 lyS
Yes
No No
is code > / OUTPUT /
. 399? /
^ "error ” /
No
is year = Yes is heightyYes sum 2 sum 2
is code > Yes
7? v< 175 ? +1
. 299? . drinks drinks + 1
No No No
No
/ OUTPUT
count count + 1
suml, sum2
i / OUTPUT
( END ) V Yes
per _drink drinks / 6.5
/ per _ drink,
is count per _book books/ 6.5 _
per book,
\650? _
per stat
per_sweet
stat/6.5
sweets/ 6.5
_
per stat,
per sweets
Answers to questions
6.5.7
"
( START ) ( START
sun 0: low.rain
1
10000 I
INPUT
no _players,
^
resort
no hours
totall 0: total2 0
I charge _
5 * no pl ayers *
days 1 _
no hours
is sun > No
high_sun? ——» high_sun sun
No
is
no_hours >= Yes
low _sun
is rain < Yes discount2 charge * 0.10
_ .
low rain?
sun 3?
No No
days days + 1
charge charge - discountl -
1 7s Isdavs <= _
No avge rain totall/ 365 'OUTPUT discount2
^^ _ _
^ \ 365? . avge sun tota 12/365 avge rain ,
avge_sun /
OUTPUT
resort resort + 1
7 charge
is resort No
OUTPUT
high_sun,
/ { ) ( )
^ .
= 10?
low rain /
END END
6.5.6
.
6.5 8
c START
*
) number count temp OUTPUT
total 0: highest 0 52 0 52
1 42
count 1
2 32
1 3 22
NPUTtime /
X
speed
‘ , 4 12
30/time
5 2 2, 52
I
^
X OUTPUT speed -20 0 -20 error
3 0 3
is speed > Yes / OUTPUT “ max
speed 1 -7 1, 3
^
100?
7 exceeded ”
I
.
6.5 9
No
total total + 1
Z7 sunny wet foggy weather OUTPUT
0 0 0
is speed > Yes speed
highest 1 sunny
highest?
2 sunny
No
1 wet
count count + 1 1 foggy
3 sunny
Yes is count <= wet
2
r 8000?
.,
K
k No / OUTPUT total ,
4
3
sunny
wet
average total/80 X average, highest X
7 2 foggy
I sunny
( END ) 5
last
Cambridge IGC5 E Computer Science Revision Guide
.
6.5 10 7.3.2 line 3 - No_ ppl > 4 is incorrect (question referred to 3
totall total2 X Y count temp avgel avge 2 OUTPUT or more)
0 0 0 0 1
- The statement should change to:
if no _ ppl >= 3
24 1 2 24
line 3 - The discount is incorrect, i.e. cost <- cost * 0.10
16 1 3 16
(this is equivalent to a 90 % discount)
55 2 4 31
- The statement should change to: cost f- cost
36 2 5 20 *
0.90
83 3 6 28 line 4 - Loop starts at 0 which is incorrect
104 4 7 21 - The statement should change to:
54 3 8 18 for x <- 1 to no _ ppl
70 4 9 16 7.3.3 line 1 - Count is set to 0; this is incorrect
129 5 10 25 - Statement should change to: count 1
154 6 11 25 17.5 25.7 17.5, 25.7 line 2 - Initialisation is set to 1 which is incorrect
- Statement should be changed to:
6.5.11
_
total one <— 0: totaljtwo <— 0
C total X number OUTPUT line 4 - Required to count numbers 1000 or over; the
i—
0 0 40 present statement ignores the number when it
40 1 is equal to 1000
4 - Change statement to: if number >= 1000 ...
0.4 40, 1 line 6 - Input is in the wrong place
2 0 0 -5 - The input should come before the two if
-5 statements
-0.5 - 5, 0
.
7.3 4 10 input H, M, country }
3 20 if country } = 'Singapore' then H <- H + 6
0 0 3400
30 else if country } = 'Western Canada' then H <- H - 10
3400 1
40 else if country } = 'India ' then H <- H + 3:
340 2
M <- M + 30
34 3
50 else print 'error'
3.4 60 print country }, H, M
0.34 3400, 3 extension question (add the following lines, for example)
:
4 0 0 800000 55 if H > 23 then H <- H - 24: print 'next day'
800000 1 56 if H < 0 then H <— H + 24: print 'previo
us day'
80000 2 57 if M > 59 then M <- M - 6 0: H
-H+1
*
8000 3 7.3.5 10 totaM 0: total 2 <— 0
800 4 20 for x <-1 to 1000
80 5 30 input year, height
40 if year = 1 and height >= 135 then totall <
8 -
0.8 total1 + 1
800000, 5
5 50 else if year = 7 and height < 175 then
total2 <- total2 + 1
60 next x
Chapter 7 70 print 'Year 1', totall , ' Year 7', total2
7.3.6 10 total 0: height 4- 0
7.3.1 line 3 - The algorithm inputs
5001 numbers 20 for x 1 to 365
- The loop should be changed to: for x - 1
< to 4999 30 input no _vehicles
line 5 - The action taken after checking
for the largest 40 total <- total + no_vehicles
positive number is incorrect
50 if no_vehides > highest then highest <- no_vehicles
- The statement
should change to: pos <— number 60 next x
line 6 - The action taken after ch
ecking for the largest 70 average <- total/365
negative number is incorrect
80 print average, highest
The statement should change to: ne
g <- number 7.3.7 In this example we could use the
line 7 The statement: x <- x +1 is not required case statement instead
when of the way it has been done in lines 40 to 70. The
using for .. to loops
- Line 7 should be removed alto method used in example 4 in the text book has not been
gether used here since the sweets codes start at 000 and end
Answers to questions
me ans it wo uld be impossible or difficult check each digit in turn. If the name and PIN
099 which match, the
of ma the ma tica l manipulation. In formula in line 20 changes to no_players no_
to do the
same type * hours * 4.
, we hav e spli t the code into three digits a
this me-thod
,
Man d a che ck is ma de
-
on the valu
-
e of a.
_
' books < 0: drinks < 0
Chapter 8
0 sweets «-
0: stat e 0 •
8.4.1 A B
forx <- 1 to 650 X
20 0
input a, b, c 0 1
30
40 if a = 0 then swe ets <— swe ets + 1 0 1 0
50 -
else if a = 1 then stat < stat + 1
1 0 0
1 1
60 else if a = 2 then books <- books + 1 1
% 70 -
else if a = 3 then drinks 4 drinks + 1
.
8.4 2 A B X
80 else print 'error '
0 0 0
todlki 90 nextx 0 1 0
100 percentl 4- (sweets * 100)/650 1 0
'M Wto
)
110 percent 2 4- (stat * 100) /650 1 1
1
1
120 percent3 4- (books * 100) /650
130 percent4 4- (drinks * 100)/650 8.4.3 A B C X
ttieny .
^ ^ 140 print percentl, percent 2, percents, percent4 0 0 0 0
73.8 10 highest <- 0: lowest 4- 10 000 0 0 1 0
mber >= ioo[ 20 for x 1 to 10 0 1 0 1
30 totall <- 0: total2 4- 0 0 1 1 0
site to f 40 -
for year 4 1 to 365 1 0 0 1
50 input rain, sun 1 0 1 0
60 totall 4- totall + rain 1 1 0 1
- H+ 6
f 70 -
total2 4 total2 + sun 1 1 1 0
da' then H<- - - 80 if sun > highest then highest 4- sun
90 else if rain < lowest then lowest 4- rain 8.4.4 A B C X
0 0 0 0
100 next year
0 0 1 0
110 averagel 4- total 1/ 365
0 1 0 0
120 average 2 4- total2/365
0 1 1 1
130 print averagel , average 2 0
1 0 0
xt day' 140 next x 0 1 1
1
150 print highest, lowest 1 0 0
1
7 -3.9 10
total 4- 0: highest 4 0
20 for x 4- 1 to 8000
- 1 1 1 1
^
1
60 Print -
cost cost discount! discoun
- 0 1
0 0
,y 1 0
cost 0
1
Extension hint: 1 0
0 0
A ume , alg orithm 1
V * that a file contains all members s the
on
1
1 1
**
e 6
"^
Wl need
player to input name and then
file. Also input the PIN as four separa
^^ ^ an
^
(j
1 1
Cambridge IGCSE Computer Science Revision Guide
C w 4
J
J
X
9
J
s t
/
T :
f
dt
T f$
X
R S T X im
0 0 0 0 c T X w
0 0 1 0 0 0 0 1 I?
0 1 0 0 0 0 7 7
0 7 1 7 0 1 0 1
1 0 0 0
0 1 1 1
1 0 1 0
1 0 0 1
1 7 0 1
7 1 1 1 1 0 7 1 1
-
7 1 0 0 SM
8.4.8 Logic statement:
1 1 1 0
D = 1 if [ A is NOT 1] OR [ A is 1 AND (B is NOT 1 AND
C is NOT 1)1 8.4.10 Logic statement: #531
Logic circuit: S = 1 if [ T is 1 AND W is NOT 1] OR
[ T is NOT 1 AND ( P is 1 OR W is NOT 1 ) ]
Logic circuit:
** i
A
T
X %
s
B
s
S N
P
c
w
A B C D s
0 0 0 7 T P w 5 X*
0 0 7 0 0 0 7
0 7 0
1
0 0 1 0
X
1
0
1
7
0
7
0
1
7
0
0
1
1
0
1
1
1 s
7 0 1 7 0 0 7
0
1 1 0 1 0 1 0
0
7 7 1 7 7 0 7
0
1 1 1 0 \
\
\
Answers to questions
- Applications involve tracking of livestock and vehicles, 154 gives NO remainder when divided by
tracking athletes in a race (timing of their event) . 11 hence the check digit is correct .
Biometrics 10 987 6 5 4 3 2 1
- These involve use of unique characteristics of 0 -2 1 2 -9 1 1 3 4 -X
humans, for example, fingerprint scans, retina scans, (10x0) + (9 x 2) + (8x 1) + (7 x 2) + (6 x9) + (5 x 1) + (4x 1) + I
palm prints, face identification. (3 x 3) + ( 2 x 4) + (1x 10)
- Applications include security systems at airports,
entry gates to buildings, security information on
= 0 + 18 + 8 + 14 + 54 + 5 + 4 + 9 + 8 + 10
= 130
l
passports, etc. 130 gives a remainder when divided by /
Magnetic stripes 11 hence the check digit is incorrect
- Magnetic information is stored on a stripe and is (b) 10 987 6 5 4 3 2 1 &
automatically read by swiping the stripe through a 0 -5 5 5 -2 1 5 3 3 -?
reader. (10 x 0) + (9 x 5) + (8 x 5) + (7x 5) + (6 x 2) + (5 x 1) + (4x 5) +
y'.
- Applications include credit/debit cards, key cards in (3 x 3 ) + (2x 3)
hotels, etc. = 0 + 45 + 40 + 3 5 + 1 2 + 5 + 20 + 9 + 6
OCR
- This technique involves reading data from hard copy
(paper) and converting it automatically to an
= 172
This requires the addition of the value 4 to give a
number which has NO remainder when divided by 11
I
*0
electronic form. hence the check digit is 4.
- Example: this is used to automatically scan documents 10 987 6 5 4 3 2 1 Pl
to check signatures against those stored in memory. 0 -1 2 1 -9 0 0 2 1 -? tl
Voice recognition (10x 0) + (9 x1) + (8x 2) + (7 x1) + (6x 9) + (5x 0) + (4x0) +
- These systems recognise the spoken word (voice) (3 x 2) + (2x 1)
HIM
patterns and compare them to voice patterns stored = 0 + 9 + 16 + 7 + 54 + 0 + 0 + 6 + 2
in memory. = 94 m
- These can be used in security systems, can allow This requires the addition of the value 5 to give a Tft!
disabled people (e.g. blind) to communicate with a number which has NO remainder when divided by 11;
computer, etc. hence the check digit is 5.
Smart cards (c) Check digits can essentially identify three types of
- These contain embedded microchips and receive error:
power from card readers; the chip contains personal - if 2 digits have been inverted:
data, bank details, etc. e .g. 23496 instead of 23946
- Applications include credit/debit cards, security cards, - if an incorrect digit has been input:
loyalty cards, passports (containing biometric data), etc. e.g. 23996 instead of 23946 Sk
OMR - if a digit has been omitted or an extra digit added:
- These systems can read pencil/pen marks on a piece e. g. 2396 or 239966 instead of 23946.
of paper in a pre- defined position, for example, •—•. 10.6.4 (a) Double entry: here data (e.g. from a paper
- These can be used to automatically read responses in document) is entered twice (by two different people) L
a questionnaire or answers on a multi choice exam and the computer checks that they match up; an
paper, etc. error message is output if there are any discrepancies.
10.6.2 Title - character/type check (must be letters only) Visual check : as the name suggests, this is a manual
Gender - consistency check (must mate up with title field) system; the original data is compared to data typed \\
Date of birth - format check (should be dd/mm/yyyy) in by manually reading it and checking against the \
Pay number - length check (must be exactly 9 digits long) original document .
\ Si
Telephone number - presence check (this field must be (b) Unlike validation, verification does not check to Vi
filled in) see if data makes any sense or is within acceptable
Pay per month - range check OR limit check (salary
must not exceed $ 20 000 - but can be any positive value
boundaries - it only checks to see that data entered
is identical to data on the original document.
X
less than that). \
.
10.6 3 (a) 10 9 8 7 6 5 4 3 2 1
10.6.5 (a) B (hex) = I 1 o 1 1
0 -4 5 4 -3 0 0 6 2 -X
E6 (hex) = 1 1 1 0 0 1 1 0
(10x0) + (9x 4) + (8x 5) + (7 x 4) + (6x 3) + (5 x0) + (4x0) +
(3 x6) + (2 x 2) + ( 1 x 10) ( b) Hex number is: B 6 F
=0 + 36 + 40 + 28 + 18 + 0 + 0 + 18 + 4 + 10
= 154
Answers to questions
even number of 1s; or it is set to 1 if the number Modular design (easier maintenance);
contains an odd number of 1s. Microprocess ors all ow ste reo so un d , 3 D bro ad ca st .
lb) Parity check may not detea an error if more than 11.5.3 ( a ) Dot matrix printer
one bit has been changed and the parity of the Advantages:
wo rk wi th co nti nu ou s ( fan fol de d ) stationery
received number is correa. - They
me an s the y ca n do ve ry lar ge pri nt jobs
id (i) the bit in position column 2, row 7 is in error which
(value = 1) without any human interaction.
rk wi th mu lti - pa rt sta tio ne ry wh ich me an s
- They wo
(ii) column 2 ows
sh odd parity (five 1s) and row ' ca n be ma de immediately.
' ca rbo n co pie s
also shows odd parity (f ive 1s); where column
Re lat ive ly ine xp en siv e to run and maintain .
2 and row 7 intersea indicates the bit whic -
da mp an d dir ty atm os ph ere s ( e . g . on a
- Can work in
has been corrupted . wh ich wo uld ca us e
factory floor - ) an en vir on me nt
W) Any description of checksums, ARQ or other pri nte rs .
problems for the oth er two
method from elsewhere in textbook . rai se d ch ara cte rs ( i . e . Braille to allow
- Able to print
all y - sig hte d pe op le to rea d the
blind or parti
, tc Chapter li outputs).
1,4 Disadvantages:
> e Th pr oc es sor should consume as llttl pe ns ive pu rch as e in the
* * ljfe; - They are relati ve ly ex to
Po ss ibl e thereby prolonging interna first place .
The processor should run as cool as PobS op era tio n
minimising the problems associated wi ^ ^
^ - They tend to be ver y no
us
isy
ua lly
in
of a ver y po
.
or quality
- Printing is slow and
d S;,,pdt on; an d ink jet .
0 ‘ • reducing
compared to las er
r ( us ua lly a 4 - colour
No fans needed to cool the procescm s thu s Although they do work in co lou
- d - the y cer tai nly
the load on the internal battery, the res ult s are ver y lim ite
ribbon , )
tpbook photo.
Lightweight ; this makes the laptop /no couldn't be used to pri nt ou t a
completely portable.
Cambridge IGCSE Computer Science Revision Guide
U
i
Inkjet printer
Advantages:
have difficulty reading/understanding text; loud
speakers are used to output the sounds/voice.
V
- they are very cheap to purchase in the first place Trackerball:
- they produce high quality output; used to produce - These devices are easier to use than a mouse
photographs if people have problems using their hands and
relatively quiet in operation arms or if they have coordination problems. f
Disadvantages: Braille printer:
- Ink cartridges don't last very long - this makes the
printers unsuitable for any long print runs ( e .g.
- These use old technology dot matrix printers
which can produce output in the form of raised
V.
printing a colour magazine).
- Printing can 'smudge' if touched too early or the
dots (i.e. Braille characters) which can be read by
blind or partially -sighted people.
o
wrong paper type is used. Large/concept keyboard:
Relatively expensive to run (mainly due to the cost of - These help people who have difficulty using 4
ink cartridges).
normal keyboards (due to difficulty using hands/ iE
Laser printers
arms or coordination problems) . 4J
Advantages: 11.5.4 (a) Characteristics of RAM
40
- Very low noise levels.
- They are volatile memories ( i.e. the contents are
- Fast output and well suited to high volume
printing.
lost on switching off the computer).
- They store the file/data temporarily that the user
4
£
^
- Toner cartridges last a long time ( can be cost
is working on.
effective when compared to inkjet printers). - These memories can be written to and read
tim
from
- Print quality is extremely good.
and the contents can be changed by the user.
Disadvantages: Characteristics of ROM ring
- Maintenance and running costs can be expensive - They are non- volatile permanent memories
(e.g. colour toner cartridges and replacement of
(which means the contents are not lost when the •
a
’ raj
Answers to questions
selects the most appropriate one); man- operated 11.5.8 (a) (i) 5 min 20 seconds = 320
seconds
desks would have a limited language capability. 216 000 x 320 = 65 120 000 byte
= 62.10 Mbyte
- Customers don't have to wait in queues. (assumes 1 Mbyte = 1 048 576
bytes)
- The kiosks/desks are open 24/ 7 since they are un - (ii) 12 files would occupy 12 x
62.10 = 683.1 Mbyte
manned. (b) 56 megabits/second = 7 Mbyte
/second
(c) - Lower costs (fewer staff required); 683.1/7 = 97.6 seconds to download all 12 files
- Can advertise special offers; (c) 68.3 Mbyte (approx)
- Can deal with customers faster (improves their 11.5.9 (a) Passport scanners are now used at airports to
scan data
reputation). from passports. It uses OCR technology to provide
(d) Local attractions, local time, location of platforms, high quality digital images of the scanned document
facilities at station in a format that can be understood by a computer. The
11.5.7 (a) Such monitors consist of a front layer of LCD (liquid data is usually stored in a database which allows easy
crystal diode/ display) that makes up the image searching and manipulation of the data.
from a number of pixels. This LCD layer is then The system will automatically:
Henri
back -lit using LEDs which give it better brightness - Identify a scanned document
and contrast . LEDs have several advantages over - Locate the required text and images
the older CCFC (cold cathode fluorescent lamp) - Carry out any required error detection
Hnputaj , technology used to back -lit LCD monitors in the - Store the text in an ASCII file format.
past: (b) (i) Barcode technology is used in most supermarkets
- They reach their maximum brightness almost around the world at the checkouts where each
ten to and immediately (no need to ' warm up') barcode is scanned by a barcode reader/scanner.
nged bytes - They give a ' whiter ' tint sharpening the image The barcode is looked up in a database (the
and making it look more 'vivid '; CCFCs gave a barcode number is usually the key field for
lentmewna
yellowish tint searching purposes) and once the required item
- They produce a brighter light than CCFCs
enotlos! ' —' is found, details such as price and description are
allowing the picture to be much brighter in sent back to the checkout ( or point of sale (POS)
appearance terminal) . The item is also 'flagged' as being
(they ®1
** - The monitors are now much thinner due to the sold and the new quantity in stock written back
use of LEDs to the appropriate record in the database. This
jctionsb’
- Since LEDs last almost indefinitely, this quantity of stock is compared to the minimum
i referred^ technology is much more reliable and consistent order/stock level and if it is equal to this value,
0$) - Since LEDs consume very little power, LCDs back - or less, then an automatic re - order for new stock
lit with this technology are very energy efficient is generated by the computer.
: fofinrf (b ) (i) Thermal bubble and piezoelectric (ii) Keyboard/keypad, touch screen, credit/debit card
, 4
(ii) Thermal uses heat to generate a bubble reader, loudspeaker / beeper
which expands and ejects ink onto the paper; uses:
ive
^ piezoelectric uses a vibrating crystal which forces
ink out of a nozzle onto the paper.
- key in barcode number if scanner fails to read
barcode/key in number of same items
(c) (i) Inkjet printers use liquid ink which is ejected - select items (such as fruit or bread) from
V onto paper either by heating to create bubbles
of ink or by vibrating crystals; laserjet uses dry
a screen since fresh fruit may not have a
barcode
ink (known as toner) which forms letters and - magnetic stripe/chip and PIN device to read
images on paper by electrostatic attraction - this data from customer 's card to enable payment
ink is fixed to the paper by heating it until it to be made
ept
melts using a fuser. - produce sound to confirm barcode read
(ii) Ozone gas is produced because of the use of correctly OR to indicate an error if barcode
y lasers and electrostatic charges and also toner
particles can enter the air which are breathed in
.
failed to read
11.5.10 ( a) Lossless file compression is based on the idea that
files can be broken down into files of 'similar size '
by office workers.
(d) The printer receives the data and stores it in a for transmission or storage, and then put back
together again at the receiving end so it can be
printer buffer (temporary memory); this allows the
the printer quickly and , used again.
& computer to send data to
being carried out, the Lossy file compression works differently to lossless
while the printing process is
tasks (printing is a file compression. Lossy compression algorithms
computer can get on with other
4 eliminate unnecessary bits of information (refer
relatively slow process).
J
Cambridge IGCSE Computer Science Revision Guide
3 l time
where it ends. Otherwise it would be impossible
to distinguish when each group of bits is being
received.
questionnaire
— MICR
ontrol, Synchronous
. the
'
Synchronous transmission is a data transfer
Automatic recording of data
monitoring conditions in a OMR
m). river
method where a continuous stream of data is
I also accompanied by timing signals (generated
by the internal electronic clock ) to ensure sender
Controlling an operation
and receiver are in step ( i.e. synchronised with using human speech Biometrics
ftput each other). With this method, the receiver
counts the bits sent and then reassembles the
bytes. It is essential that timing is maintained Use of finger printing in a Microphone
as there are no start and stop bits and no gaps security system
(as in asynchronous transmission). Accuracy is
2 (a) Any four from:
ain dependent on the receiver keeping an accurate
- pH sensor sends signals to the computer
count of the bits as they come in.
- Signal converted into digital by ADC
(b) (i) - Computer compares pH value with stored value
Hardware devices are automatically detected and can - If pH too low, then computer sends signal
be configured when first attached (loads up device - (converted into analogue by DAC)
(ii)
(c) monitoring
Cable length is limited to 5 metres any one from:
Sensor values are compared to stored
values
Transmission speed is limited to 480 megabits/second - to sound
If of range, comput er sends signal
(Mbps) - out
alarm (etc .).
USB support may not be available for very long when
using older devices or earlier operating systems
Cambridge IGCSE Computer Science Revision Guide
control
any one from:
- Sensor values are compared to stored values
- If out of range, computer sends signal to later the
process to bring values into line
- Output affects the input.
3 Phishing - do not open emails if sender is unknown to you
Hacking - use of passwords
Viruses
- use of firewalls
- anti-virus software
- don't download from unknown websites
O' 3 >
War driving - secure Internet connections using passwords
Fraud - use of data encryption
4 Laserjet printer - printing colour brochures (b) W D F A
- high speed, high quality, colour 0 0 0 0
printing possible 0 0 1 1
dot matrix printer - printing invoices, quality control
0 1 0 1
sheets in a factory
0 1 1 0
- no need for high quality, can
produce 'carbon copies', can work in 1 0 0 1
damp and dusty atmospheres 1 0 1 0
3D printer - computer-aided design 1 1 0 1
- can produce solid working models
1 1 1 0
relatively cheaply.
5 7 ( a) 0 0 1 0
Type of processing where the 0 1 1 1
output can influence the input
field 0 0 11
(b) 1 4 9
(c) 9 9 9
(d) - No need to interpret an instrument
Space allocated to an item of
information; data items that
- Easier to read E
interrupt
make up a record 8 (a) Binary = 1 10 0 10 10
Hex =BA
(b) (i) 10 0 10 111
\
Answers to questions
A
Cambridge IGCSE Computer Science Revision Guide
input money
total £ total + money
* 0.9
*
$
• Calculate average height until total = cost
• Output OUTSIDE the loop for x £ 1 to passengers
• Input INSIDE the loop print ticket
N
next x
\
nm
Radio frequency identification (rfid), 109 Using flowcharts to solve problems, 68-72
Random access memory (RAM), 3, 145-146 Using pseudocode to solve problems, 87-89
Read only memory (ROM), 146
Real time process control, 158 Validation, 110-113
Real time transaction processing, 158 Verification, 113-115
Records, 56, 122 Video conferencing, 7, 139, 151
Robotics, 16-17 Virtual reality, 12, 130
Viruses, 7, 30, 33-34
Search engines, 21 Voice over Internet Protocol ( VoIP), 8-9
Sensors, 11-18, 109, 123, 130, 131, 139, 142, 158, 183 Voice recognition, 143, 198
Shoulder surfing, 35
Smart cards, 110, 198 Wardriving, 64
Social networking sites, 23 Web browsers, 35-36, 21, 24-25, 38-39
Solid state memories, 128, 147, 153 Wikis, 23
Spam, 36 WIMP, 6
Specialist input/output devices, 144 Word processors, 140
K
Acknowledgements
r
Cambridge IGCSE® Computer Science
Revision Guide
David Watson and Helen Williams
Key Features
• Clear and concise explanations of the essential content.
• Introduction consisting of different types of questions and
techniques for writing answers to focus students’ revision efforts.
• Key points, tips and notes for avoiding common errors and
wm,
improving examination skills. it
linnI
ISBN 978 - 1 -
ENDORSED BY
SI CAMBRIDGE
W International Pvo
9 781 1 7 6 9 6 3 4 1 >