[go: up one dir, main page]

0% found this document useful (0 votes)
549 views146 pages

Computer Studies Support Booklets

These five booklets cover the CIE computer studies syllabus theory. Each booklet contains exam-type questions that could be used for revision or practice exams. While the booklets provide examples on each topic, they should not be used as a sole source of information and good teaching is still needed. The booklets will be regularly reviewed to ensure the latest technological advances are included.

Uploaded by

Sashi Gamage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
549 views146 pages

Computer Studies Support Booklets

These five booklets cover the CIE computer studies syllabus theory. Each booklet contains exam-type questions that could be used for revision or practice exams. While the booklets provide examples on each topic, they should not be used as a sole source of information and good teaching is still needed. The booklets will be regularly reviewed to ensure the latest technological advances are included.

Uploaded by

Sashi Gamage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 146

Computer Studies Support Booklets

These five booklets cover the CIE computer studies syllabus theory (0420/1,
7010/1). They should be used in conjunction with the appropriate syllabus
topic.

Each booklet also contains exam-type questions. The questions could be


used either for revision or in timed tests to give students experience at
answering questions under examination conditions.

Whilst there are several examples on each topic, it is not envisaged that
students would use these booklets as their sole source of information. These
booklets don’t replace good teaching and should be used as an additional
resource together with text books and web-based knowledge systems.

Since computer studies, by its very nature, is a rapidly changing subject these
booklets will be reviewed on a regular basis to ensure they contain the latest
technological advances. Teachers of the subject are encouraged to keep
abreast of the latest developments in computing and apply their new
knowledge in the teaching of this subject. Students should find computer
studies both exciting and stimulating and it is hoped that these booklets will
help students in their thirst for knowledge and encourage further learning.
Booklet 1

This covers the following topics found in section 1 of the computer studies
syllabus:
Item Topic
1 Computer aided design
2 Virtual reality systems
3 Monitoring and control
4 Embedded web technology
5 Robotics
6 Global positioning satellite (GPS) systems
7 Expert systems
8 The internet
9 Simulations
10 Training and entertainment systems
11 Computer based training
12 Communications (including video conferencing)
13 Intranets
14 Further applications
15 Problems based on section 1 topics
Booklet 2

This covers the following topics found in section 2 of the computer studies
syllabus:

Item Topic
1 Feasibility study
2 Analysis
3 Design
4 Implementation
5 System maintenance and evaluation
6 Project tools
7 Systems flowcharts
8 Problems based on section 2 topics
Booklet 3

This covers the following topics found in section 3 of the computer studies
syllabus:

Item Topic
1 Common flowchart symbols
2 Writing flowcharts to solve problems
3 Dry running of flowcharts
4 Problems based on flowcharting
5 Pseudocode
6 Writing algorithms using pseudocode
7 Problems based on pseudocode
8 Introduction to logic
9 Description of common logic gates
10 Combinations of logic gates
11 Problems based on logic
Booklet 4

This covers the following topics found in section 4 of the computer studies
syllabus:

Item Topic
1 Automatic data capture
2 Validation techniques
3 Check digits
4 Verification techniques
5 Files
6 Binary data
7 Word processors
8 Desk top publishing (DTP)
9 Spreadsheets
10 Databases (DBMS)
11 Authoring software
12 “Off the shelf”/bespoke software
13 Macros
14 Problems based on section 4 topics
Booklet 5

This covers the following topics found in section 5 of the computer studies
syllabus:

Item Topic
1 Hardware
2 Computer memories
3 External storage systems
4 Credit cards and smart cards
5 Sensors
6 Operating systems
7 Batch processing
8 Real time systems
9 Network topology
10 Multimedia applications
11 Problems based on section 5 topics
Booklet 1

This covers the following topics found in section 1 of the computer studies
syllabus:
Item Topic Page numbers
1 Computer aided design 2
2 Virtual reality systems 3
3 Monitoring and control 5
4 Embedded web technology 6
5 Robotics 6
6 Global positioning satellite (GPS) systems 7
7 Expert systems 9
8 The internet 11
9 Simulations 14
10 Training and entertainment systems 17
11 Computer based training 18
12 Communications (including video conferencing) 19
13 Intranets 21
14 Further applications 21
15 Problems based on section 1 topics 23

1
CAD is used in the design and development of new products in a variety of
applications both at home and on a commercial/industrial basis. Examples of
typical
CAD applications include:

- aerospace
- architecture
- car/vehicle design
- construction (e.g. roads, services, surveying, tunnels, bridges, etc.)
-This consumer
booklet goods (e.ga kettles,
contains numbertoasters, etc.) of computer applications and ties in
of examples
-withdigital circuits
-section
factory
1 oflayouts1.1 Computer-Aided
(e.g.
the computer ergonomics) Design (CAD)
studies syllabus.
- fashion design
- garden/landscape gardening
- heating systems
- interior designs (houses, offices, etc.)
- lighting systems (e.g. to get lighting effects at a concert)
- machinery design
- plant design (chemical, nuclear, etc.)
- ship building

CAD systems usually require considerable processor power and a number of


input
and output devices; for example:

- large screens
- light pens
- devices such as trackerballs, mouse and graphics tablets
- plotters to draw scale and full size drawings
- high specification graphics cards
- spacemouse/spaceball
- some systems support stereoscopic drawings where 3D spectacles can be worn
and the user sees a 3D image

The features usually found in a CAD package include:

- wire frame
- 2D and 3D modelling
- library of parts which can be used in new drawings
- validation and verification of designs against original specification
- ability to link with computer-aided manufacture (CAM)
- facility to calculate the mass of the actual object once built
- facility to calculate the cost of producing the article
2
There are many advantages and disadvantages of using CAD rather than
manually
producing drawings using pen and paper:

advantages of CAD disadvantages of CAD

- it is easier to modify drawings - risk of deskilling


- a library of parts can be kept - high training costs to use packages
- ability to do automatic costings - can move work overseas
- ability to model the design - one CAD operator can do work of 5
- can do ergonomic study manual draftsmen

Developments
This is an artificial 3D environment created by
1.2 Virtual Reality a computer system. Very often the
(VR)
user wears data goggles, data helmet or data gloves to give a feeling of “being
there”. Apart from feeding sensory input to the user, these devices also monitor user
CAD packages can now be linked to 3D ink jet printers which produce
actions e.g. data goggles track eye movement and respond by sending new video
input.
an actual
prototype model by building up slices/layers in fine powder (e.g. resin)
As indicated above, a number of devices are used to interface with virtual reality
systems. These can be summarised below:
which are
Data goggles/helmets – these use display screens and optical systems that send 3D
bonded
images to thebyeyes. an
Motionadhesive
sensors measurefrom theandprint
the position head.
orientation of the The models produced
head; this information is sent back to a computer which enables it to adjust the image
actually
being sent to work.
the user. Data gloves, suits containing sensors and joysticks are all
used to interface with a virtual reality system depending on the application.

This saves
The CAVE time
is a VR systemand
which money
provides the since
illusion ofan
3D actual prototype
by projecting images on doesn’t need to be
the walls and floor of a room. Participants wearing data goggles can enter the room
made.
and freely walk about. Sensors in the goggles and in the room continually track the
participants’ position and adjust the images based on this information.

(
3 projectors )
Areas of use
Entertainment Used in films/television as special effects (e.g. the “holodeck”
in Star Trek: The Next Generation and the Brazilian tv show
Conquista da Titã where the studio audience wear VR helmets
in a space simulation). Virtual reality is also used in many
computer arcade games.

Marketing Used in virtual tours around houses and hotels, kitchen


designs, ergonomics, etc.

Training Areas of use include: military training, medical/dental training,


teaching personnel how to use equipment and in general areas
where training is dangerous and/or expensive e.g. flight
simulators, car driving simulators, operating devices under
water or in outer space, etc.

Design Design of chemical and nuclear plants, ergonomic studies (e.g.


factory layouts), helping to develop devices for handicapped
How we create virtual reality images
people, etc. for use on a computer system

When a virtual tour of, for example, a house is shown on a website the images need
to be first created and then manipulated. The following summarises how this can be
done (a similar method/technique could be used for various applications):

- take photos with, for example, a digital camera


- the photos are taken from a single point (reference point)
- the camera is rotated around the room as a number of photos are taken
- the images are “stitched” together using special imaging software
- photo images are re-sized and re-configured for Internet use
- use hotspots on the web page to allow a user to move around the house (e.g.
from room to room). Integrate plans and maps into the image to allow user to
navigate the house.
- developments such as broadband, large computer memories and compression
software have allowed virtual tours to be offered on the Internet and/or CD/DVD
files.

Advantages of using virtual reality

- it is safer (since techniques can be tried out in advance without the dangers of the
real operation e.g. maintaining a nuclear plant where it is possible to try a task on
a computer first to learn how to do it; if mistakes are made the results would be
harmless; e.g. doing a medical task on a “virtual” patient is much safer in case of
mistakes, etc.)
- cost savings (no need to build the real thing which could save large sums of
money e.g. testing out a real moon buggy or building a part of a chemical plant
would be very expensive).
- it is possible to do tasks which would normally be impossible (e.g. walking inside a
nuclear reactor, doing a task in outer space, etc.)
- there is a feeling of “being there” which makes the training more realistic and can
allow a number of very realistic scenarios to be tested out e.g. how to deal with an
emergency on a chemical plant which could be made to be really realistic!! 4
1.3 Monitoring and control
Examples of use

Monitoring hospitals (monitoring patient’s vital signs), chemical and nuclear plants
(monitoring key parameters), burglar alarms (monitoring for intruders),
etc.

Control traffic lights (controlling the sequence of lights to maintain optimum


traffic flow), chemical and nuclear plants (opening and closing valves,
safety systems, etc.), etc.

How it is done

- sensors gather information from the application being monitored or controlled


- the data being gathered is often analogue in nature and therefore requires
translating into digital using an analogue to digital converter (ADC) to enable the
computer or microprocessor to “understand” and process the data from the
sensors
- the computer or microprocessor will compare the incoming data with the data
values stored in memory
- if monitoring, the computer/microprocessor system will warn the user in the form
of a sound (e.g. a siren if a burglar alarm, a loud beeping sound if monitoring
patients in a hospital) and/or read outs (e.g. heart rate trace in hospital monitoring
system, temperature reading on a chemical plant).
- if a control system, the computer will send a signal to a device which will be
converted to analogue using a DAC (analogue to digital converter); actuators are
usually employed to operate devices like valves, heaters, etc.
- the device will be instructed to switch on or off (e.g. if controlling a central heating
system, if temperature > set temperature a heater will be switched off and/or a
cooling fan switched on; if the temperature is below the set point then the heating
will be switched on and/or a cooling fan switched off)
- the computer/microprocessor system will continually monitor the data coming from
the sensors
- in chemical and nuclear plants, there is often a combination of monitoring and
control taking place. Information from sensors is often displayed on a control
panel where operators can see key values and alarm conditions (e.g. if a system
monitors temperatures and 1100C is the normal temperature and 1200C is the
alarm temperature, the control panel will show normal, present and alarm values
in the form of read outs – either the computer will automatically take action if
necessary or the operator will take action (i.e. over-ride the system if necessary).

5
Why is this done?

Monitoring and control using computers/microprocessors is often done


for the
following reasons:

- it is safer (faster response to non-standard conditions and they don’t


get tired and
miss key data)
- computers work 24/7 (even though humans can work in shifts there is
This isthea new1.4technology
always Embedded Web Technology (EWT)
that uses the Internet in real time to
danger of missing
control/interact withinformation
a at shift handover etc.)
-device
computers whichare more accurate
contains an embedded and cansystem/microprocessor.
take more frequent readings The (e.g.
user
if
needs to be
readings need
authorised to doto bethistaken
and every 30 seconds,
can control a device humans can make
anywhere mistakes
using a web
or miss (e.g.
browser
readings
from or evenorfind
a computer evenit aimpossible
mobile phone to take
which readings at such short time
is web-enabled).
intervals)
-Example:
data can be Anautomatically
oven containsdisplayed an embedded and analysed
processor. without
The the needcan
owner to
enter
use a data
web- 1.5 Robotics
manually
ready mobile phone(which in itself could introduce
anywhere to control errors theinto the system)
oven remotely. By
Robots can contain embedded processors or be linked to a computer system. They
accessing a web
are pre-programmed to do site
a specific task or “taught” to remember instructions from a
he is able to send instructions to control the oven.
human operator carrying out the task manually e.g. teaching a robot to spray a car
with paint. In summary:

- the robot is programmed with a series of instructions which enable it to carry out a
Itseries
is possible
of tasks to control any device in this way if it contains an embedded
- alternatively, an operator manually carries out a series of tasks which are relayed
processor
back to the robot; these instructions are remembered so that the robot can carry
e.g.
out the television,
tasks automatically DVD player/recorder, washing machine, scientific

experiments in and sensors. The sensors gather information so that the


Robots rely on processors
robot knows it is alright to do the task (e.g. is a car in position to be sprayed, is there
remote areas
an obstruction such
to prevent as outer
the robot doing itsspace.
task, if the robot is spraying a car has the
supply of paint run out, etc). They are capable of doing some pseudo-intelligent
tasks (e.g. different sized cars to be painted) but essentially any non-standard routine
is better dealt with by human beings. 6
Advantages of using robots

- they are capable of working in conditions hazardous to humans


- they can work non-stop; they don’t need a break
- less expensive in the long run since robots don’t need to be paid any
wages
- generally more productive (can usually do a given task in a shorter
time than a
human)
- not necessarily more accurate than humans, but the standard of work is
certainly
more consistent
- removes the need to do boring, very repetitive tasks leaving humans
free to do the
1.6 Global Positioning Satellites (GPS)
more skilled work such as quality control etc.

Disadvantages of using robots

- they can find it difficult to deal with “unusual” circumstances e.g. a


door is
missing from a car waiting on the paint spraying line
- tend to reduce labour requirements (therefore causing unemployment)
-Global
since robots take over many of the tasks done by humans de-skilling is
positioning satellite (GPS) systems are used to determine the exact location
of a car, airplane, ship or any conveyance which travels from one place to another.
aInreal risk
vehicles these systems are often referred to as satellite navigation systems (sat
nav).
- work can be done anywhere, therefore factories can be moved to
Satellites in outer space transmit signals to the Earth. Computers in vehicles (e.g.
anywhere in the
car, airplane or ship) receive and interpret these signals. Positioning depends on
world
very (again aatomic
accurate timing – cause for
clocks are unemployment risks)
used because of their accuracy to within a
fraction of a second per day. Each satellite transmits data indicating its position and
time. The computer in the vehicle calculates its location based on the information
from at least three satellites (in the case of airplanes, it is also possible to determine
the height as well as position); this can be shown diagrammatically as:

7
satellite 1 Exact location
of vehicle

satellite 2
satellite 3

In motor vehicles the system is called satellite navigation (sat nav).


The on board
computer contains pre-stored road maps. The vehicle’s exact
location, based on
satellite positioning, can be shown on the map; the driver can then
The blue dot shows the
be given verbal position of the vehicle
on a map projection in
directions e.g. “turn left into Pendle Road” OR Theasatscreen
the vehicle. nav
High Street
output
system will show the
showing the vehicle blue dot moving
indicating the exact
moving on the map: position of the vehicle.
Pendle Road

Morson Road

Dean Street

Sat Nav Map


This is far safer since a driver of a vehicle doesn’t have to consult maps whilst
driving. It also removes error (e.g. going the wrong way down a one-way street). Sat
nav systems can also give additional information such as position of speed cameras,
estimate time of arrival, etc. GPS can now be used to monitor a vehicle’s position if it
has broken down (additional safety feature) or has been stolen (known as vehicle
tracking system).

In airplanes GPS can also pinpoint its exact location in case of an accident which
enables search teams to quickly respond to the incident. 8
What can go wrong?

- maps not up to date therefore instructed to carry out an incorrect


manoeuvre (e.g.
turn into a road which no longer exists)
- unless the system is very sophisticated, road closures due to accidents
or road
works will cause 1.7problems
Expert Systems to a sat nav system
-These
signal
systemsloss candeveloped
have been causetoproblems with
mimic the expertise andGPS systems
knowledge of an
expert in a particular field. For example:
- potential interferences from external sources (major problem on
aircraft)
- prospecting for oil or minerals
- diagnosing a person’s illness
-- diagnostics
incorrect (e.g.start
findingand end
faults in a carpoint keyed
engine, finding into
faults system
on a circuit board,(!!!)
etc.)
- tax and financial calculations
- complex “thinking” tasks such as chess
- route scheduling for delivery vehicles
- identification of plants, animals and chemical compounds (for example)

The Basic System

A basic expert system is made up of the following elements:

Explanation system
Working
Store

User
Interface Inference Engine

Knowledge
Base
(Knowledge Base) Editor

Expert System Shell


(Note: The Working Store contains the Facts and Rule Base)
9
Setting up an Expert System

- information is gathered from experts in the field


- the knowledge base is created
- information gathered from experts is added to the knowledge base
- the rule (base) is created
- the inference engine is created
- the user interface is designed/created (often use Yes/No options or multichoice)

The system, once set up, needs to be tested using data with known outcomes to see
if it functions correctly.

If it is being used to diagnose faults, the expert system will output the probable fault
and how to rectify/deal with the problem. Usually a % probability of the accuracy of
the diagnosis will be given so the end user can decide whether or not to accept the
recommendations.

How does it work?

Consider this set of questions?

Q: Do you know which car you want?

A: No
Q: Is there any make of car you would prefer?
A: No
Q: Do you want 2 doors?
A: No
Q: Do you want high performance?
A: Yes
Q: When you have a big engine, do you need a manual gearbox?
A: Why?
The system uses a rule base and an inference engine together to simulate human
reasoning when analysing a problem and arriving at a conclusion. To simulate
human processes it is necessary to have a vast amount of information stored in the
knowledge base and the reasoning set out as a set of rules in the rule base.

In the above example, the response Why? came up since the user wanted to know
the Expert System’s thought processes. The system would give the possible
response “I am trying to find the make of car you require. Up to now, coupes are not
likely. It is possible that saloon cars are a likely option. I know that you like high
performance which gives me strong evidence that the car should include a manual
gearbox”.

how areis dealt


The above with. Inference
how an Explanation System mightRules usequestions
work where an if-statement
like why or and a then-statement.
This
A rules base is made up of many such inference rules and the inference engine
gives Expert Systems the ability to find solutions to diagnostic and prescriptive
uses
problems.
these to draw
Then
Foritsexample:
the
conclusions.
car you want is probably a Maserati Quattroporte
If the make of car includes high performance and you want Italian style
10
Web sites need to be set up to maximise information supplied to customers and to
ensure they are as helpful and self-contained as possible. If customers are
continually telephoning or contacting the company by email then the web site
Advantages
isn’t of expert systems
being effective as it should. The following general features should be found on
-most
provides consistent answers
-web sites“forgets”
never in one form
to or
askanother (this list
a question in isdetermining
by no meansthe
exhaustive):
logic
- reduces the time taken to solve a problem
- shopping basket
-- less skilled
secure work
site when force
using needed, therefore
credit/debit cards potentially can save money
- “when customer bought X, they also bought Y” facility
Disadvantages
- search facility of
forexpert systems
artist/tile/item ……
- drop down boxes to choose categories
-- lacks common sense
help facilities/how to getininsome
touchof thethe
with decision making
company processes
if a problem exists
-- currency
errors in converters for international
the1.8knowledge
The internet
customers
base can lead to incorrect decisions being
-made
date/sales confirmation by automatic email
-- saved
cannotcustomer details/customised pages
adapt to changing environments unless the knowledge base is
- ability to track status of orders
continually
- ability to listen to/view/see video/see product ……..
-updated
recognise customer as soon as they log on
- expensive system to set up in the first place
-Whenneeds considerable
designing training
web pages to ensure
it is necessary systemtheused
to supply correctly
correct by
spacing for
operators
customer
information (and/or use drop down menus), buttons to navigate to other web
pages,
etc.

Search Engines

The most effective way of finding information on the internet is to use a search
engine. However, it is just as easy to use these inefficiently as well as efficiently.

When a search condition is entered, inclusion of statements such as AND (or +


sign)
and OR will help narrow down the search. Also, the use of quotes (“ “) can also
help. If these are not used, many irrelevant (and sometimes unwanted!!) results
(known as hits) can be displayed by the search engine. For example:
11
Type in: CIE and the search engine would return
about 22 million hits

Type in: CIE+sample papers and the search engine would return
about 1.2 million hits

Type in: CIE+sample papers+ICT and the search engine would return
about 6,500 hits

Security

When using the Internet, security can be enhanced using encryption. Credit and
debit card transactions can also be protected by a special type of password control.
For example, if a user chooses the password COMPUTE34 to protect their credit
card, when they buy something over the internet the card issuer will ask the user an
additional question such as: “Please type in the 2nd, 4th and 7th character of your
password in the following boxes:

The user will then type in O P E and the card purchase will be authorised. This
additional protection is used as well as encryption.

Some of the new systems use a chip and PIN card which is slotted into the
keyboard
and is used as additional security. The user slots the card into the side of the
keyboard and is required to type in a PIN before the Internet can be accessed.
This
gives an additional level of security since it is necessary to have the card, know
the Positive aspects for society Negative aspects for society
PIN
Shops associated with
and banks are open 24/7the card
Close down AND also know
of shops/banks the user’s log in id and password!!!
in city centres
Access to shops and banks is worldwide Increased risk of fraud/hacking
Less pollution since less travelling Less personal service/more impersonal
How
Disabledsociety
people areisnot
affected
disadvantaged Loss of jobs due to closures of
(no need to travel) shops/banks
Busy people can shop/bank when they Less social interaction between people –
Buying goods
want and where theyand
want services (e.g. banking) over
just sit at home the
using internet has
computer both positive and
negative
If you live inaspects on itsociety.
a remote area, is much TheseLess canactivity
be summarised
for people – leadsbelow:
to a less
easier to access shops/banks healthy/overweight population
Less expensive
In general, (cost savings
increased to shop/ has led to many
use of computers Less of
environmentally friendly
the above affects since more
. Other
bank + more competition –
aspects to consider include: savings are goods sent out by post – waste from
passed on to the customer) packaging significantly increases
- deskilling of the work force (e.g CAD has taken over draftsman skills, word
processors have taken over many office-based duties, etc.)
- the need to re-train the workforce in the use of new software/computers. 12
Computer systems have allowed companies to set up call centres in other
countries
where potential cost savings can be made. This, of course, can lead to job losses
in
the host country. The main advantages to companies adopting call centres
overseas includes:

- if strikes or other problems occur in one country it is possible to transfer work


elsewhere
- reduced costs in countries where labour costs are lower
- reduced costs due to incentives/grants by countries keen to set up call centre
offices
- round the clock customer support (one of the advantages of time differences is
the possibility of 24/7 cover)

There are, of course, disadvantages to having call centres overseas:

- language and culture problems


- animosity to overseas call centres (leading to loss of customers)
- need for extensive re-training
Problem which is time consuming and expensive
Safeguard
- Hacking
time differences
Use of passwords(can
and idslead to health
to prevent problems
illegal access to files. in call centre work force who
need to Also locking the computer itself or locking the computer
room can help here. Encryption stops the information
work unsocial hoursbeing to target
read evenkey markets)
if access has been gained to a file but
won’t stop hacking!!
- technology (does the infrastructure exist to service high tech equipment?)
VirusesUse
(also
of see
ant-virus
note software and firewalls to prevent viruses
1 below)
entering a computer. It is also sensible not to open emails/
General Security Issues attachments from “unknown” sources; it also helps to only
Corruption/Loss of load software from disks/cds which are originals
Data can occur in a
Many
number ofissues
ways: exist when linking a computer system to the Internet or indeed to
- viruses
any
- hackers - viruses can be protected against as described above
external link via a network
- accidental damage - as aboveset (alsoup. There
see note are ways of guarding against this. The
2 below)
- accidental damage is best guarded against by keeping
following is a list ofbackpotential problems and ways of protecting against the
up files or use the Grandfather-Father-Son (GFS)
problems:
- hardware faults
method; also use of passwords and ids can help by
restricting access in the first place
- protection against hardware faults could be to keep back
ups or use GFS; use of UPS (in case of power loss) and
- software faults - keeping back up files or using GFS would help here
parallel system also help
- incorrect computer operation
- backing up files would incorrect
guard against
power
problems
down
13 ofcaused
the system
by
Note 1: Viruses don’t just infect computers, they can also affect mobile
phones, MP3
players etc. – any device which can download files from a source such as
the internet
is potentially at risk.

Note 2: Backing up may allow files that have become lost/corrupted (due
to hacking
or viruses) to be reinstated; however, this would not recover the system
1.9 Simulations
nor would it
To demonstrate
prevent how a simulation
hacking/viruses can abesystem
affecting developed for first
in the use inplace.
a real situation the
following example has been chosen. The scenario chosen is a series of traffic
lights
Note 3: Other problems such as spam, pop ups, cookies, etc. are more of
at two busy junctions:
a nuisance
(although they can considerably slow down the operation of a computer
system) and
can be blocked or made inactive (since they can become active without
the user’s
In this simulation it is necessary to consider:
knowledge) using suitable software.
(1) how and what data is gathered
(2) how the simulation is done
(3) how the system would work in real life
(4) why simulations are done
(5) other examples of simulations

(1) How and what data is gathered

To make this as realistic as possible, data needs to be gathered over a long period of
time. This can be done by sensors in/near the road, using cameras or manual data
collection. Data gathered includes:

- count the number of vehicles passing in all directions at each junction …..
- ….. at a particular time of day
- count how many cars build up at a junction before lights change
- is it a week day or weekend or bank holiday
- how long it takes to clear vehicles at a junction
- other data (e.g. pedestrian crossings)
- time for largest/slowest vehicle to pass through a junction
- other factors (e.g. filtering of traffic to the right or left) 14
(2) How the simulation is done

The data is entered into the computer and the simulation is run. The following
scenarios may be tried out:

- timing of lights varied to see how the traffic flow is affected


- build up number of vehicles stopped at a junction and change timing of lights
to
see how it affects the traffic flow
- increase/decrease traffic flow in all directions to see how the traffic is affected
- try out the impact of accidents
- consider passage of emergency vehicles
- effect of adding in pedestrian crossings
- once the simulation is run, the timing of the lights is determined and how they
interact so that the maximum traffic flow is achieved; fault scenarios (e.g. an
accident) and their impact are considered

(3) How the system would work in real time

- sensors in/near the road gather data (these can be light/infra red sensors,
induction loops, pressure sensors, etc.) – the data is usually number of vehicles
passing a particular point
- the data is sent to a control box or computer system
- the gathered data is compared to data stored in the system (the stored data is
based on simulation runs, how the number of vehicles at a junction at a
particular time of day affects the traffic flow, etc.)
- the control box or computer “decides” what course of action to take and …..
- ….. sends signals to the traffic lights to change timing if necessary
- as with any system involving sensors, ADC and DAC interfaces may be needed

(4) Advantages of carrying out simulations

- saves cost (rather than doing the real thing)


- safer (scenarios tried out on the simulation first before used in reality)
- possible to try out various scenarios in advance
- some environments make simulations the only way to carry out a task
beforehand
(e.g. outer space, under sea, chemical processes, nuclear reactors, crash testing
cars, etc.)
- faster (no need to build and test real system, so it is possible to get results more
quickly)

(5) Other examples of simulations 15


Another example of simulation is predicting weather (i.e. a weather forecaster).
In
this case we will consider how/what data is collected, how the simulation is done
and
consider how it can be used in predicted possible climate changes. We won’t
consider stage (3) here (how the system works in real time) since this simulator
doesn’t control anything and stages (4) and (5) above will be the same.

(1) How and what data is collected

- sensors measure pressure, temperature, relative humidity, wind speed and wind
direction
- sensors are placed in weather balloons and/or weather stations
- information is also got from satellites
- pilots also send in information regarding weather conditions during long flights

(2) How the simulation is done

- information from the sensors/satellites sent to computer


This shows isobars
- this data is compared to information stored on files …..
tracking across part
of Europe. A
- ….. which contain known weather patterns fromcomputer the past simulation
- ….. predictions are made based on these comparisonswill show how areas
of pressure change
- produces weather maps showing isobars, temperatures,
with time soetc.
it is
- computer can show graphically how weather (e.g. cloud formations) will
possible to predict
rainfall, strong winds
change etc. in advance
with time (i.e. predict weather patterns) – this is often presented as a computer-
generated video showing how clouds build up, how temperature and pressure
changes over, for example, the next 7 days, wind speeds etc.

This shows clouds


tracking across the
Earth. A computer
simulation will show
how the clouds
patterns will change
with time so it is
possible to predict
16rainfall etc.
- it is also possible to do statistical analysis and predict the percent
probability that
certain weather conditions will occur.

(3) How future environment/climate changes can be predicted

- information over time is fed into a climate/weather model


- based on changes in weather patterns, carries out a statistical
prediction
- model is able1.10 to change
Trainingparameters
and Entertainment to see how future climate can be
affected
Music
- needs to review a lot of previous data over a number of years to check
ifComputer
andchanges
hardware and software advances have changed how music is generated
produced. Some of the key reasons for this have been summarised below:
are genuine or just cyclical
- actual musical notes can be generated from the music itself by software
-- music
over, forandexample
samplers mixers give an20 years,
almost limitlesspredictions compared to actual climate
ability to alter the original
tracks recorded in a studio
conditions to
- software can automatically correct notes
validate/further refine the model
- don’t need to understand music notation to write a musical score
- electric instruments (such as guitars and organs) play back through electronic
- effects
canmachines
make use of spreadsheets and statistical software packages
- synthesisers combine simple wave forms to produce more complex sounds
- electric organs can now mimic almost any instrument (including a full orchestra!!)
- automatic rhythm
- music notes automatically printed out in the correct format

There are many other software and hardware developments; the above is just a
summary of the more common elements.

Animation/Cartoons in Films and Video/Television

Computer animation is the art of creating moving images via computer hardware and
software.

For 3D animation, objects are designed on a computer and a 3D skeleton is


produced. The limbs, mouth, eyes, etc. are moved by the animator using key frames
(these define the start point and end point of a smooth transition to make the
animation as realistic as possible).

The differences in appearance between key frames are automatically calculated by


the computer – this is called TWEENING or MORPHING. The animation is finally
RENDERED (i.e. turned into a realistic image).
17
Computer animation uses a technique called avars (animation variable)
where the
starting point is usually a series of stick figures; e.g. Toy Story used over
700 avars
(1 avar = position of each feature e.g. the mouth). Successive sets of
avars control
all movement of the animated character. Once the stick model is moving
in the
required way, avars are incorporated into full wire frame models.
Finally, surfaces
are added requiring a process called rendering (i.e. turned into a realistic
image).

There are several ways of generating avar values to get realistic


movement. One
way is to use markers on a real person (or whatever is being animated)
acting out a
part and track the movements by video camera. Alternatively, avars can
be
CBTset makes use of a computer system to train people in a number of
manually using
applications. It a joystick. Software produces a level of quality for
movie
makes animation
use of multimedia and self-assessment with minimum input
that
needed fromtake
would a many years to produce by hand and would employ
several
human trainer.
cartoonists/animators. This all saves considerable time and money to the
film
The and
advantages1.11 of training
Computer people using computer systems (such as
Based Training
television producers.
CBT) include:

Avatars
- traineesare
cananother
work atexample
their ownofspeed
animation. These are often used to
represent
- traineespeople
can learn when they want
either in 3-D (as
- it is possible toused in sections
re-run computer ofgames) and in
the training 2-D (asifused
program in internet
necessary
message
- possible to come back at any time/pause training program at any point
boards).
- user getsSome avatarsassessment
immediate are animated consisting of a sequence of images
of performance
played oneto include multi-media elements in the training package
- possible
after
- no the
needother.
to have a teacher/classroom – potential cost savings therefore
possible
Ultimately,
- it is easieranimators
to keep upwant to create a human image which moves and
to date/amend
interacts with
its background in such a away that the viewers 18
can’t tell if a particular
Video Conferencing

Video conferencing continues to grow in popularity. Why is this? Some of the


reasons are listed below:

- communication links are now much faster therefore images, sound quality etc.
are
now far better
- safety reasons 1.12
(increase in world-wide terrorist activity, frequent travelling, etc.
Communications
are
all risks to company employees if they have to travel to meetings)
- costs (the money saved on not having to travel, accommodation costs, lost time
to the company whilst employees are out of the office travelling to meetings,
etc.)
- improvements to the work/general environment (employees can work from
home,
less travel means less stress to employees but also means less pollution, disabled
employees are no longer disadvantaged, etc.)
- because of the above, it is possible to hold a meeting at short notice

The hardware and software needed to run video conferencing is very


sophisticated.
Apart from the obvious items (i.e. large screen, computer and devices such as
mouse, etc.) the following briefly describes what is needed to have a video
conference:

- delegates speak into a central microphone


- webcam takes a video image
- delegates hear speech through loud speaker system at each venue
- the system uses internet/WAN/modem to transmit data
- requires use of compression software for video/audio signals
- systems may use CODEC (which converts and compresses analogue data into
digital data for sending down digital lines)
- requirement for echo cancellation software (this allows talking in real time and
keeps communications synchronised)
- video images and audio are seen/heard in real time on large monitors/through
loud speakers

Electronic Mail (email)

Another form of communication is through email. This has the following


advantages
over video conferencing: 19
The following is a simple description of how the email system works:

- the sender composes a message (and attaches a file if required) and


sends it
- this message is sent to an ISP (Internet Service Provider) mail server
- the mail server examines the address associated with the message and
decides
how to route the message
- the message travels over the internet arriving at the recipient’s ISP mail
server
- the message is then held in the recipient’s electronic mail box
- to read the message, the recipient logs on to their mail server
- the message is then retrieved and sent to the recipient’s computer

Wireless Technology (WiFi) and Broadband

Most areas in the world now offer broadband rather than dial up for
connecting to the
internet. The advantages of broadband over dial up include:

- the system is always “on”/no need to dial into ISP every time you want
access
- the connection rate/data transfer rate is much higher (for example
broadband
operates at 11 000 kbps compared to the dial up rate of 60 kbps)
- there is a flat monthly rate with broadband (dial up is charged per hour
of usage)
- it is possible to use the telephone at the same as the internet with
broadband/the
line isn’t tied up
- broadband permits other facilities such as “skype”/VOIP

Wireless technology (WiFi) allows connection of a computer to the


Internet without
the need for connecting cables. A router (containing a modem and
external aerial) is
connected to a telephone line and it is then possible for any computer
within range to 20
Many companies 1.13 use
Intranets
intranets as well as the internet. The simple
definition is “An
intranet is a computer network based on internet technology, that is
designed to meet
the internal needs for sharing information within a single
organisation/company”. The
main reasons for doing this include:

- safer since there is less chance of external hacking or viruses


- it is possible to prevent employees from accessing unwanted web sites
- companies can ensure that the information available is specific to their
needs only
- it is easier to send out “sensitive” messages to remain within the
company only
The notes in sections 1.1 to 1.13 cover a number of computer applications. These
Some comparisons between internet and intranet include:
are by no means exhaustive1.14sinceOther
the list ofapplications
possibilities is almost endless. The
following section chooses a sample of another application which is useful to study. It
considers how supermarkets use bar codes in their automatic stock control systems.
It would have been equally valid to consider library systems, administration systems
- the INTERNET is INTERnational NETwork
(e.g. in a hospital), banking systems, burglar alarm systems or passports/id cards.
- an INTRANET is INTernal Restricted Access NETwork
Centres would be advised to consider all of these as a knowledge of computer
systems is built up.
- the intranet only gives local information relevant to the
Sample Application – Automatic Stock Control System in a Supermarket
company/organisation
--identification
it is possible to block access to certain sites using the intranet
bar codes are attached to all goods/items sold by the supermarket as a means of

-- eachit bariscodenot always


is associated with anecessary to have
stock file on a computer databaseexternal modems when using
- the customer takes their basket/trolley to the POS terminal
intranets
- the bar code on the product is scanned at the point of sale (POS) terminal
--manually
if the bar code can’t be read, the POS operator has to key in the bar code number
information for usepadon intranets is stored on local servers
using a keyboard/key
--- the
thebarinternet canforbe
code is searched accessed
on the database from anywhere
once the bar code is identified/found, the appropriate file/record is accessed
-- thethe internet
price of the good/item isis found
available toto the
and sent back anyone,
POS whereas the intranet requires
- the stock level of the item is reduced by 1
password entry
- if the stock level is less than or equal to the re-order/minimum stock level then the
-- this
theprocedure
intranet is behind a firewall
system automatically re-orders goods/items from the suppliers
is repeated until all the items in the customer’s basket/trolley have
been scanned
- when all items/goods have been scanned, the customer is given an itemised bill
showing a list (with prices) of everything they have bought 21
- the computer also updates the files containing the daily takings
- if the customer has a loyalty card, the system automatically updates their points
total
- when new goods arrive, the bar codes are used to update the stock files
- some newer supermarkets now allow customers to scan their own
basket/trolley
and pay for the items/goods using credit card or cash (essentially the stock
control
system is the same for both methods)

22
1.15 Problems

A list of examination-based problems now follow. These can be used as revision


questions or centres can use the questions to make up their own assessments to
give candidates practice under examination conditions.

(1) (a) Give three features you would expect to see in a typical Computer
Aided Design (CAD) package.

(b) A company uses CAD to design a child’s toy. Give two advantages of
using CAD in this application.

(2) (a) What is meant by virtual reality?

(b) A hotel decides to offer a virtual tour of its facilities on a web site.

(i) Describe how images are created and processed for use in the
virtual tour.

(ii) What features would you expect to see on the virtual tour web
site?

(c) Give two other applications of virtual reality.

(3) (a) A large house with eight bed rooms is to be protected by an intruder
surveillance system (burglar alarm).

Describe how sensors and a microprocessor would interact to monitor


for intruders and sound an alarm if a break in occurs.

(b) Describe the main differences between a computer being used in a


monitoring application and a computer used in a control application.

(4) Robots are being used to spray some metal parts.

(a) Describe two problems the robot might encounter and how these
could be overcome.

(b) In general, what are the advantages of using robots rather than human
workers in manufacturing industries?

23
(5) A bus has been fitted with a Global Positioning Satellite (GPS) navigation
system (sat nav).

(a) Describe how the sat nav computer calculates the exact location of the
bus.

(b) How does the sat nav system indicate to the bus driver the correct
route that needs to be taken to reach the required destination?

(c) What are the advantages to the bus driver of having GPS installed?

(6) An expert system is to be created to identify chemical compounds.

(a) Describe how the expert system would be set up and made ready for
use.

(b) Explain the function of the Explanation System which forms part of the
expert system.

(7) (a) Describe four security issues associated with linking a computer to the
internet. How is it possible to guard against each of these security
issues?

(b) Describe the differences between the internet and an inranet.

(8) A supermarket has decided to model queues at the check outs using
simulation software.

(a) Describe how data is collected for the simulation/model.

(b) Describe how the simulation/modelling is carried out.

(c) Describe the advantages of using a simulation.

(d) Give two other uses of simulations.

(9) Describe how computer hardware and software are used to create animation
effects in films and television programmes.

(10) (a) Describe how it is possible to have a video conference between


delegates in two different countries.

(b) Give the main reasons why video conferencing has become
increasingly popular.

24
1(a) The features found in a typical CAD package include:

- wire frame Booklet 1 – answers and hints


- 2D and 3D modelling
- library of parts which can be used in new drawings
- validation and verification of designs against original specification
- ability to link with computer-aided manufacture (CAM)
- facility to calculate the mass of the actual object once built
- facility to calculate the cost of producing the article
- features such as rotation, colour, zoom, etc.
- simulation of designs without the need to build a prototype
- create engineering drawings from solid models
- import and export to allow the exchange of data with other software
packages
- kinematics (i.e. check moving parts in assemblies don’t interfere with each
other)
- routing of cables and hoses

(b) Any of the following advantages could be quoted:

- easier to modify drawings of the toy


- toy can be built up from library of parts
- possible to cost final toy automatically
- easy to try colour variations etc.

2(a) Definition points:

- artificial 3D environment …..


- ….. created by a computer
- users wear data goggles, data helmets, data gloves or suits fitted with
sensors
- devices monitor user actions (e.g. data goggles track eye movement and
system responds by sending new video input)

(b) (i) Stages in the creation of images

- takes photos with a digital camera


- photos taken from a single, reference point
- camera rotated around the room as a number of photos taken
- images “stitched” together using imaging software
- photo images re-sized and re-configured for Internet use

(ii) Expected features:

- hot spots on web page to allow user to move around the hotel
- plans and maps integrated to allow user to navigate the hotel
- ability to move from room to room to navigate whole hotel

(c) There are many applications; examples include:

- special effects on films/television


- arcade games
- training (military, medical, etc.)
- design (e.g. nuclear and chemical plants 1
3(a) Interaction between sensors and microprocessor:

- sensors around the house would gather information


- e.g. has a light beam been broken
- has pressure pad detected excess pressure
- has infra red beam detected excess heat
- has acoustic sensor detected any noise such as breaking glass
- data translated into digital using an ADC (analogue to digital converter)
- microprocessor/computer will compare signal from sensor with stored info
- e.g. signal that light beam is broken
pressure > stored “normal” value
heat level > stored “normal” value
acoustic level > “stored” normal value
- if any values are outside normal range, microprocessor/computer sends a
signal to an alarm and/or flashing light
- system also automatically sends signal to police/security company
- since the house is large, sensors will be in zones; therefore computer will
indicate on a control panel the zone where intruder broke in

(b) Differences between monitoring and control:

Monitoring: - computer system takes information from the sensors


compares the data with stored values
- warns/informs the user of status either by read outs or alarms

Control: - computer system takes information from the sensors


- compares the data with stored values
- sends signals to devices to open/close, on/off etc.
- output from system can affect next input

4(a) Problems associated with robotics:

- out of paint (sensors in paint reservoir to indicate low paint levels)


- something in path of robot (sensors used to detect presence of an object)
- is item in correct position (sensors to ensure item present and in position)
- is item present (as above)

(b) Advantages of using robots rather than humans:

- they can work in conditions hazardous to humans


- robots don’t need breaks (capable of working non-stop)
- they are less expensive in the long run since don’t need any wages
- more productive (do same task faster than a human being)
- work is of a more consistent standard
- removes need for a human to do boring, repetitive tasks

2
5(a) How satellite navigation systems can be used to calculate a vehicle’s
position

- satellites in outer space transmit signals to the Earth


- computers in the bus receive and interpret these signals
- the satellite relies on very accurate timing (atomic clocks)
- each satellite transmits data indicating position and time
- computer in bus calculates its position based on received satellite data
- at least three satellites are used to give the bus its exact position

(b) How the bus driver uses the satellite navigation system:

- the computer has a number of pre-stored maps


- bus location shown on appropriate map
- directions are given verbally or on-screen output (on a map)

(c) Advantages to the bus driver of using this system:

- it is generally safer (driver doesn’t need to consult maps whilst driving)


- error reduction (e.g. can’t go the wrong way down a one-way street)
- if the bus breaks down/involved in accident, its exact position is known to
facilitate recovery (especially in remote areas)
- system can warn driver of speed cameras, road works, etc.

6(a) Setting up an Expert System:

- gather information from experts


- create/design a knowledge base
- gathered information from experts is added to the knowledge base
- rules (base) is created/designed
- inference engine is created/designed
- user interface is designed/created
- fully tested using known chemical compounds

(b) The function of the Explanation System:

- if a user can’t answer one of the Expert system questions, the Explanation
System will come up with a response to try and explain its “thought process”

7(a) Security issues and how to guard against them:


3
(b) Differences between intanet and internet:

- internet is INTERnational NETwork


- intranet is INTernal Restricted Access NETwork
- intranet only gives local information relevant to the company
- can block access to certain sites using intranet
- intranet data stored on servers with restricted access
- internet can be accessed by anyone from anywhere
- intranet requires passwords etc.

8(a) Collecting data for the model:

- counts number of people at checkouts ….


- …. at each time of day and each day of the week
- count how many people build up at the checkouts
- …. is it a weekday, weekend or bank holiday
- how long does it take to serve a customer
- other data (special offers)

(b) Carrying out the simulation:

- number of checkouts opened and see how flow of people affected


- build up number of customers at checkout, open extra checkouts and see
how it affects time to be served, etc.
- increase/decrease number of customers and observe the affect
- once simulation is run, number of checkouts needed is determined ….
- … and interaction with customers is determined so that optimum throughput
is achieved
- look at fault scenarios (breakdown of equipment etc.)

(c) Advantages of simulations (in general):

- cost savings (e.g. no need to crash test several cars)


- it is possible to try out various scenarios in advance
- quicker to get results (no need to build and test a real system)
- it is possible to test systems which would take years to obtain “real” data
(e.g. environmental/weather predictions)

(d) Other areas where simulations can be used:

- training
- running/testing chemical and nuclear plants 4
10(a) Video conferencing:

- delegates speak into central microphone


- webcam takes video images in real time
- delegates hear speech through loud speaker system
- system uses internet/WAN/broadband modem to transmit data
- requires use of compression software/CODEC
- need for echo cancellation software

(b) Reasons for the popularity of video conferencing:

- safety reasons (increase in terrorism, frequent travelling are all risks)


- communications links are now much faster (better images etc.)
- costs (money saved on travelling, accommodation, costs of lost time whilst
employees are out of the office, etc.)
- improvements to workers (e.g. can work from home, less stress from driving/
travelling to work, doesn’t disadvantage disabled, etc.)
- pollution aspects (e.g. less traffic (car and air))
- flexibility – ability to call a meeting at short notice

5
Booklet 2

This covers the following topics found in section 2 of the computer studies
syllabus:

Item Topic Page numbers


1 Feasibility study 2
2 Analysis 2
3 Design 4
4 Implementation 5
5 System maintenance and evaluation 7
6 Project tools 8
7 Systems flowcharts 9
8 Problems based on section 2 topics 11

1
Systems Analysis

A systems analysis team is often brought in to improve on an existing system.


Frequently this involves moving from a paper-based filing system to one which is
computerised. The following revision notes describe some of the key stages in a
systems analysis study.

Many of the topics are covered elsewhere (such as how to choose hardware,
2.1 Feasibility Study
validation techniques, testing, etc.).
This involves writing a report to convince management of the merits of adopting
the
proposed new system. Some
• Terms aspects
of reference: of the study include:
- objectives
- boundaries
- constraints
• Description of the existing system (including any problems and the projected
costs)

• Criteria (essential requirements and desirable features of the proposed


system)

• Solution (including development plan and cost/benefit analysis)

If the feasibility study is accepted then the systems analyst moves to the
next stage
which is a full analysis of the system.
2.2 Analysis
The analysis involves some or all of the following stages:
• Fact finding – this is usually done in four ways (see page 2)

• Understanding the current system

• Produce data flow diagrams

• Identify the user requirements

• Interpret the user requirements

• Agree the objectives with the user

• Collect data from the current system


2
Fact finding
Observing the existing system first hand

This involves watching the personnel using the existing system to find out
exactly how it works. There are a number of advantages and disadvantages
Questionnaires
of using this method to gather information about the existing system:
This involves sending out questionnaires
- it is possible to to
seethe work
exactly force
what and/or
is being done to
customers to find out-their
this isviews of the existing
an inexpensive system and
method compared to find out how
to other
Advantages - the analyst
some of the key taskstechniques
obtains reliable data
are carried out. As with observation, there are a
number of advantages and disadvantages in using this technique:
Disadvantages - people are generally uncomfortable being watched and
may work
Advantages in a different
- questions beway
canthey
- what answered quickly
are watching may not be representative of
- an inexpensive way of gathering data afrom a day’s
typical largework
number
- if workers perform tasks that violate standard procedures,
of people
they may not do this when being watched!!
- allows individuals to remain anonymous
- it is quick to analyse data

Disadvantages - number of people returning questionnaires is often quite


low
- questions asked tend to be rather inflexible
- no immediate way to clarify a vague/incomplete answer to
a question
- it is difficult to prepare a good questionnaire

Interviewing

This involves a one to one question and answer session between the analyst
and employee/customer. A good method if the analyst wants to probe deeply
into one specific aspect of the existing system. As with the previous method,
there are a number of advantages and disadvantages:

Advantages - opportunity to motivate the interviewee to give open and


free answers to the analyst’s questions
- allows the analyst to probe for more feedback from the
interviewee (easier to extend a topic than it is when using
questionnaires)
- can ask modified questions or questions specific to the
interviewee based on previous responses

3
Disadvantages - can be a very time consuming exercise
- can be expensive to carry out
- unable to remain anonymous
Looking at existing paperwork

This allows the analyst to see how paper files are kept, look at operating
instructions and training manuals, check accounts, etc. This will give
the
analyst some idea of the scale of the problem, memory size
requirements, 2.3 Design
type of
Once theinput/output devices
analysis has taken needed,
place and theand so on.
systems Theyhaswill
analyst someoften
ideagain
of the
information not obtained by any of the other methods described above.
scale of the problem and what needs to be done, the next stage is to design the
However, it can be a very time consuming exercise.
key
parts of the recommended system. The following is a list of tasks that are usually
• design the data capture forms/input forms
done (this is by no means an exhaustive list):
• design the screen layouts

• design output forms and reports

• produce systems flowcharts and/or pseudocode

• select/design any validation rules that need to be used

• select the most appropriate data verification method(s)

• file structures/tables need to be designed/agreed

• select/design the hardware requirements for the new system

• select/design the software requirements

• produce any algorithms or program flowcharts

• design a testing strategy/plan

4
- how to load/run 2.4the software
Implementation
- howthe
Once to “final”
save files
system has been designed it is then necessary to put together the
- how to do a search
hardware and software and introduce the new system. There are many stages in
- how to sort data
this
- how to do
complicated
• produce print outs there are two basic types here to consider:
theprocess:
documentation;
- how to add, delete or amend records
- the purpose ofUser thedocumentation
system/program/software package
- screen layoutsthis (input)
usually consists of:
- print layouts (output)
- hardware requirements
- software requirements
- sample runs (with results and actual test data used)
- error handling/meaning of errors
- troubleshooting guide/help lines/FAQs
- how to log in/log out

Technical documentation

this usually consists of:

- program listing/coding
- programming language(s) used
- flowchart/algorithm
- purpose of the system/program/software
- input formats
- hardware requirements
- software requirements
- minimum memory requirements
- known “bugs” in the system
- list of variables used (and their meaning/description)
- file structures
-it issample runs (with results and actual test data used)
necessary to develop a proper testing strategy to ensure all possible
-scenarios
outputareformats
covered and that
• install theallhardware
error trapping
and, iftechniques
necessary, are
the fully tested;
new software
-include:
forvalidation
example if rules
inputting data to represent somebody’s age, the test plan
0, 5, -2, fred, 3.5, 215, 85 etc. to see whether each piece of data is
may
• fully test the new system once installed
correctly dealt with; test data often falls into 3 types: 5
normal data

- this is data which is acceptable/valid and has expected outcomes (for


example, if a date is being input the day should be in the range 1 to 31)

abnormal/erroneous data

- this is data outside the limits of acceptability/validity and should cause


an
error message to be generated (for example, if a date is being input the
day can’t be -1 or 50 etc.)

extreme/boundary data
change over is usually• done in staff
train the one toofuse
four
the ways; the following
new computer system notes
- this is data at the limits of acceptability/validity
summarise these methods and gives advantages and disadvantages of all(for
the example, if a
techniques:
date is
• transfer the paper files across to the new system; this may involve the
following:
being
direct input, the
changeover two values at the extreme limits of valid days would be
1- scanning in the documents
-with
andkeying
this in the data
31)technique, the old system is stopped and the new system is used
-straight
createaway;
databases etc. to allow downloading of files etc.
• changeover to the new system

- this method can be disastrous if the new system fails at any point
- however, the benefits are immediate and less time is wasted
- costs are reduced (only one system in use so save on staff costs)
- less likelihood of a malfunction since the new system will have been fully
tested

parallel

with this technique, the old and new systems are run together for a time

- if the new system goes down for any reason, you still have the old system
to fall back on so a failure wouldn’t be disastrous
- it is possible to gradually train staff/time to get used to the new system
- more expensive than direct since need extra staff to run both systems
- more time consuming since both systems need to be run and evaluated

6
pilot

with this technique, the new system is introduced into one part of the
company (e.g. into one warehouse of a supermarket) and its performance
assessed

- if the new system fails only one part is affected; the rest is still functional
- it is possible to fully train staff in one area only which is much quicker and
less costly than parallel
- the costs are also less than parallel since only one system is being used in
the pilot warehouse

phased

in this technique only part of the new system is introduced and only when it
proves to work satisfactorily is the next part introduced, and so on, until the
old system is fully replaced

- if the latest part fails, only need to go back in the system to the point of
failure; hence a failure isn’t disastrous
- more expansive than direct since it is necessary to evaluate each phase
before moving to the next stage
- can ensure the system works properly before expanding

The following table summarisesRelative


the riskscosts
involved in all four methods:
Input needed
Input Impact
needed of
byfailure
Method
by the user Systems team of method
Parallel High High Low Low
Pilot Medium Low Medium Low
Phased Medium Medium Medium Medium
Low (if
Direct Low Medium successful; High
otherwise VERY
High)

2.5 System Maintenance and Evaluation


Once a system is up and running it is necessary to do some evaluation and
carry out maintenance if necessary. This is summarised below:
• compare final solution with the original requirement
• identify any limitations in the system
• identify any necessary improvements that need to be made
• evaluate the user’s responses to using the new system
• compare test results from new system with results from the old system
• compare performance of new system with performance of old system
• update hardware as new items come on the market or the company changes
(text
• update
in blue software
refers
in anytoway
if
evaluation
necessary
which
introduced
requires
and
if company
text
which
new
in green
affects
devices
structure
refers
how
to changes
be
to
theadded/updated
maintenance)
company
or legislation
operates
7 is
2.6 Other information
Tools

Systems analyst have a number of tools to help them in carrying out their work.
Since many of their projects are for big companies it is necessary to keep track of
costs, resources and time. The following are only mentioned as a basic
introduction and a guideline for further study:

- Gantt charts show - all stages/tasks to be done


- the critical path(s)
- key project milestones
- number of days to do tasks
- progress on tasks as % complete
- progress versus expected time to do work
- how tasks are all linked together
- Gantt charts allow emailing of tasks/project info to others automatically
- Gantt charts allow use of the intranet/email facility to post or download
project information to others
- Gantt charts permit the use of PERT charts (A PERT chart is a type of
chart used for project management; it represents each task of a project
as a box (circle or rectangle), arrows between tasks are used to show
the sequence and task dependencies (i.e. which tasks need to be
complete before others can start).

Below is a sample of a project summary using a Gantt chart:

Typical Gantt chart showing some aspects of project management


8
System flowcharts

System flowcharts are used to show how all the components in a system link
together (e.g. input, storage, output, processing, etc.). They are very different to
normal flowcharts since they don’t go into detail of how something is actually done –
they are a general overview. The table below shows the most common system flow
chart symbols:

Online storage
Connector Magnetic Tape
(a on
(files stored linkhard
to or discs,
from another
part of diagram)
etc)

Terminator
Visual Display Unit
(Start and end of the flow
Data processing
(Monitor) diagram) operation

Merge
Document output (e.g. join two files
Manual input
(printed hard copy) together)
(e.g. keyboard)

Sort Communication line


Collate (e.g. telephone line)
(alphabetical, chronological,
numeric)

Connector, off-page.
Hard disk (file)
(link from this diagram to Input/Output operation
another diagram)

A simple example of a systems flowchart is shown below:

9
START

Member’s Membership data


application form keyed in

Write raw data to Member


member file file

Write sorted
data to member Member
file file

Back up Back up file to


file magnetic tape

STOP

10
2.7 Problems
(1) (a) A systems analyst was brought in to computerise a paper-based car
sales system. What methods could be used to gather data about the
existing system? Give reasons for your choice.

(b) What would need to be done before the new computerised system
became “live”?

(c) Why would PILOT and PARALLEL change over methods be suitable
in this application?

(2) A program is written to input daily temperatures. Name three types of test
data that could be used. Give examples of each type of test data which could
be used and discuss the outputs you would expect to get.

(3) Name five tasks that would be carried out at the DESIGN stage in systems
analysis.

(4) Name four methods used to change over from a manual system to a new
computerised system. Discuss the relative advantages and disadvantages of
these four methods.

(5) Describe how the effectiveness of a new computer system can be assessed.

(6) What tools exist to help the analyst draw up an action plan and ensure that
the project is completed on time and to budget?

(7) What information would a systems analyst need to gather to decide on what
hardware is required for a new computerised system?

(8) What five items need to be included in the USER GUIDE and in the
TECHNICAL GUIDE of a newly developed computerised system?

(9) Choose six symbols used in systems flow charts and explain what each
symbol means.

11
(10) A company selling CDs and DVDs presently uses a manual, paper-based
system to keep track of:

- stock levels
- files containing CD and DVD information
- sales information

The company has shops in five major cities.

When a customer comes into the shop s/he goes to the desk and either asks
the assistant to find a particular CD/DVD. The shop assistant locates the files
for the item the customer has requested and,

(i) checks if it is stock


(ii) checks the price of the CD/DVD
(iii) finds where the CD/DVD is in the shop
The system is to be computerised. The following will be created:
If the customer has already found the CD/DVD in the shop s/he takes it to the
desk
(i) alland the DVD
CD and shop data
assistant
will befinds
storedthe
on aitem file to check for its price. The
database
(ii) all items for sale The new system
customer pays for will
the have
CD/DVDa bar code
andonthethem
following then happens:
(iii) a sales file will be set up
(iv) a database will be created showing supplier and customer details
- shop assistant fills out a sales receipt and puts it into a file
- Aatcustomer
the endgoesof the
intoday, all the
the shop andsales
finds aare recorded
CD/DVD s/heand thetonumber
wants buy. Theof
each
shop item in
assistant stock
scans is updated
the bar code on the item and the CD/DVD details have
-been found
if the including
number of its price.areThe
items lowstock files arefor
a request updated
new (i.e. 1 isisreduced
stock filled out
- the value of the day’s sales are recorded in an accounts book.for
from the number in stock) and the takings file updated. The stock levels
that item are checked and an automatic order is sent out after accessing the
supplier database.

If the customer has requested the assistant to find a particular CD/DVD the
assistant keys in the name/artist and finds out if the item is in stock, where it
can be found and it’s price (the next stage is the same as above). If the item
isn’t in stock, the assistant takes the customer details and updates the
database and adds a request for the item to be ordered and this is added to
the customer’s file.

12
(a) Draw the systems flow charts to show how the above system
will work.

(b) Discuss the advantages of the new computerised system when


compared to the manual paper-based system.

(c) Why would the new system reduce the shop’s costs?

13
Booklet 2 – answers and hints

1(a) Methods for gathering information: Advantages of method:

- observation - reliable data


- see exactly what is done
- inexpensive method

- questionnaires - fast method of data gathering


- inexpensive method
- individuals can be anonymous
- quicker to analyse data

- interviewing - easier to motivate interviewee


- gives the opportunity to expand on
answers given by interviewee
(NOTE: could also include focus groups here) questions
- can ask specific

- look at existing paperwork - look at how files are kept


(b) What to do before making system live: - what is kept in files
- look at training manuals
- produce user documentation and - check company
technical accounts
documentation
- can decide on file size, memory
- install hardware and software requirements, devices needed, etc.
- fully test the new system
- train the staff to use the new system

(c) Reasons for choosing Pilot and Parallel:

- Pilot (could introduce system in one section of car dealership or, if a large
chain, introduce the whole system in one of the car dealerships and see how
it performs before rolling out to all the other dealerships in the chain)
- Parallel (could run the two systems together to make sure it works alright)

2 Types of test data:

- normal (e.g. 15 – you would expect this data to be accepted since 150C is a
reasonable temperature)
- abnormal (e.g. -500, 200 – you would expect an error message since -2000C
or -5000C are not reasonable temperatures)
- extreme (e.g. -40, 50 – you would expect these extreme values (boundaries
of acceptability) i.e. -400C and 500C to be accepted as boundary values.
6
3 Design stage tasks:

- design data capture forms


- design screen layouts
- design output forms/layouts
- produce systems flowcharts and/or pseudocode
- select/design validation rules
- select most appropriate data verification method(s)
- design file structures/tables
- select/design hardware (requirements)
- select/design software (requirements)
- produce algorithms/program flowcharts
- design testing strategy/plan

4 Advantages andParallel
Direct disadvantages of changeover techniques:
Pilot Phased
- disastrous if - more expensive - if new system - if new system
new system fails than direct since fails can easily go fails can easily go
- immediate two systems in back to point back to point
benefits felt operation at the where system where system
- reduced costs same time failed failed
(only one system - more time - less expensive - less expensive
used) consuming than parallel than parallel
- less likelihood - still have old - can train staff - can train staff
of failure since system if new while system while system
fully tested system fails being introduced being introduced
- can gradually in stages in stages
train staff while - can ensure - can ensure
both systems are system works system works
running together before expanding before expanding

5 Assessing the effectiveness of the new system:

- compare final solution with original requirements


- identify any limitations in the system
- identify any necessary improvements that need to be made
- evaluate user responses to using the new system
- compare test results from new system with results from old system
- compare performance of new system with performance of old system
- effectiveness of the hardware
- effectiveness of the software
7
6 Tools to ensure project completed on time and to budget:

- use of Gantt charts to show all the tasks


- use of Gantt charts to show critical paths
- use of Gantt charts to show key project milestones
- use of Gantt charts to show:-
- number of days to do the tasks
- progress as percent completed
- progress versus expected time to do work
- how tasks are linked together
- allows the emailing of tasks/project information to others automatically
- use of Gantt charts allow use of the intranet/email facility to post or download
project information to others
- Gantt charts allow use of PERT charts (each task in the project is represented
and shows sequence and dependencies)

7 Information needed to decide on the hardware requirements:

- how much printing will be done


- memory size requirements (e.g. for files)
- size and resolution of monitors (e.g. will large drawings be shown on
screen?)
- input and output requirements (e.g. scanners, mouse, etc.)
- portability requirements
- will disabled people be using the hardware?
- does it need to be compatible with existing systems?
User Documentation Technical Documentation
- how to load/run software - program listing/coding
- how to save files - program language(s) used
- how to do a search - flowcharts/algorithms
8- howItems
to sort needed
data in User Documentation
- purpose ofand Technical Documentation
system/program/package
- how to do printouts - input formats
- how to add/delete/amend records - minimum memory requirements
- purpose of system/program/package - known “bugs” in the system
- (input) screen layouts - list of variables used
- (output) print layouts - file structures
- hardware requirements - hardware requirements
- software requirements - software requirements
- sample runs (with results) - sample runs (with results)
- error handling/meaning of errors - output formats
- how to log on/log out - validation rules
- verification techniques

8
9 Systems flowchart symbols

Connector
Online storage Magnetic Tape
(files stored(aon
linkhard
to ordiscs,
from another
part of diagram)
etc)

Terminator
Visual Display Unit
(Start and end of the flow Data processing
(Monitor) diagram) operation

Merge
Document output (e.g. join two files
Manual input
(printed hard copy) together)
(e.g. keyboard)

Sort Communication line


Collate (e.g. telephone line)
(alphabetical, chronological,
numeric)

10(b) Advantages of the new system:


Connector, off-page.
Hard disk (file)
(link from this diagram to Input/Output operation
- easier/faster to search for items
another diagram)
- improved stock control
- automatic stock control is possible
10(a) - see page 10 for system flowchart for the new system
- less space taken up in filing system
- less expensive (fewer staff, etc.)
- no need to price individual items
- able to offer items on the internet

(c) Reduced costs:

- refer to above advantages


9
START

Sample solution
stock items put – others
updated
exist
on d/base stock
d/base

scan bar code

item Yes
show
found? details

No

key in
information

No Yes
item show
STOP details
found?
STOP

Item bought by item in


customer stock?

stock
file
update stock file
update takings file

takings
file
stock level Yes
re-order supplier
< reorder file
item
level

No
Yes stock?
new 10
No STOP
Booklet 3

This covers the following topics found in section 3 of the computer studies
syllabus:

Item Topic Page numbers


1 Common flowchart symbols 2
2 Writing flowcharts to solve problems 3
3 Dry running of flowcharts 9
4 Problems based on flowcharting 13
5 Pseudocode 18
6 Writing algorithms using pseudocode 20
7 Problems based on pseudocode 25
8 Introduction to logic 28
9 Description of common logic gates 28
10 Combinations of logic gates 31
11 Problems based on logic 34

1
Booklet 3 covers the development of algorithms (both in pseudocode and
flowchart
form) and also introduces logictogates
Introduction which is a new topic from 2011.
Flowcharts
This section covers the use of flow diagrams (charts) in the production of
algorithms.
Systems flowcharts are different and these are covered in a different section
(Systems analysis).

The early part of section 3.1 (i.e. top down design, structure diagrams, menus,
This section primarily covers four areas:
libraries of procedures and subroutines) is covered adequately by standard text
books.
1 Common flow chart symbols
2 Writing flowcharts to solve problems
3 Dry running of flowcharts to determine its function and outputs
4 Exercises to test the above
1 Common concepts
flowchart symbols

1.1 The start and end box: START

END

1.2 The process box:


X=X+1

1.3 Input/Output box: Print X

1.4 Decision/query box: No 2 Is 5?


X> Yes
2 Writing flowcharts to solve problems
The following five problems are also covered in section 3.2 where the
algorithms are constructed using pseudocode. Candidates may choose to
answer questions using either flowcharts or pseudocode but a working
knowledge of both
2.1 techniques
Example 1is well advised.
A town contains 5000 houses. Each house owner must pay tax based
on the value of the house. Houses over $200 000 pay 2% of their value
in tax, houses over $100 000 pay 1.5% of their value in tax and houses
over $50 000 pay 1% of their value in tax. All others pay no tax. Write
an algorithm to solve this problem in the form of a flowchart.

2.2 Example 2

The following formula is used to calculate n: n = (x * x)/(1 – x). The


value x = 0 is used to stop the algorithm. The calculation is repeated
using values of x until the value x = 0 is input. There is also a need to
check for error conditions. The values of n and x should be output.
Write an algorithm to show this repeated calculation in the form of a
flowchart.

2.3 Example 3

Write an algorithm in the form of a flowchart which takes temperatures


input over a 100 day period (once per day) and outputs the number of
days when the temperature was below 20C and the number of days
when the temperature was 20C and above.

2.4 Example 4

Write an algorithm in the form of a flowchart which:


• inputs the top speeds (in km/hr) of 5000 cars
• outputs the fastest speed and the slowest speed
• outputs the average (mean) speed of all the 5000 cars

2.5 Example 5

A shop sells books, maps and magazines. Each item is identified by a


unique 4 – digit code. All books have a code starting with 1, all maps
have a code starting with 2 and all magazines have a code starting with
3. The code 9999 is used to end the algorithm.

Write an algorithm in the form of a flowchart which inputs the codes for
all items in stock and outputs the number of books, number of maps and
the number of magazines in stock. Include any validation checks
needed. 3
START

count = 1

Example 1

Input
house

Yes
Is house> tax = house *
200000 0.02

No

Yes
Is house> tax = house *
1000000 0.015

No

Yes tax = house *


Is house>
50000 0.01

No

Tax = 0

print tax

No
count = Is count
count + 1 < 50001 END

Yes

4
START

Example 2

input X

is x = 0 Yes
? END

No

is x = 1 Yes
output
? “error”

No

n = (x*x)/(1-x)

output n, x

5
START

count = 1
total1 = 0, total 2 = 0
Example 3

input temp

is temp Yes
total1 = total1 + 1
< 20 ?

No

is temp Yes
total2 = total2 + 1
> 19 ?

No

count = count + 1

is count output
< 101 ? total1, total2 END
Yes No

6
START

Example 4
fastest = 0
slowest = 1000
total = 0

count = 1

input topspeed

is Yes
topspeed > fastest = topspeed
fastest ?

No

is Yes
topspeed < slowest = topspeed
slowest ?

No

total = total +
topspeed

END

count = count + 1
Output fastest,
Yes is5001
count? < 7 No slowest,
average average
=100/5000
total *
8
START

books = 0, maps = 0,
mags = 0 Example 5

input
code END

Yes
Is code = output books,
9999? maps, mags

No

Is 999 < Yes


books + books + 1
code < 2000

No

Yes
Is 1999 < maps = maps + 1
code < 3000

No

Yes
Is 2999 < mags = mags + 1
code < 4000

No

output
“error”

9
3 Dry running of flowcharts

Dry running of flowcharts is basically a technique to:


• determine the output for a known set of data to check it carries out the
task correctly
• check on the logic of the algorithm
• determine the function of the algorithm

When dry running a flowchart it is advisable to draw up a trace table


showing
how variables change their values at each stage in the algorithm. The
• if you make a mistake, it is easier to back track to where the error
advantages of doing this are:
occurred rather than starting from the beginning again
• there is less chance of an error being made
• encourages a more logical approach

The following three examples show all stages in the dry running for the given
set of input data:

3.1 Example 1

This algorithm inputs 3 numbers, each number goes through


successive division by 10 until its value is less than 1. An output is
produced which contains the number input and a value generated by
the flowchart processing.

Data2
3.2 Example to be used: X = 85, 3190, -40
This algorithm inputs 5 values and outputs how many input numbers
were negative and how many were positive.

Data to be used: N = 1, -5, 2, -8, -7

3.3 Example 3

This algorithm inputs the number of hours of sunshine recorded each


day for a week (7 days). The output is the highest value for hours of
sunshine and the average (mean) value for the numbers of hours of
sunshine per day.

Data to be used: hours = 9.0, 7.8, 1.2, 4.5, 10.0, 6.4, 3.1

10
START

input X Example 1

N=1

T=X

X = X/10

Is X Yes Output
<1? T,N END

No

N=N+1

Trace Table

X N T Output T, N
85 1 85
8.5 2
0.85 85, 2
3190 1 3190
319 2
31.9 3
3.19 4
0.319 3190, 4
-40 1 -40
-4 11 -40, 1
START

C=1 Example 2
neg = 0, pos = 0

Input N

Yes
Is N < 0 neg = neg + 1

No
Yes
Is N > 0 pos = pos + 1

No

C=C+1

Is C < output
5 neg, pos END

Trace Table

C N neg pos Output neg, pos


1 1 0 0
2 -5 1 1
3 2 2 2
4 -8 3
5 -7
6 3, 2

12
START

C=1 Example 3

high = 0, total = 0

Input
hours

Yes
Is hours high = hours
> high

No

total = total + hours

C=C+1

Yes
Is C < 7

No
avge = total/7 output
avge, high END

Trace Table

C hours high total avge Output avge, high


1 9 0 0 6
2 7.8 9 9
3 1.2 10 16.8
4 4.5 18
5 10 22.5
6 6.4 32.5
78 3.1 38.9
4213 6, 10
4 Problems
Questions 1 to 7 are problems which require an algorithm to be written in the
form of a flowchart. Questions 8 to 10 require a trace table to be written and
find the expected output for the given set of data. The answers to these
questions can be found in booklet 6.

(1) Regis lives in Brazil and often travels to USA, Europe and Japan. He wants
to be able to convert Brazilian Reais into US dollars, European euros and
Japanese yen. The conversion formula is:

currency value = number of Reais X conversion rate

For example, if Regis is going to USA and wants to take 1000 Reais (and the
exchange rate is 0.48) then he would input USA, 1000 and 0.48 and the
output would be: 480 US dollars.

Write an algorithm, using a flowchart, which inputs the country he is visiting,


the exchange rate and the amount in Brazilian Reais he is taking. The output
will be value in foreign currency and the name of the currency.

(2) As part of an experiment, a school measured the heights (in metres) of all its
500 students.

Write an algorithm, using a flowchart, which inputs the heights of all 500
students and outputs the height of the tallest person and the shortest person
in the school.

(3) A geography class decide to measure daily temperatures and hours of


sunshine per day over a 12 month period (365 days)

Write an algorithm, using a flowchart, which inputs the temperatures and


hours of sunshine for all 365 days, and finally outputs the average (mean)
temperature for the year and the average (mean) number of hours per day
over the year.

(4) A small shop sells 280 different items. Each item is identified by a 3 – digit
code. All items that start with a zero (0) are cards, all items that start with a
one (1) are sweets, all items that start with a two (2) are stationery and all
items that start with a three (3) are toys.

Write an algorithm, using a flowchart, which inputs the 3 – digit code for all
280 items and outputs the number of cards, sweets, stationery and toys.

14
(5) A company are carrying out a survey by observing traffic at a road junction.
Each time a car, bus or lorry passed by the road junction it was noted down.

10 000 vehicles were counted during the survey.

Write an algorithm, using an algorithm, which:


• inputs all 10000 responses
• outputs the number of cars, buses and lorries that passed by
the junction during the survey
• outputs the number of vehicles that weren’t cars, buses or
lorries during the survey

(6) Speed cameras read the time a vehicle passes a point (A) on the road and
then reads the time it passes a second point (B) on the same road (points A
and B are 100 metres apart). The speed of the vehicle is calculated using:

100
speed = (metres/sec)
(time at point B – time at point A)

The maximum allowed speed is 100 kilometres per hour. 500 vehicles were
monitored using these cameras over a 1 hour period.

Write an algorithm, using a flowchart, which:


• inputs the start time and end time for the 500 vehicles that were
monitored
• calculate the speed for each vehicle using the formula above
• outputs the speed for each vehicle and also a message if the speed
exceeded 100 km/hour
• output the highest speed of all the 500 vehicles monitored

(7) There are ten stations on a railway line:

1 ------ 2 ------ 3 ------ 4 ------ 5 ------ 6 ------ 7 ------ 8 ------ 9 ------ 10

The train travels in both directions (i.e. from 1 to 10 and then from 10 to 1).
The fare between each station is $2.

A passenger inputs the number of the station at the start of his journey and
the number of the destination station and the fare is calculated (e.g if a
passenger gets on a station 3 and his destination is station 9 his fare will be
$12). The calculation must take into account the direction of the train (e.g. a
passenger getting on at station 7 and getting off at station 1 will also pay $12
and not a negative value!!).

A discount of 10% is given if 3 or more passengers are travelling together.


15
Write an algorithm, using a flowchart, which:
• inputs the number of passengers travelling
• inputs the station number of the starting point and the station number
of the destination
• calculates the total fare taking into account the direction of travel
• calculates any discount due
• outputs the cost of the tickets and prints the tickets

(8) Draw the trace table and determine the output from the following flowchart
using the following data:

number = 45, -2, 20.5

START

input
number

X=0

T = number

number = number - 10

X=X+1

Is Yes output X,
number number
No < 10

16 END
(9) Draw the trace table and determine the output from the following flowchart
using the following data (NOTE: input of the word “end” stops the program
and outputs results of the survey):

vehicle = car, car, lorry, bus, van, van, car, car, bus, car, end
START

car = 0, bus = 0, lorry = 0,


others = 0

input
vehicle

Yes output car,


is vehicle
= end bus, lorry, END
others

No

Yes
is vehicle
= car car = car + 1

No

Yes
is vehicle bus = bus + 1
= bus

No

Yes
is vehicle
= lorry lorry = lorry + 1

No

others = others + 1

17
(10) Draw the trace table and determine the output from the following flowchart
using the following data:

X = 5, -3, 0, -3, 7, 0, 6, -11, -7, 12


START

neg = 0, n = 0, pos = 0, p = 0

count = 1

input X

Yes
is X < 0 neg = neg + X
n=n+1

No

is X > 0 pos = pos + X


p=p+1
Yes

No

count = count + 1

is count
<11 END
Yes

No
avge1 = neg/n output avge1,
avge2 = pos/p 18 avge2
Introduction tp pseudocode
This section covers the use of pseudocode in the production of algorithms.
Candidates should use standard computing text books to find out information on
the
features
No of programming
specific programming languages (highislevel
language and low
referred to; level), interpreters,
development of
compilers,
algorithms using
assemblers, user documentation and technical documentation.
pseudocode uses generic descriptions of looping, branching, data
manipulation,
input/output, totalling and counting techniques.

The section is broken down into four areas:


1 Common pseudocode terms
1 description of common pseudocode terms
2 writing algorithms
1.1 countingusing pseudocode
Counting
3 finding in 1sin
errors is sections
quite simple; use of the statement count = count + 1 will
of pseudocode
enable counting to be done (e.g. in controlling a repeat loop). The statement
4 exercises
literally means: the (new) count = the (old) count + 1
It is possible to count in any increments just by altering the numerical value in
the statement (e.g. count = count – 1 counts backwards)
1.2 totalling

To add up a series numbers the following type of statement should be used:

total = total + number


1.4 branching
1.3 input/output
This literally means (new) total = (old) total + value of number
There
Input andare two
output common
indicated ways
by the use of theof branching:
terms input number, output total,
print total, print “result is” x and so on.

case of ….. otherwise …... endcase

if ….. then ….. else ….. endif


19
case of if … then

case number of if number = 1 then x = x + 1


1: x = x + 1 else if number = 2 then y = y + 1
2: y = y + 1 else print “error”
otherwise print “error” endif
endcase endif

1.5 loops

There are three common ways of performing a looping function:

for … to … next, while … endwhile and repeat … until

The following example input 100 numbers and finds the total of the 100 numbers

and outputs this total. All three looping techniques are shown:

for … to while … endwhile repeat … until

for count = 1 to 100 while count < 101 repeat


input number input number input number
total = total + number total = total + number total = total + number
next count = count + 1 count = count + 1

print total endwhile until count = 100


print total print total

20
2 Writing algorithms using pseudocode
The following five examples use the above pseudocode terms. These are the
same problems discussed in section 3.1 using flow charts – both methods are
acceptable ways of representing an algorithm.

2.1 Example 1
A town contains 5000 houses. Each house owner must pay tax based on
the value of the house. Houses over $200 000 pay 2% of their value in
tax, houses over $100 000 pay 1.5% of their value in tax and houses over
$50 000 pay 1% of their value in tax. All others pay no tax. Write an
algorithm
for count to
= 1solve the problem using pseudocode.
to 5000

input house

if house > 50 000 then tax = house * 0.01

else if house > 100 000 then tax = house * 0.015

else if house > 200 000 then tax = house * 0.02

else tax = 0
Notes: (1) a while loop or a repeat loop would have worked just as well
(2) theprint taxisn’t essential in the pseudocode
use of endif

For example,

count = 0
next
while count < 5001

input house
if house > 50 000 then tax = house * 0.01
else if house > 100 000 then tax = house * 0.015
else if house > 200 000 then tax = house * 0.02

else tax = 0
endif
endif
endif
printcount
tax = count + 1
endwhile 21
EXERCISE: Re-write the above algorithm using a repeat loop and modify
the if … then … else statements to include both parts of the house price
range.

(e.g. if house > 50000 and house <= 100000 then tax = house * 0.01)

2.2 Example 2

The following formula is used to calculate n: n = x * x/(1 – x)

The value x = 0 is used to stop the algorithm. The calculation is repeated


using values of x until the value x = 0 is input. There is also a need to
check for error conditions. The values of n and x should be output. Write
an algorithm to show this repeated calculation using pseudocode.

NOTE: It is much easier in this example to input x first and then loop round
doing the calculation until eventually x = 0. Because of this, it would be
necessary to input x twice (i.e. inside the loop and outside the loop). If
input x occurred only once it would lead to a more complicated algorithm.

(Also note in the algorithm that <> is used to represent ).

A while loop is used here, but a repeat loop would work just as well.

inputwhile
x x <> 0 do

if x = 1 then print “error”

else n = (x * x)/(1 – x)

print n, x

endif

input x

endwhile

22
2.3 Example 3

Write an algorithm using pseudocode which takes temperatures input over


a 100 day period (once per day) and output the number of days when the
temperature was below 20C and the number of days when the
temperature was 20C or above.

(NOTE: since the number of inputs is known, a for … to loop can be


used. However, a while loop or a repeat loop would work just as well).

total1 = 0: total2 = 0

for days = 1 to 100

input temperature

if temperature < 20 then total1 = total1 + 1

else total2 = total2 + 1

endif

next

print total1, total2

This is a good example of an algorithm that could be written using the


case construct rather than if … then … else. The following section of
code replaces the statements if temperature < 20 then …… endif:

case temperature of

1: total1 = total1 + 1

2: total2 = total2 + 1
2.4 Example 4
endcase
Write an algorithm using pseudocode which:
• inputs the top speeds of 5000 cars
• outputs the fastest speed and the slowest speed
• outputs the average speed of all the 5000 cars
any one of the three loop structures could be used. It is necessary to set
(NOTE: values for thethe
Again since fastest
actual(usually
numberset
of at zero)
data andtothe
items beslowest
input is(usually
known set at
an unusually high value) so that each input can be compared. Every time
a value is input which > the value stored in fastest then this input value
replaces the existing value in fastest; and similarly for slowest).
23
fastest = 0: count = 0

slowest = 1000

repeat

input top_speed

total = total + top_speed

if top_speed > fastest then fastest = top_speed

if top_speed < slowest then slowest = top_speed

endif

endif

count + count + 1

until count = 5000

average = total * 100/5000

print fastest, slowest, average

2.5 Example 5

A shop sells books, maps and magazines. Each item is identified by a

unique 4 – digit code. All books have a code starting with a 1, all maps
have a code starting with a 2 and all magazines have a code beginning
with a 3. The code 9999 is used to end the program.

Write an algorithm using pseudocode which input the codes for all items in
stock and outputs the number of books, maps and magazine in stock.
Include any validation checks necessary.

(NOTE: A 4-digit code implies all books have a code lying between 1000
and 1999, all maps have a code lying between 2000 and 2999 and all
magazines a code lying between 3000 and 3999. Anything outside this
range is an error)

24
books = 0: maps = 0: mags = 0

repeat

input code

if code > 999 and code < 2000 then books = books + 1

else if code > 1999 and code < 3000 then maps = maps + 1

else if code > 2999 and code < 4000 then mags = mags + 1

else print “error in input”

endif:endif:endif

until code = 9999

print books, maps, mags

(NOTE: A function called INT(X) is useful in questions like this. This


returns the integer (whole number) part of X e.g. if X = 1.657 then INT(X) =
1; if X = 6.014 then INT(X) = 6 etc. Using this function allows us to use the
case statement to answer this question:

books = 0: maps = 0: mags = 0


repeat
input code

x = INT(code/1000) * divides code by 1000 to give a


case x of * number between 0 and 9

1: books = books + 1
2: maps = maps + 1
3: mags = mags + 1
otherwise print “error”
endcase
until code = 9999
print books, maps, mags

this is probably a more elegant but more complex solution to the problem)

25
4 PROBLEMS
Questions 1 to 3 contain sections of pseudocode which contain errors. Locate the
errors and suggest the correct coding. Questions 4 to 10 are problems which require
an algorithm to be written in pseudocode – there is “no right answer” here; as long as
the pseudocode works then the solution is acceptable.

(1) The following section of pseudocode inputs 1000 numbers and then outputs
how many were negative, how many were positive and how many were
zero.

Locate the 3 errors and suggest a corrected piece of code.

1 negative = 1: positive = 1
2 for x = 0 to 1000
3 input number
4 if number < 0 then negative = negative + 1
5 if number > 0 then positive = positive + 1
6 endif
7 endif
8 next
9 print negative, positive

(2) The following section of pseudocode inputs rainfall (in cm) for 500 days and
outputs the average rainfall and the highest rainfall input.

Locate the 3 errors and suggest a corrected piece of code.

1 highest = 1000
2 days = 1
3 while days > 0
4 input rainfall
5 if rainfall > highest then highest = rainfall
6 endif
7 total = total + rainfall
8 days = days + 1
9 average = total/500
10 endwhile
11 print average, highest

(3) The following section of pseudocode inputs a number, n, multiplies together


1 x 2 x 3 x ……. x n, calculates input number/sum and outputs result of the
calculation.

2
Locate for
the mult = 1and
3 errors to nsuggest a corrected piece of code.
3 sum = 0
41 input
sumn= sum * mult
5 result = n/sum
6 next 7 print result 26
(4) Regis lives in Brazil and often travels to USA, Europe and Japan. He wants
to be able to convert Brazilian Reais into US dollars, European euros and
Japanese yen. The conversion formula is:

currency value = number of Reais X conversion rate

For example, if Regis is going to USA and wants to take 1000 Reais (and
the exchange rate is 0.48) then he would input USA, 1000 and 0.48 and the
output would be: 480 US dollars.

Write an algorithm, using pseudocode, which inputs the country he is


visiting, the exchange rate and the amount in Brazilian Reais he is taking.
The output will be value in foreign currency and the name of the currency.

(5) As part of an experiment, a school measured the heights (in metres) of all its
500 students.

Write an algorithm, using pseudocode, which inputs the heights of all 500
students and outputs the height of the tallest person and the shortest person
in the school.

(6) A geography class decide to measure daily temperatures and hours of


sunshine per day over a 12 month period (365 days)

Write an algorithm, using pseudocode, which inputs the temperatures and


hours of sunshine for all 365 days, and finally outputs the average (mean)
temperature for the year and the average (mean) number of hours per day
over the year.

(7) A small shop sells 280 different items. Each item is identified by a 3 – digit
code. All items that start with a zero (0) are cards, all items that start with a
one (1) are sweets, all items that start with a two (2) are stationery and all
items that start with a three (3) are toys.

Write an algorithm, using pseudocode, which inputs the 3 – digit code for all
280 items and outputs the number of cards, sweets, stationery and toys.

(8) A company are carrying out a survey by observing traffic at a road junction.
Each time a car, bus, lorry or other vehicle passed by the road junction it
was noted down.

10 000 vehicles were counted during the survey.

Write an algorithm, using pseudocode, which:


• inputs all 10000 responses
• outputs the number of vehicles
cars,
thebuses
lorries
junction
that
during
and
weren’t
during
lorries
the survey
cars,
that
the27
survey
buses
passedorby
(9) Speed cameras read the time a vehicle passes a point (A) on the road and
then reads the time it passes a second point (B) on the same road (points A
and B are 100 metres apart). The speed of the vehicle is calculated using:

100
speed = (metres/sec)
(time at point B – time at point A)

The maximum allowed speed is 100 kilometres per hour. 500 vehicles were
monitored using these cameras over a 1 hour period.

Write an algorithm, using pseudocode, which:


• inputs the start time and end time for the 500 vehicles that were
monitored
• calculate the speed for each vehicle using the formula above
• outputs the speed for each vehicle and also a message if the speed
exceeded 100 km/hour
• output the highest speed of all the 500 vehicles monitored

(10) There are ten stations on a railway line:

1 ------ 2 ------ 3 ------ 4 ------ 5 ------ 6 ------ 7 ------ 8 ------ 9 ------ 10

The train travels in both directions (i.e. from 1 to 10 and then from 10 to 1).
The fare between each station is $2.

A passenger inputs the number of the station at the start of his journey and
the number of the destination station and the fare is calculated (e.g if a
passenger gets on a station 3 and his destination is station 9 his fare will be
$12). The calculation must take into account the direction of the train (e.g. a
passenger getting on at station 7 and getting off at station 1 will also pay
$12 and not a negative value!!).

A discount of 10% is given if 3 or more passengers are travelling together.

Write an algorithm, using pseudocode, which:


• inputs the number of passengers travelling
• inputs the station number of the starting point and the station number
of the destination
• calculates the total fare taking into account the direction of travel
• calculates any discount due
• outputs the cost of the tickets and prints the tickets

28
Introduction to Logic
Many electronic circuits operate using binary logic gates. Logic gates basically
process signals which represent true or false or the equivalent i.e. ON or OFF, 1
or 0

Whilst there are a number of logic gates, only the five simplest are covered in
this
booklet: NOT gate, AND gate, OR gate, NAND gate and NOR gate.
The five main logic gates
The following notes describe the function of all five gates, how to produce truth
The most common symbols used to represent logic gates are shown below. To
tables, how to design networks using logic gates, and how to determine the
avoid confusion the graphical representations will be used in exam questions but
output
candidates
1from
simple may use either
graphical set of symbols when answering questions.
representations
a logic network.

NOT AND OR NAND NOR

2 MIL symbols used to represent logic gates

NOT gate AND gate

Truth tables are used to showORlogic


gate
gate functions (refer toNAND
nextgatesection).
The NOT
gate has only one input (and one output) but the other four gates have two
inputs
(but still only one output). NOR gate

The next section describes the function of all five logic gates.
29
Description of the function of the five logic gates

The NOT gate

A NOT X A X

The output (called X) is true (i.e. 1 or ON) when the INPUT A is NOT TRUE (i.e. 0 or
OFF).

INPUT A OUTPUT X
X = NOT A 10
01

The AND gate

A A
AND X X
B
B

The output (called X) is only true (i.e. 1 or ON) if the (INPUT A AND INPUT B)
are
both true (i.e. 1 or ON). INPUT A INPUT B OUTPUT X
111
= A AND B 100
010
000

The OR gate
A A
OR X X
B B

The output (called X) is true (i.e. 1 or ON) if the (INPUT A OR INPUT B) are
true
INPUT A INPUT B OUTPUT X
(i.e. 1 or ON). 111
X = A OR B 101
011
000
30
The NAND gate

A A
NAND X X
B B

This is basically an AND gate with the output X inverted.

The output (called X) is true (i.e. 1 or ON) if (INPUT A AND INPUT B) are NOT both
true (i.e. 1 or ON).

INPUT A INPUT B OUTPUT X


110
OT (A AND B) 101
011
001

The NOR gate


A A
NOR X X
B B

This is basically an OR gate with the output X inverted.

The output (called X) is true (i.e. 1 or ON) if NOT (INPUT A OR INPUT B) are true
(i.e. 1 or ON).
INPUT A INPUT B OUTPUT X
110
NOT (A OR B) 100
010
001

The tables above containing 1s and 0s are known as truth tables and are an
integral
part of logic gates functionality. These are used extensively throughout this
booklet
in the design and testing of logic networks built up from logic gates.
31
Combinations of logic gates

It is possible to combine logic gates together to produce more complex logic


networks.

This booklet will only deal with a maximum of three inputs and up to six logic
gates.
The output from a logic network is checked by producing the truth table (as
shown in
the examples below).
Producing the truth table from a given logic network
Consider the following logic network which contains three inputs and three logic
We will deal with two different scenarios here. The first involves drawing the
gates:
truth
table from a givenA logic network; the second
S involves designing a logic network
for a NOR
given problem and then testing it by drawing the truth table.
B
OR X

AND
T
C

If we now look at the output in two stages. First let us consider the outputs being
produced at stages S and T. To do this we need to draw a truth table. There are
three inputs (A, B and C) which gives 23 (i.e. 8) possible combinations of 1s and 0s.
To work out the outputs at S and T we need to refer to the truth tables for the NOR
gate and for the AND gate. For example, when A = 1 and B = 1 then we have 1 NOR
1 which gives the value of S = 0. Continuing doing the same thing for all 8 possible
inputs we get the following interim truth table:

A ABCST
S 11101
11000
10100
10000
01101
01000
T 00110
00010 32
The final stage involves S OR T.
STX
011
000
0 0 This
0 gives
0 0 0 final truth
the
0 1table:
1
000
101
101
X

AB CX
1111
1100
1010
1000
0111
0100
0011
0001

Designing logic networks to solve a specific problem and testing using truth
tables
Consider the following problem:
“If button A or button B are on and button C is off then the alarm X goes
To draw the logic network, we do each part in brackets first i.e. A = 1 OR B = 1 is
on”
We
one can convert this onto logic gate terminology (ON = 1 and OFF = 0):
gate then C = NOTIf (A1 =is1the
ORsecond
B = 1)gate.
AND These are then
(C = NOT joined
1) then together
(X = 1) by the
AND
(Notice:
gate. Once the logic networkrather than write
is drawn 0 wethen
we can usetest
NOT 1) a truth table.
it using
Remember the original problem – we are looking for the output to be 1 when A
or B
is 1 and when C is 0. Thus we get the following logic network and truth table
from
the network. Looking at the values in the truth table, we will be able to clearly
see
that it matches up with the original problem which then gives us confidence that
the
logic network is correct.
33
ABCX
1110
1101
1010
X 1001
AND 0110
0101
0010
0000

A steel rolling mill is to be controlled by a logic network made up of AND,


Let us now consider a second problem:
OR
and NOT gates only. The mill receives a stop signal (i.e. S = 1) depending on
the following input bits:
INPUT BINARY VALUE CONDITION
L 1 Length > 100 metres
0 Length100
< metres
1 Temperature < 1000 C
T
0 Temperature <1000 C
1 Velocity > 10 m/s
V
0 Velocity < 10 m/s

A stop signal (S = 1) occurs when:

either Length, L > 100 metres and Velocity, V < 10 m/s

or Temperature, T < 1000 C and Velocity, V > 10 m/s

The
Draw first
a thing
logic to do is to and
network try and turntable
truth the question
to show into
alla series of logicsituations
the possible gates and
then
when
the
• Theproblem
the stop becomes
signal
first statement could
can much as:simplified.
be received.
be re-written (L = 1 AND V = NOT 1) since Length >
100 metres corresponds to a binary value of 1 and Velocity < 10 m/s
corresponds to a binary value of 0 (i.e. NOT 1).
• The second statement can be re-written as (T = NOT 1 AND V = 1) since
Temperature < 1000C corresponds to a binary value of 0 (i.e. NOT 1) and
We can now draw
Velocity > 10 them/slogic networkto
corresponds and truth table
a binary valuetoofgive
1 the solution to the original
•problem (input
Both these L has been
statements areput at the
joined bottomby
together of OR
the which
diagram just us
gives to the
avoid crossing
logic
over statement:
of lines; it merely
if (L = makes
1 ANDitVlook= NOT
neater
1) OR
and (T
less= complex
NOT 1 ANDand isn’t
V = 1)
essential):
34then S = 1
T
NOT

AND

V
NOT S
OR

L AND

LTVS
1110
1101
1011
1001
0110
0100
0011
0000

PROBLEMS
In questions 1 to 6, produce truth tables from the given logic networks.
Remember
that if there are TWO inputs then there will be four (22) possible outputs and if
there
are THREE inputs Athere
BCX
will be eight (23) possible
AB X
outputs.
111 11
i.e.0 1 1 110 10
101 01
010
001 100 00
000 35
(1)
A
OR

NOT

X
AND OR

(2)

A
NOT

OR NOT
X
OR

AND
B

(3)

A
NOR NAND
X
AND

B NOT

(4)
A
OR
B
OR

C AND 36 AND X
(5)
A
AND NOT
X
NOR
B
OR

NAND
C

(6)

NOT
A
OR
AND X

OR

B
OR
AND

Questions 7 to 10 require both the logic network to be created and also the truth
table. The truth table can be derived from the logic network, but also from the
problem. This is a check that the logic network actually represents the original
problem.

(7) A computer 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 ON or if R is OFF and S
and T are ON. Design a logic network and draw the truth table for this
network.

37
(8) A traffic signal system will only operate if it receives an output signal (D = 1).
This can only occur if:

either (a) signal A is red (i.e. A = 0)


or (b) signal A is green (i.e. A = 1) and signals B and C are both red (i.e.
B and C are both 0)

Design a logic network and draw a truth table for the above system.
(9) A chemical plant gives out a warning signal (W = 1) when the process goes
wrong. A logic network is used to provide input and to decide whether or not
W = 1.

Input Binary Value Plant Status


Chemical Rate = 10 m3/s
C 1 Chemical Rate < 10 m3/s
0
1 Temperature = 87 C
T 0 Temperature > 87 C
1 Concentration > 2 moles
X 0 Concentration = 2 moles

A warning signal (W = 1) will be generated if

either (a) Chemical Rate < 10 m3/s


or (b) Temperature > 87 C and Concentration > 2 moles
or (c)a Chemical
Draw rate = 10
logic network andm3/s
truthand Temperature
table to show >all87the
C possible situations
when
the warning
(10) A power station has asignal could
safety system beonreceived.
based three inputs to a logic network.
A warning signal (S = 1) is produced when certain conditions occur based on
these 3 inputs:

Input Binary Value Plant Status


1 Temperature > 120C
T 0 Temperature <
120C
1 Pressure > 10 bar
P 0 Pressure < 10 bar
1 Cooling Water > 100 l/hr
W 0 Cooling Water < 100 l/hr

A warning signal (S = 1) will be generated if:

either (a) Temperature > 120C and Cooling Water < 100 l/hr
or (b) Temperature < 120C and (Pressure > 10 bar or Cooling Water <
100 l/hr)

Draw a logic network and truth table to show all the possible situations when
the warning signal could be received. 38
Booklet 3.1 – answers and hints

(1)

START

INPUT
country

INPUT
conv rate

INPUT
reais

currency_value = reais x
conv_rate

Is country Yes
= USA? OUTPUT “$”,
currency_value

No

Is country Yes OUTPUT “€”,


= Europe? currency_value

No

Is country Yes OUTPUT “¥”,


= Japan? currency_value

No

OUTPUT
“error” 11 STOP
(2)

START

tallest = 0

smallest = 1000

count = 1

INPUT
height

Yes
Is height > tallest =height
tallest ?

No

Yes
is height < smallest = height
smallest?

No

count = count + 1

Yes No OUTPUT
Is count <= tallest,
500? smallest

12 STOP
(3)

START

count = 1: sum_temp = 0: sum_hours = 0

INPUT
temp, hours

sum_temp = sum_temp + temp

sum_hours = sum_hours + hours

count = count + 1

Yes Is count
<= 365?

No

mean_temp = sum_temp/365

mean_hours = sum_hours/365

OUTPUT
mean_temp,
mean_hours

STOP
13
(4)

START

count = 1: cars = 0: stationery = 0: toys = 0

INPUT code

Yes
Is code <
100? cards = cards + 1

No

Is code < 200 Yes stationery =


and code > 99 stationery + 1
?

No

Is code < 300 Yes


and code > toys = toys + 1
199 ?

No

count = count + 1

STOP

Yes No
is count <= OUTPUT cards,
280? stationery, toys
14
(5)
START

count = 1: cars = 0: buses = 0: lorry = 0: others = 0

INPUT
vehicle

Is vehicle Yes
cars = cars + 1
= car?

No

Is vehicle Yes
buses = buses + 1
= bus?

No

Is vehicle Yes
lorry = lorry + 1
= lorry?

No

others = others + 1

count = count + 1

Yes No
Is count OUTPUT cars,
<= 10000? buses, lorry, others

15 STOP
(6)

START

highest = 0

count = 1

INPUT
start time

INPUT
end time

speed = 100/(end_time – start_time)

speed = speed * 3.6

Is speed Yes
OUTPUT
> 100? “message”

No

OUTPUT speed

Yes
Is speed >
highest = speed
highest ?

No

count = count + 1

Yes No OUTPUT
Is count
<=500 ? 16 highest STOP
(7)

START

INPUT start

INPUT end

Is end > Yes


no_stations = end - start
start ?

No

no_stations = start - end

cost = no_stations x 2

INPUT
no_passengers

Is Yes
no_passengers cost = 0.9 x cost
> 2?

No

final_cost = cost x no_passengers

count = 1

OUTPUT
ticket Yes

count = count + 1 Is count <= 17 no_passengers


? No
STOP
(8) (NOTE: there is an error in the question in booklet 3.1 – output box should read:
OUTPUT X,T)

number X T OUTPUT
45 0
45
35 1
25 2
15 3
5
4 4, 45
-2 0-2
-12 1
1, -2
20.5 0
20.5
10.5 1
0.5 2
2, 20.5

(9) (NOTE: there is an error in the question in booklet 3.1 – the “others = others + 1”
statement should by-pass all the other counting procedures)

vehicle car bus lorry other OUTPUT


car 0 0 0 0
car 1 1 1 1
lorry 2 2 2
bus
van 3
van 4
car
bus
car
end
4, 2, 1, 2

(10)

count X n neg p pos avge1 avge2 OUTPUT


1 5 0 0 0 0
2 -3 1 -3 1 5
3 0 2 -6 2 12
-3 -17 18
4 7 3 -24 3 30
5 0 4 4
6 6
7 -11
-7
8
10 12
9
11
-6 -6,7.5
7.5
18
Booklet 3.2 – answers and hints

(1) Three errors:

line error correction

1 totals should be zero negative = 0: positive = 0


2 loops 1001 times for x = 1 to 1000
6 no checks for zeros if number = 0 then zero = zero + 1
Input (OR else zero = zero + 1 )

(lines 6 to 9 need to be re-numbered 7 to 10; also need to add the following:


zero = 0 in line 1 and add zero to output list at the end of the algorithm)

(2) Three errors:

line error correction

1 wrongly set value highest = 0


3 while loops never stops while days <= 5000 do
9 average needs to be line 9: endwhile
outside while loop line 10: average = total/500

(3) Three errors:

line error correction

3 sum = 0 inside loop should be set outside loop before line 1


3 sum = 0 initial value this value should be sum = 1
5 calculation result = n/sum should come between lines
6 and 7

(4) 1 input country


2 input conv_rate
3 input no_reais
4 currency_value = no_reais * conv_rate
5 if country = USA then print “$”, currency_value
6 if country = Europe then print “€”, currency_value
7 if country = Japan then print “¥”, currency_value

19
(5) 1 tallest = 0
2 shortest = 500
3 for count = 1 to 500 do
4 input height
5 if height > tallest then tallest = height
6 if height < smallest then smallest = height
7 next
8 print tallest, shortest

(6) 1 sum_temp = 0: sum_hours = 0


2 for count = 1 to 365 do
3 input temp, hours
4 sum_temp = sum_temp + temp
5 sum_hours = sum_hours + hours
6 next
7 mean_temp = sum_temp/365
8 mean_hours = sum_hours/365
9 print mean_temp, mean_hours

(7) 1 cards = 0: stationery = 0: toys = 0


2 for count = 1 to 280 do
3 input code
4 if code < 100 then cards = cards + 1
5 if code > 99 and code < 200 then stationery = stationery + 1
6 if code > 199 and code < 300 then toys = toys + 1
7 else print “error”
8 next
9 print cards, stationery, toys

(8) 1 cars = 0: buses = 0: lorry = 0: others = 0


2 for count = 1 to 10000 do
3 input vehicle
4 if vehicle = car then cars = cars + 1
5 if vehicle = bus then buses = buses + 1
6 if vehicle = lorry then lorry = lorry + 1
7 else others = others + 1
8 next
9 print cars, buses, lorry, others

20
(9) 1 highest = 0
2 for count = 1 to 500 do
3 input start_time, end_time
4 speed = 100/(end_time – start_time) {NOTE: m/second}
5 speed = speed * 3.6 {NOTE: conversion to km/hour}
6 if speed <= 100 then print “speed is OK”
7 else print “maximum speed exceeded”
8 print speed
9 if speed > highest then highest = speed
10 next
11 print highest

(10) 1 input start


2 input end
3 if end > start then no_stations = end – start
4 else no_stations = start – end
5 cost = no_stations * 2
6 input no_passengers
7 if no_passengers > 2 then cost = 0.9 * cost
8 final_cost = cost * no_passengers
9 print final_cost
10 print tickets

[NOTE: it is possible to use other loop structures other than for …. to; the
algorithms
would work equally as well with repeat …. until or while …. endwhile. The for
…. to
loops work particularly well when an exact count is known (e.g. exactly 100
temperatures). If we had to input temperatures until they became negative it
would be
best to use a while or repeat loop, for example].

21
Booklet 3.3 – answers and hints

(1)
ABX
111
100
010
001

(2)
ABX
111
101
010
000

(3)
ABX
110
101
010
000

(4)
AB CX
1111
1100
1011
1000
0111
0100
0010
0000

(5)
AB CX
1111
1100
1010
1000
0110
0100
0010
0000
22
(6)
AB CX
1111
1100
1011
1000
0111
0101
0011
0001

(7) Statement:

X = 1 if ( R = 1 AND S = 1 ) OR ( R = NOT 1 AND ( S = 1 AND T = 1))


RSTX
Truth table: 1111
1101
1010
1000
0111
0100
0010
0000

Logic network:

T AND

AND

NOT
OR

R AND

S
23
(8) Statement:

D = 1 if ( A = NOT 1 ) OR ( A = 1 AND ( B = NOT 1 AND C = NOT 1))

Truth table:

AB CD
1110
1100
1010
1001
0111
0101
0011
0001

Logic network:

A
NOT

OR
D
AND
NOT
B
AND

NOT
C

(9) Statement:

W = 1 if ( C = NOT 1 ) OR ( T = 1 AND X = 1 ) OR ( C = 1 AND T = NOT 1 )

Truth table:

CTXW
1111
1100
1011
1001
0111
0101
0011
0001 24
Logic network:

NOT
C

AND

NOT OR
T W
OR

AND
X

0) Statement:
(1
S = 1 if ( T = 1 AND W = NOT 1 ) OR ( T = NOT 1 AND ( P = 1 OR W = NOT 1))

Truth table:

TPWS
1110
1101
1010
1001
0110
0101
0010
0000

Logic network:

P
OR

AND
NOT
W S
OR
T NOT AND
25
Booklet 4

This covers the following topics found in section 4 of the computer studies
syllabus:

Item Topic Page numbers


1 Automatic data capture 2
2 Validation techniques 3
3 Check digits 4
4 Verification techniques 5
5 Files 5
6 Binary data 5
7 Word processors 7
8 Desk top publishing (DTP) 8
9 Spreadsheets 8
10 Databases (DBMS) 11
11 Authoring software 12
12 “Off the shelf”/bespoke software 12
13 Macros 13
14 Problems based on section 4 topics 14

1
4.1 Data
Automatic Data Capture

There are many techniques available to collect data automatically without the need
for manual entry. Manual entry is slower, more expensive (need to employ people to
key in data) and also prone to error (e.g. typing in 4.1 instead of 1.4). The following
is a list of available automatic data capture techniques:

Data logging this technique involves collecting data automatically using


sensors; often used when doing scientific experiments or
monitoring a system (examples of sensors is given in booklet 5).

Barcode readers these take data from printed barcodes and allow automatic
stock control in, for example, supermarkets.

Radio Frequency this method involves using small electronic devices containing a
Identification microchip and antenna; they work in a similar way to bar codes
(RFID) but can be read from a distance of 5 metres; often used to track
live stock, vehicles, library books and goods sold in shops.

Biometrics this involves obtaining data and identifying characteristics


automatically in security systems e.g. use of finger prints, palm
prints, facial images and iris prints.

Magnetic stripes these contain information/data stored on magnetic material


often on the back of a credit/debit card; the information is
automatically read by swiping the magnetic stripe past a reading
head.

Optical character information on paper is automatically read by a scanner and is


recognition (OCR) then analysed/processed by OCR software and stored in an
electronic format.

Voice recognition these systems recognise spoken words e.g. for disabled people
who can’t use keyboards where they speak commands instead
of having to type.

Smart cards these contain embedded microchips and receive power from the
card readers; the microchip is made up of RAM, ROM and 16-
bit processor and the stored data is automatically read by the
card reader; used in credit cards, security cards, loyalty cards,
etc.

Optical mark OMR technology scans a printed form and reads pre-defined
recognition (OMR) positions (where specific fields have been filled in e.g. - or
_); the system records where marks have been made so can
automatically determine responses to, for example, a
questionnaire.

2
Data Collection

Data collection can be either automatic (see previous page) or manual. Manual
techniques can involve:

- keyboards/keypads to type in data


- touch screens to select data/options

Validation Techniques
checks if a person’s age is > 0 but is also < 140.
Validation is a process of checking if data satisfies certain criteria when input i.e.
Length
falls check thischaracters
checks if the input data contains the required number of
e.g. if a field needs 6 digits, then inputting 5 digits
within accepted boundaries. or Examples of validation
7 digits, for example, techniques include:
should be rejected.

Character check
Range check thisthis checks
checks that the
whether input
data data doesn’t
is within contain invalid
given/acceptable values e.g.(type
check) characters; e.g. a person’s name shouldn’t contain numbers.

Format check this checks that data is in a specified format (template) e.g.
(picture check) date should be in the form dd/mm/yyyy.
(boundaries) is checked e.g. input data must be > 10.

Limit check
Presence thischeck
check is similar
that to a range
data checkpresent
is actually exceptand
onlynot
ONE of the
missed outlimits
e.g. in
an electronic form, somebody’s telephone number may be a
required field.

Consistency check/ this checks if fields correspond (tie up) with each other e.g.
if field must contain M or Male.
Cross field check Mr. has been typed into a field called “Title” then the
Check digit this is an extra digit added to a number which is calculated
“Gender” from the digits; the computer re-calculates and validates the
check digit following input of the number (see next page).

(NOTE: check digits can identify 3 types of error:

(1) if 2 digits have been inverted e.g. 23459 instead of 23549


(2) an incorrect digit entered e.g. 23559 instead of 23549
(3) a digit missed out all together e.g. 2359 instead of 23549)

3
This section shows how check digits are calculated. The ISBN-10 (used on books)
has been chosen as the example; this uses a modulo 11 system which includes the
letter X to represent the number 10.

Example 1

To calculate the check digit for the ISBN 0 - 2 0 1 - 5 3 0 8 2 - ?

(i) the position of each digit is considered:

10 9 8 7 6 5 4 3 2 1 digit position
0 - 2 0 1-5 3 0 8 2-? number

(ii) each digit is then multiplied by its digit position and the totals added together
0 x 10 + 2 x 9 + 0 x 8 + 1 x 7 + 5 x 6 + 3 x 5 + 0 x 4 +8 x 3 + 2 x 2
= 0 + 18 + 0 + 7 + 30 + 15 + 0 + 24 + 4
= 98

(iii) the total is then divided by 11 (modulo – 11) and the remainder, if any, is
subtracted from 11 to give the check digit.

98 ÷ 11 = 8 remainder 10
11 – 10 = 1

this gives a check digit of 1


final ISBN becomes 0 -2 0 1 - 5 3 0 8 2 - 1

Example 2

To check the correctness of a check digit the computer re-calculates it as follows:

The ISBN to check is: 0 - 1 3 1 5 - 2 4 4 7 - X

(i) the position of each digit is considered:


10 9 8 7 6 5 4 3 2 1 digit position
0 - 1 3 1-5 2 4 4 7-X number

(ii) each digit is then multiplied by its digit position and the totals added together
0 x 10 + 1 x 9 + 3 x 8 + 1 x 7 + 5 x 6 + 2 x 5 + 4 x 4 + 4 x 3 + 7 x 2 + X x 1
= 0 + 9 + 24 + 7 + 30 + 10 + 16 + 12 + 14 + 10 (recall that X = 10)
= 132

(iii) the total is then divided by 11; if there is no remainder then the check digit is
correct:

132 ÷ 11 = 12 remainder 0

hence the check digit is correct 4


Verification

Verification is a way of preventing errors when data is copied from one medium
to
another (e.g. from paper to disk/CD, from memory to DVD, etc.). There are a
number of ways inpeople);
which verification
the data canif both
is only accepted be done:
versions match up.
Often used to verify passwords by asking them to be typed
in again by the same person.
Double entry in this method, data is entered twice (using two different
Visual check this is checking for errors by comparing entered data with the
original document (NOTE: this is not the same as proof
reading!!).

Parity check this is used to check data following potential transmission


errors; an extra bit is added to each binary number before
transmission – e.g. EVEN parity makes sure each number has
an even number of 1 – bits;

Example: if 11000110 is sent (four 1’s)


and 11100110 is received (five 1’s)
File maintenance isthenimportant. Updating of files usually involves
the system will know an error has occurred.
amending, inserting
and deleting data.
4.2 Files

Example A bank would amend data if a customer changed their


personal
details (e.g. telephone number, address or their name through
marriage). Data
would need to be inserted if a new customer joined the bank and
deletion of data
Controlled devices 4.3contain
usually Binary Data
registers which are made up of binary digits (bits).
would occur if a customer left the country or died (in both cases
The following example shows how these registers can be used to control a device.

their
Exampleaccounts would

be closed). The device on the left is a mobile trolley with 3


wheels. All three wheels can turn left or right
and each wheel has its own electric driving
motor. Sensors at the front and rear of the
trolley detect an object in its paththe
these represent
r
which
threewould
wheels
subsequently egister
stopthese
allismovement.
represent An
used to control 8-bit
5the three
the sensors
device.
Front Rear Forward Motor
wheel wheels direction (on/off)
turns left turn left (on/off)
(on/off) (on/off)
Front Rear Error
Backward
(object in
wheel wheels thedirection
way = 1,
turns right turn right clear
(on/off)
path = 0)
(on/off) (on/off)

(1 = ON and 0 = OFF)

Therefore, 1 0 1 0 1 0 1 0
means: front wheel turns left
back wheels turn left
the direction is forward
the motors are on

therefore the trolley is moving forward and turning left.


00010111 ?
(i)
(ii) What doesthethis
How would register
following mean? using the above register?
be represented
- front wheel turning right
- back wheels turning left
- moving in a forward direction
- motors on
- no object in its path

Answers

(i) - front wheel not turning left or right


- rear wheels turning right
- going in backward direction
- motors on
- error – object in path

So the vehicle is going nowhere.

(ii) 0 1 1 0 1 0 1 0 6
4.4 Software
Some of the key features of software are considered in this section.
Familiarisation
with software packages is usually best achieved by carrying out a variety of tasks
on
the computer.

Word processors

Word processors now have many features over and above the original task of
generating a typed document. This section will concentrate purely on word
processing features.

Sample of a word processing page showing icons and functions available


- ability to set the page size and page orientation
- ability to change font Main
style and font available
features size (e.g. in
arial, courier,
all word times new roman,
processors:
etc.)
- ability to change margins (top, bottom and sides)
- page format (e.g. paragraphs, columns, etc.)
- importing text, graphics and pictures into the document body
- inserting and deleting text
- cut and paste/copy and paste (to prevent the need to re-type sections of text or to
move/remove text)
- search and replace based on key words
- word wrap (e.g. auto adjust a line to fit into paragraph alignment such as straight
margins on left and right, etc.)
- file management (create/delete/move/search for files)
- headers and footers and the automatic numbering of pages
- graphics (embed drawings and graphs into the document) 7
- macros (see later notes)
- merge (merge text files from one file into another e.g. mail merge)
- ability to send documents to a printer
- carry out a word count on the document
- add and manipulate tables in the main body of the document
- windows (edit 2 or more documents at the same time)
- WYSIWYG (what you see is what you get) – preview document to see how it will
look when printed
- spell checkers, language check and thesaurus
- simple translation from one language to another; for example:

This is an example of a document translated from English to French

Desk
C'est Top Publishing
un exemple (DTP)traduit d'anglais-français
d'un document

As word processors develop increasingly more sophisticated features, the


differences with desk top publishing (DTP) packages becomes more and more
blurred.

Essentially in DTP, a user creates a page layout with text, graphics, photos and
other
elements. The following is a list of key differences to word processors:

- most word processors force users to work on a document in a linear fashion


(i.e.
paragraph by paragraph and page by page); with DTP it is possible to place
elements on the page and then move them around as you wish to create the
desired product.
- elements repeated throughout a document (e.g. a company logo) can be placed
in
master pages rather than setting up each page individually as would be the case
with a word processor.
- text is usually imported from a word processor or is typed into the document
directly using a frame. This allows you to create the layout first, link the frames
together and add the text into the frames later (e.g. in newsletters and magazines
where layouts are created before any of the actual text becomes available).

Spreadsheets
8
The following is a brief summary of the common features found in spreadsheets:

- it is made up of columns and rows; each row is identified by a number and each
column is identified with a letter (or letters)
- each cell is identified by its column id and row id e.g. A4, ET300 etc.
- a cell may contain a label (text entry such as MEAN VALUE) or a value (which can
be a number, a date, a formula, result of a calculation, or currency)
- the cursor identifies the current cell selected; it is possible to click on to a cell and
a “+” sign appears in the bottom right hand corner; by dragging the formula down
it is possible to replicate it in other cells
For example:
A B C
1 15 3 =(A1 * B1)
2 11 5
37 7
49 9
5 10 11

By selecting cell C1 and dragging the formula down to C5 the following formulae
will be replicated in C2 to C5: (A2*B2), (A3*B3), (A4*B4) and (A5*B5)
- formulas are used to represent a mathematical function
e.g. = (C5 * D5) * 100
= A5 + B5 + C5+ D5
- functions allow computations to take place
e.g. SUM, AVERAGE, MAX, MIN
e.g. the second formula above could be written as = SUM(A5:D5)
- it is also possible to use mathematical/logical expressions within cells
e.g. IF G5 > 100 THEN “Y” ELSE “N”
- it is also possible to create charts and graphs from spreadsheets (e.g. using a
chart wizard). For example:A B
1 rainfall temperature
2 10 17
3 12 15
Cells A1 to A13 are highlighted and
4 15 13
the first chart is created. Then cells
5 28 11
B1 to B13 are selected and the
6 37 10
second chart created.
7 62 8
8 58 9
Other aspects such as colours,
9 47 11
labels, etc. are then added.
10 32 12
11 20 15
12 15 16
13 8 22
14

9
temperature and rainfall

10
20
30
0 5
123456789101112 40 10
50 rain temp
15
month
60 20
70 25
- now consider the following spreadsheet:
A B C D
1 vehicle id kilometres litres kilometres/litre
2 A 150 12.5 12.0
3 B 200 27 7.4
4 C 300 20 15.0
5 D 250 15 16.7
6 E 100 10 10.0
7 F 400 33 12.1
8 average km/l 12.2
9 maximum km/l 16.7

formula in cell D2 is = (B2/C2)


replicating this formula (by highlighting then drag down to D7) gives all the
formulas needed in cells D3 to D7

formula in D8 (to find average) can be done in 3 ways:


= AVERAGE(C2:C7) or
= SUM(C2:C7)/6 or
=(C2+C3+C4+C5+C6+C7)/6
- problems associated with spreadsheets:
- capacity
formula (i.e.
in D9 to maximum number
find maximum of rows
value and columns)
in column can be limiting when
is = MAX(C2:C7)
dealing with large data sets
- security issues in some spreadsheets (i.e. if you can open a spreadsheet
you can also change any part of it; this can lead to fraud
- lack of concurrency; usually only one person can work on a spreadsheet at
any given time (databases are better in this aspect since they can usually
be opened by more than one user at a time)
- because of their structure it is easy to enter an error (whether on purpose
or by mistake) by entering data in the wrong cells or dependencies among
cells incorrectly applied 10
Databases (Database Management Systems – DBMS)

Databases are used to collect and organise information. Most database have all
of
Tables
the following properties:
Data is stored in rows and columns (much like a spreadsheet – the main
difference is
how the data is organised). Each row in a table is called a record which is
made up
Forms
of a number of fields (columns in the table). The data type in the fields is
Forms
usuallyare commonly called data entry screens since they are the user interface
which
either allows data in theortables
text, numeric to be viewed,
date/time. Mostentered or edited.
databases Forms
contain permit the
a number of
control of how other users interact with the information in the database e.g. only
tables which
allow
are usually linked together in some way.
certain fields to be seen or only allow certain operations to be carried out. This
subsequently helpsReports
the protection of the information and also ensures it is entered
correctly.
Reports are produced as a result of questions such as “how many times has a type
of car broken down” or “which cities have the highest house prices”. Reports can
be
printed out, viewed on the screen or exported (e.g. to a word processor, an email
Queries
message, etc.).
Queries most commonly allow information to be retrieved from tables. Since the
information is often spread across several tables, queries allow it to be viewed as
one single datasheet. They also allow filtering so only the records required are
seen.
Queries can be either
Sampleresults seen directlyfrom
database/table on thea screen or the output to another
database
form or report. Example of a query: (house > 200 000) OR (no_of_rooms < 4).
Name of Toxic Smallest size Largest
Filtered
sizeout by 10
substance (microns) (microns)
micron mesh?
cement dust no 3 100 some
coal dust no 1 100 some
common sand no 10 2000 yes
paint pigments yes 0.01 5 no
talcum powder no 3 80 some
pollen no 10 100 yes
smog no 0.01 1 no
viruses yes 0.002 0.04 no
bacteria yes 0.2 20 some
human hair no 20 300 yes 11
Points to note: (1) there are 10 records in this section of the database
(2) each record has 4 fields
(3) sample queries:

(Smallest size (microns) < 1) OR (Toxic = “yes”)


would output records 4, 7, 8 and 9

(Largest size (microns) > 99) AND (Toxic = “no”)


Would output records 1, 2, 3, 6 and 10

The query should match up with the field titles to ensure a correct search is
carried out. Search engines on the Internet work in a similar way; the clever
part is how the information is stored on the databases so that the time to do
the search (based on key words) and the effectiveness of the search itself
results in a very powerful and very useful tool.

Authoring Software

Also known as authorware; this is a program that helps in the writing of hypertext or
multimedia applications. Authoring tools usually allow the creation of the actual
required application by linking together objects which can be text, graphics, music
file, etc. By defining the relationship between objects it is possible to produce very
useful and eye catching applications.
Many authoring packages support a scripting language to allow for even more
sophisticated applications to be produced. Scripting languages have pre-built
functionality (such as menu styles, graphic displays, etc.) that is embedded within
HTML. These pre-built functions allow users to engage with a web-site in real time.
The distinction between authoring tools and programming tools is not at first obvious.
However, authoring tools require less technical knowledge to master and are usually
used for applications that present a mixture of text, graphics, and audio/music files.

Bespoke versus off-the-shelf software

Usually software packages are bought off-the-shelf. However, certain applications


(usually for commercial businesses, industrial companies, etc.) require specially
written software which is unique to that customer and is known as bespoke software.

There are many advantages and disadvantages of both systems.


Off-the-shelf – advantages
- tends to be less expensive since development costs can be spread over the
many users
- can be more sophisticated since large sales bring in considerable revenue which
can be used to enable a lot of development to be done.
- there will be considerable support from other user groups
- sharing of files with other packages is usually easier since they are likely to be
compatible (e.g. Excel and Word)
- the package is available immediately – no need to wait for development period
- tried and trusted software since usually highly developed due to considerable
user feedback 12
Off-the-shelf – disadvantages
- can be over-complex as it tries to cover as many aspects as possible (e.g. most
users of Word only utilise about 10% of its features)
- the software is often a compromise since it is intended for many users all with
different requirements
- may be very complex to learn because of the complexity caused through
having
unwanted features
- may not fit exactly into the company requirements causing a compromise in the
way it has to be Bespoke used within the organisation
Software – advantages
- if there are major concerns with a software problem it is unlikely that it will be
-fixed
specifically designed
(sincefor the application and therefore
with othermore
usersefficient and will
immediately it may cause problems and/or cause
only
software instability)
contain the features wanted; since it will be devoid of unwanted features the
software can take its specific requirements to new levels which will make it very
powerful
- can be customised to interface with all other software within the company thus
preventing software clashes
-- very
easier to use since very specific and the writers of the software can also be
dependent on the suppliers of the software; if they go out of business there
involved innothe
will be little or training
Bespoke
support ofSoftware
if problems staff which
occur will be geared towards their requirements
– disadvantages
- less likely to be as well developed/tested as off-the-shelf software
-- much
can more
be modified/updated as the company’s
expensive since all the development costs need to berequirements
met by the change
-company
much(but better customer
efficiency savings maysupport since
compensate they
for this and itwill be intodirect
may prove be contact with the
less expensive in the long run)
-software designers
the development time can be very long which may cause problems
- difficult to tell how good the final software package will be (could be a real
problem if the company have waited 2 to 3 years to receive their new software
only to find it doesn’t meet their needs!!)

Macros

A macro is a name or key that represents a series of commands or key strokes.


Many applications allow single word or single nominated key on a keyboard to
perform a whole series of actions. Macros can be either written as required and then
stored or stored in a library for future use.

For example, suppose you want some data to be input into a spreadsheet if the result
of a calculation in cell K40 is negative:

move to cell K40


is result of calculation < 0
if < 0 then load file “error report”
if >= 0 then output value 13
Macros can be very sophisticated and save the operator a lot of time. For
example,
the name and address in a word processor could be set up by pressing
key F1 and
the system brings information from a related database.

Other software
4.5 Problems

Other software, problems


A list of examination-based such nowas web
follows. browsers
These can and search engines,
be used as revision
questions or centres can use the questions to make up their own assessments to
communications
give candidates practice under examination conditions.
software (including emails) and graphics interfaces are all covered in
other booklets
(1) Describe four methods used for automatic data capture. Give a different
application for each of the methods chosen.
and the information won’t be duplicated here.
(2) A record contains the following fields:

- Title (Mr/Mrs/Miss) and Sex (Male or Female)


- Date of birth (written in the form dd/mm/yyyy)
- Pay Number (which is made up of 8 digits)
- Telephone Number
- Pay

Give a different validation check for each of the above fields and explain why
it is used.

(3) A system uses the ISBN-10 (modulo 11) method to generate and validate bar
codes:
- each digit in the number is multiplied by its digit position
- the result of each multiplication is added to a total
- the total is then divided by 11
- the remainder is subtracted from 11 to give the check digit (if the remainder
is 10, the letter “X” is used as the check digit)

(a) Which of the following numbers have the correct check digit?

(i) 0–555–21622–5

(ii) 0 – 1 2 1 – 9 0 0 2 1 – X

(b) Calculate the check digit for the following number:

0 – 1 5 0 – 2 4 6 2 2 – ………

(c) Discuss the types of errors that check digits can identify.
14
(4) (a) Describe three ways of carrying out verification checks.

(b) Give two examples where verification checks would be made.

(5) A burglar alarm system uses an 8 – bit register. The first 4 bits indicate if a
sensor has picked up an intruder (shown with a 1 – value) and the second
four bits indicate the zone where the sensor has picked up an intruder:
8 4 2 1

A B C D

(where A = window sensors


B = floor sensors
C = door sensors
D = infra red heat sensors)
8 4 2 1
1 0 0 0 1 1 1 0
For example:

A B C D
Indicates: window sensor detected an intruder in zone (8 + 4 + 2) 14

(a) What do the following indicate: 8 4 2 1


0 1 0 1 0 1 1 0

8 4 2 1
0 0 1 0 1 0 1 1

(b) What would be the binary pattern for a window broken and an infra red
sensor detecting an intruder both in zone 15?

(6) A company is using a word processor to produce a page advertising their


products. Unfortunately, the information wouldn’t fit onto one single page.

Which five features of a word processor could be used to ensure that the
advert fits onto one page only.

15
(7) A college has invested in a computer system to help carry out the following
tasks:

- advertise their college (both on the Internet and by paper leaflets)


- keep a track of student and staff information/contact details
- keep a track of payments and fees
- produce on line courses for the students

Describe four software packages the college could use to carry out the above
tasks and explain why each software package has been chosen.

(8) Describe three fundamental differences between word processors and desk
top publishing
A B packages.
C D E F G
new Value Value Value Depreciation
Value
1 name of car price after year after year after yearover
after
4 years
year
($) 1 ($) 2 ($) 3 ($) 4 ($) (%)
2 (9)
Fiat The
Bravo 150 following
28 000 21 000spreadsheet
15 600 11 200 9has
800 been
65 set up to compare the depreciation of 8
3 Honda Civic “R” 36 000 28 800 23 400 20 000 18 000 50
4 new
Range cars
Rover SE over
80 000 a644000
year period.
60 000 50 000 48 000 40
5 Mitsubishi Lancer 20 000 12 000 9 000 6 400 5 000 75
6 Citroen C8 LX 40 000 20 000 13 200 10 000 8 000 80
7 BMW 320 Conv. 72 000 57 600 50 000 43 200 36 000 50
8 Audi A3 1.6 SE 30 000 22 500 18 000 15 000 12 000 60
9 Mercedes SLK 350 68 000 57 800 51 000 48 000 45 600 33
10 Mean Deprecn 56.6
11 Highest Deprecn. 80.0

(a) What formula must be in cell G4 to find the depreciation on a Range


Rover after 4 years?

(b) What formula must be in cell G10 to calculate the mean (average)
depreciation of all 8 cars?

(c) What formula must be in cell G11 to find the highest (maximum)
depreciation of all 8 cars?

(d) Describe how it would be possible to predict the value of each car after
5 years and after 10 years?

16
(10) A database has been set up to compare certain features of freezers. A
section of the database is shown below.
Capacity Warranty
Item I.d. Price ($) Lowest Colour
temp (0C) (m3) (years)
A 300 - 20 0.16 1 white
B 250 - 18 0.15 1 silver
C 400 - 22 0.25 2 white
D 300 - 20 0.18 3 white
E 520 - 40 0.35 3 silver
F 360 - 25 0.30 1 white
G 410 - 30 0.30 2 white
H 290 - 18 0.20 2 silver

(a) How may records are shown in this section of the database?

(b) What items would be output if the following search condition was input:

(Price($) > 300 OR Warranty(years) > 1) AND (Colour = “silver”) ?

(c) Give the search condition to find all freezers which operate below
- 250C and have a capacity of more than 0.25 m3.

17
Booklet 4 – answers and hints

(1) Methods used in automatic data capture + applications

- data logging e.g. monitoring river pollution


- bar code readers e.g. stock control, getting prices at POS
- RFID e.g. tracking livestock on a farm
- biometrics e.g. fingerprints at airport security
- magnetic stripe reader e.g. cards used to open doors in secure areas
- OCR e.g. scanning paper documents into computer
- voice(2) recognition e.g. help disabled people enter data into
Possible validation checks:
computer
Title
- smartandcardssex - e.g.consistency
loyalty cards checkstoring “points”
Date
- OMR of birthe.g.- reading
format questionnaires
check directly
Pay number - character/type check, check digit, length check
Telephone No - character/type check, length check
(3)(a)Pay
10 9 8 7- 6 range
5 4 3 2 check
1 position

0 5 5 5 2 1 6 2 2 5 bar code digits

Multiplication: (10x0)+(9x5)+(8x5)+(7x5)+(6x2)+(5x1)+(4x6)+(3x2)+(2x2)+(1x5)

Result: 176/11 = 16 remainder 0. Hence, bar code check digit is correct

10 9 8 7 6 5 4 3 2 1 position

0 1 2 1 9 0 0 2 1 X bar code digits

Multiplication:
(10x0)+(9x1)+(8x2)+(7x1)+(6x9)+(5x0)+(4x0)+(3x2)+(2x1)+(1x10)
(b) 10 9 8 7 6 5 4 3 2 1 position

0 1 5 0 2 4 6 2 2 ?
bar code digits
Results: 104/11 = 9 remainder 5. Hence, bar code check digit is incorrect
Multiplication: (10x0)+(9x1)+(8x5)+(7x0)+(6x2)+(5x4)+(4x6)+(3x2)+(2x2)

Results: 115/11 = 10 remainder 5. Hence check digit is 11 – 5 i.e. 6

(alternative: to make the total, i.e. 115 into a number which gives a remainder of
0 when divided by 11 (i.e. 121) we need to add 6 – which also gives us the check
digit). 26
(c) Check digits can identify the following errors:

- inverted figures i.e. 23459 instead of 23549

- incorrect digits i.e. 23559 instead of 23549

- missed digits i.e. 2359 instead of 23549

4(a) Verification methods:

- double data entry (two people type in the same data from source document)
- visual check (where the information on screen is compared to source document)
- parity check (where the number of bits is checked for even or odd)

(b) Examples where verification checks are made:

- password entry check


- when filling out forms on line (e.g. verify your age)

(many more examples exist)

5(a) B = 1 and D = 1

i.e. floor sensor and infra red sensor detect presence of an intruder

(since 0 1 1 0 is equal to 6), the intruder has been identified in zone 6

C=1

i.e. door sensor detects presence of an intruder

(since 1 0 1 1 is equal to 11), the intruder has been identified in zone 11

(b) 1 0 0 1 1111

6 Features expected in word processors to allow one page fitting:

- set page size


- change font size
- change margins
- page format
- don’t use bold type
- re-size photographs
- remove (edit) unwanted text

7 Four software packages:

--advertise theofcollege
keep track (use
students andDTP
staff–information
could also use
(useword processor or authoring
a database)
- keep track of payment of fees (use of spreadsheets)
- produce on line coursesprocessing)
software)
(use authoring software – could also use DTP27or word
8 Differences between word processing and DTP:

- DTP allows elements on a page to be moved about as required; word processor


usually requires a linear approach (i.e. paragraph by paragraph, page by page)
- repeating elements (e.g. company logo) can be placed on master pages; with
word processors each page has to be set up separately
- use of frames in DTP (i.e. create layout, link frames as required and add text in
frames later)

9(a) G4 cell: = ((B4 – F4)/B4) * 100

(b) G10 cell = SUM(G2:G9)/8 or

= AVERAGE(G2:G9) or

= (G2+G3+G4+G5+G6+G7+G8+G9)/8

(c) G11 cell = MAX(G2:G9)

(d) - draw a graph of the given data and use a tend line to predict; extend graph to
ten graph
(or use mathematical formula (best fit) based on existing curve to allow
predictions to be made)
- add additional columns assuming that depreciation follows a “known pattern”

(10)(a) 8 (A to H)

(b) E

(c) (Lowest temp (0C) < -25) AND (Capacity (m3) > 0.25)

28
Booklet 5

This covers the following topics found in section 5 of the computer studies
syllabus:

Item Topic Page numbers


1 Hardware 2
2 Computer memories 5
3 External storage systems 7
4 Credit cards and smart cards 8
5 Sensors 8
6 Operating systems 9
7 Batch processing 10
8 Real time systems 10
9 Network topology 11
10 Multimedia applications 12
11 Problems based on section 5 topics 13

1
Laptop/notebook computers

Laptop computers have the obvious advantage over desk top computers (PCs) in
that they are fully5.1
portable.
HardwareThis is of particular value if a user wishes to do work
away from the office (e.g. when travelling) or if they want the freedom to work
anywhere within a building taking full advantage of WiFi technology.

One of the main considerations when buying a laptop is the battery life. This can
depend on a number of things but one major factor is the processor specification.
The following is a list for consideration:

- the processor should consume as little power as possible thereby prolonging


internal battery life
- the processor should run as cool as possible minimising the problems
associated with heat dissipation
- no fans needed to cool the processor thus reducing the load on the internal
battery

The main disadvantages of laptops compared to desk top PCs are:

- they tend to be more expensive to purchase


- it is easier to steal a laptop
- security risks (if sensitive data is stored on the internal hard drive)
- laptops tend to have a lower specification than an equivalent desk top computer

Household devices

Digital
(Note: also check out thecameras
section on Embedded web Technology in booklet 1)
The microprocessor would be used to control the following functions, for example:
Many household devices now use microprocessors to control their various
functions.
- shutter speed
lens focus
- flash
The following
- aperture is just a sample of common devices (showing some of the
(light intensity)
functions
(Note 1: the sensitivity of the camera depends on the number of pixels used to
controlled by the
represent the picture takenmicroprocessor and takes
e.g. an 8 megapixel camera general notes
a sharper imageon
thanthe
a application; it is worth
doing further
5 megapixel camera.research
The camerato find size
memory outalso
more about
dictates these
how many devices):
photos
be taken or limits the pixel size of a photo. The sharpness of the image also
can

depends largely on the lens quality. 2


Note 2: the advantages of digital cameras over manual cameras include: no
processing costs (since there is no need to develop film or make prints), easy to
delete unwanted photos, direct transfer of photos from camera to computer
through
the USB port (noWashing
need to scan in photos), easier to modify photos on screen (e.g.
machines
crop, change colour density, etc.) etc.)
The microprocessor would be used to control the following features, for example:

- water temperature
- time for each cycle
- the wash cycle (when to add powder, when to rinse, etc.)
- loading (i.e. weight of the washing in the drum)

(Note 1: the main advantages are that these machines are fully automatic (wash
Digital televisions
programs are fully stored) which makes them easy to use, they are cheaper to
manufacture
The microprocessor(modular design)
would be used to control and generally
the following more
features, reliable).
for example:

- automatically tuning into television stations


- allow digital signals to be decoded
- since constantly monitoring signal strength (etc.) far better sound and picture
quality result)
- allows interface with many devices
- controls picture and sound quality (factory settings can be stored, etc.)
- in built diagnostics in case of faults

(Note 1: signals to televisions are now sent digitally so need a computer to interpret
and decode these signals into a picture/sound; need multi-functional system to
control plasma and LCD screens)

Input and output devices

Input and output devices need to be matched up to the computer application.


Several of these have been covered already in booklet 1:

- computer-aided design (large screens, graph plotters, etc.)


- virtual reality (data goggles, data gloves, etc.)
- control/monitoring applications (sensors, ADC/DAC, actuators, etc.)

Other examples include:

3
Information centres
Airports, supermarkets, and any application where information needs to be
relayed to
customers, gain benefit from having automatic information kiosks rather than
having
manned desks. These allow customers to automatically obtain information when
they require it. Output is normally on a screen but the input devices can vary and
are
usually:

- touch screens (with menu options)


- mouse/trackerballs to select options
- limited options keyboard
- light pens (although these are becoming increasingly less common)

(keyboards are usually not offered since the number of options is limited and the
owners of the system don’t want customers keying in information and attempting
to
“hack” into the system).

Using this automated information system affords the following advantages to the
Supermarkets/retailers
customers and company:
These use several types of specialist input/output hardware. For example:
- the system can be linked into websites to give live updates (very useful option
- bar code readers/scanners (to read product details and enable automatic stock
at
control)
airports, bus terminals, railway stations, etc.)
- Point of Sale (POS) terminals – usually include the bar code readers/scanners
- information is usually more up to date using this method
- CAD output/input devices (the supermarkets produce their own notices etc. and
- no language problems (manually operated desks may have limited language
need this specialist hardware to carry out these tasks)
capability)
- sensors (counting customers entering and leaving the supermarket to allow
- no need to wait in queues
efficient check out performance)
- companies can advertise special offers, special services, key notices, etc.
- lower costs to companies (fewer staff needed)
- automatic information kiosks are always open
4
Facilities for the disabled
There are many input/output devices to help disabled people. Some of these are
summarised below:
Device Application
For people who can’t use a keyboard allowing input;
Touch screensalso
+ head
helps
wand
people with learning difficulties since icons
are easier to understand

On-screen keyboards For people who can’t use keyboards (use head wand
to select letters)
Blind and partially-sighted people can communicate
Voice recognition
with a computer using microphone and software
(keyboard and touch screens can’t be used)
Easier to use than a mouse if people have problems
Trackerball using their arms and hands or if they have a
coordination problem
Helps people who are partially-sighted since the larger
Large font size/use
icons and/or
of colour
colourful outputs on large screens are
much easier to see
Dot matrix printers can be modified to produce raised
Braille printers
dots (i.e. Braille) – this helps blind and partially-sighted
people to read the output
Loud speakers and special software are used to output
information in the form of sound to help blind and
Voice synthesis
partially-sighted people; it also helps people who have
difficulty reading/understanding text
These help people who have difficulty using normal
Large/conceptkeyboards
keyboards(either because of difficulty using hands/
arms or coordination problems)
Prediction software To help dyslexic people when typing
Foot activated controls To allow people with restricted hand/arm movement to
communicate

5.2 Computer Memories


Computer memories are either internal or external. Internal memories are either
ROM (read only memory) or RAM (random access memory). External memories can
take on many forms (and discussed in some detail later).

The first part of this discussion considers internal memory systems:

5
MEMORY

ROM RAM
(Read Only (Random Access
Memory) Memory)

PROM – Programmable Read


Only Memory DRAM
EPROM – Erasable SRAM (Dynamic
Programmable Read Only (Static RAM) RAM)
Memory
EEPROM – Electrically
Erasable Programmable Read
Only Memory

Read only memory (ROM)

ROM holds the instructions for starting up the computer. This type of memory can
only be read and cannot be altered (i.e. deleted or written to) and is non-volatile (i.e.
it doesn’t lose its contents when the computer is switched off).

Programmable read only memory (PROM)

A PROM is a memory chip on which data can be written only once. Once a program
has been written onto a PROM, it is permanent. Unlike RAM, PROM's retain their
contents when the computer is turned off. The difference between a PROM and a
ROM (read only memory) is that a PROM is manufactured as a blank memory,
whereas a ROM is programmed during the manufacturing process. To write data
onto a PROM chip, a special device called a PROM programmer or PROM burner is
required.

Erasable programmable read only memory (EPROM)

This is a special type of PROM that can be erased by exposing it to ultraviolet (UV)
light. Once it has been erased, it can be re-programmed using an EPROM burner.
An EEPROM is a special type of PROM that can be erased by exposing it to an
electrical charge. Like other types of PROM, EEPROM retains its contents even
when the power is erasable
Electrically turned off. Also, as withread
programmable other types
only of ROM,
memory EEPROM access
(EEPROM)
time is not as fast as RAM. EEPROMs are similar to flash memories (sometimes
called flash EEPROM). The principal difference is that an EEPROM requires data to
be written or erased one byte at a time, whereas a flash memory allows data to be
written or erased in whole blocks. 6
usually internal; hard drives contain much of the applications software to
enable the
computer to run effectively).

MP3 (MPEG-3)

MPEG-3 uses an audio compression technology; it compresses CD-quality


sound by
a factor of
Random aboutmemory
access 10 whilst(RAM) retaining most of the quality e.g. a 60 Mbyte CD
trackis
This is a volatile memory (i.e. contents are lost when the computer is
turned into a 6 Mbyte MP3 file. Music data is often stored on an MP3
switched
player which
off). A
user
plugscan into write or delete
the computer data as
through wellport.
a USB as read the contents.
The music Before a
data is downloaded
program
to the can be
ran
MP3it player
must first be loaded
where into RAM
it is stored in a file.which The allows
playerthehas
CPUits to
ownaccess the
internal
program.
battery which
allows a user to RAMs
Battery-backed listen toovercome
the musicdata filesloss
through personal head
on switching powerphones or
off, but
connect
are outside the the
playerof
scope tothese
an external
booklets. sound amplification unit. Variations of MP3 players
(e.g. I-pods) External storage systems
exist which use their own file structures when storing music; these require
(NOTE:
compatible For types
A number of different completeness, it is areworth
of external memory devices mentioning
now available. Some of that two types of
RAM
these are exist
software describedcalled
below (hard drives haven’t been mentioned since these are
to enable files to be stored in the correct format.
SRAM (static RAM) and DRAM (dynamic RAM) – SRAM doesn’t
need
MP4 to be
(MPEG-4)
constantly refreshed to retain its memory unlike DRAM. Also note that
MPEG-4 files are in a format that can hold a mixture of multimedia objects
computers
suchcache
use as which is a portion of memory made from SRAM. Memory
audio, video, images, animation, etc. MP4 players again use compression
caching works
technology to store data in files. They operate in much the same way as
since
MP3 programs usually access the same data or instructions over and
over again.
players described above.
By retaining as much information as possible in SRAM, the computer
operates more
Flash memories
quickly (cache is usually termed level 1, 2 or 3 (termed L1, L2 or L3)).
These are non-volatile re-writable memories evolved from the EEPROM;
they are
often connected to the USB port on the computer enabling a user to transfer
files
between computers.

SD (secure digital) cards are a type of flash memory used in digital cameras
and 7
Compact disks (CD)

These are an optical storage media which have basically taken over from
the floppy
disk. Software is now usually supplied on a CD (in the form of CD-R
Credit cards and smart cards
which can be
read
Creditonly or CD-RW
cards contain awhich allows
magnetic reading
stripe on the and
backwriting ofmade
which is data).up of iron-
based
Digital
particlesversatile diskfilm.
in a plastic (DVD)

The stripe
This is anisoptical
split upsystem
into three
fortracks which
storing data.are It
read
is by a magnetic
similar to CDstripe
but
reader.
typically can hold 4.7
Usually only tracks 1 and 2 are used. The information stored usually follows
Gbyte of data compared to only 700 Mbyte of data on a CD. This is due
the
to dual format:
following
layering and higher density of data storage.
track 2 track 1 description

v v start sentinel (1 character only)


v format code (“B”) (1 character only)
v v account number (19 characters)
v v separator (1 character only)
v v country code (3 characters)
v name (between 2 and 26 characters)
v separator (1 character only)
v v expiry date or separator (4 or 1 character(s))
Numerous
v v types Smart
service codecards
of sensors(3are are
useddiscussed
to give realintime
characters) detail in booklet
information 1.
to computers
(seev v optional data to fill up (max record length – 79)*
data capture
v end Sensors
devices
sentinel
in booklet
(1 character
1). Frequently,
only) an analogue to digital converter
(ADC)
v isvneeded
character
since check
sensor (1data
character
is often only)
in analogue form and computers can
only
(* the digital
process optional
data.data
The following
often contains
is a list aof common
PIN verification
sensors andcode
examples
or card
of
verification which
applications code) make use of these sensors:
8
Sensor type Possible applications
used in controlling central heating systems
temperature (1)
used to control/monitor
(2) temperatures in chemical processes
monitoring of greenhouse
(1) environment
moisture
any process where (2) moisture is an issue (e.g. production of
tablets in a pharmaceutical company)
oxygen (1) environment (e.g. measuring oxygen content in a river to check for
pollution)
growth control in(1)
a greenhouse
light traffic lights to detect
(2) the presence of a vehicle
on automatic doors(3)to detect the presence of a person
detecting an intruder by breaking an infra red beam
infra red (1)
counting (e.g. counting
(2) coins as each one breaks the beam)
detecting intruders in a burglar alarm system
pressure (1)
some systems still(2)use these to count vehicles on the road
acousticpicks
(1) up sound (e.g. burglar alarm system)
detecting liquids (2)
moving in pipes (chemical processes)
motion (1) detecting speed (e.g. radar guns measuring vehicle speed)
used to measure acidity
(1) in rivers (pollution monitoring)
pH used in greenhouses
(2) to monitor soil acidity
used to monitor/control
(3) chemical process where acidity levels are
important
proximity/distance (1) these tend to be versions of the above (e.g. light or infra red)

Operating Systems (OS)


5.3 Systems
The operating system (OS) is a program that, after being initially loaded into the
computer by a boot program, manages all the other programs/applications. On a PC,
the first program that runs is stored on a ROM chip. This program checks the system
hardware to make sure everything is functioning normally. This checks the CPU,
memory and basic input-output systems (bios) for errors. If all is satisfactory, the
BIOS will activate the disk drives. When the hard drive is activated, the OS is found
in the boot and is then loaded.

The following is a list of functions carried out by various operating systems:

- provides a user interface


- device management (input/output control)
- security (e.g. log on, passwords, etc.)
- handles interrupts
- spooling
- memory management
- multitasking
- batch processing
- multiprogramming
- error reporting and handling
- loading and running software
- processor management
- maintain user accounts
- utilities (such as copy, save, re-name, etc.) 9
Many household appliances that are microprocessor-controlled don’t have operating
systems (e.g. microwave oven, fridge, etc.). The microprocessor has just one set of
tasks to perform; essentially straightforward inputs are expected (e.g. a keypad on
the front of a microwave oven) and they have simple never-changing hardware to
control. Thus, it isn’t necessary to have an OS; thus leading to reduced development
and manufacturing costs for the household devices.

Batch processing

In this process, a number of tasks (or jobs) are all collected together over a set
period of time. They are then all loaded into the computer system (in a job queue)
and processed in one go (or batch). Once a batch job begins, it continues until it is
completed or an error is encountered. No user interaction is required once execution
begins.

This has the advantage that jobs can be processed when computer resources are
less busy (e.g. during the evening or at night); thereby utilising an expensive
resource. Batch processing is often used in the following application areas:

- billing systems (gas, electricity, water, etc.)


- payroll systems
- processing cheques

Real time (transaction) processing

When booking seats on a flight, for example, real time (transaction) processing would
be used. Response to a query needs to be very fast and once a seat is booked it
needs to marked as “not available” immediately to avoid any risk of double booking.
Using this example of booking seats on a flight, the following sequence of events
would take place:

- customer/travel agent contacts the airline


- the customer/travel agents types in the day/time of flight and number of travellers
- the customer/travel agent types in the departure airport and the destination

airport
- the airline database is searched and availability of seats checked
- if seats are available on the required day/time then a booking is made
- the database/file is updated immediately to indicate that these seats are no
longer available and prevents double booking from occurring
- if no seats are available a message is sent back to the customer/travel agent
- this uses real time (transaction) processing since the files are updated in real
time; interrogation of files will have access to totally updated information

(NOTE: the above is sometimes referred to as pseudo real time since some
applications don’t need immediate updating of the files)

10
Real time process control

Process control is a real time system. But this is very different to real time
(transaction) processing; this system usually involves sensors and feed back
loops
i.e. the output can influence the next input to the system.

Sensors send data (via an analogue to digital converter – ADC) to a computer or


microprocessor which decides whether or not to take action (based on
comparison
with stored data). If a change needs to be made, the computer/microprocessor
sends signals (via a digital to analogue converter – DAC) to the devices being
controlled and alters their status (e.g. turn a heater on if a temperature sensor
indicates that a temperature is too low) – actuators are often used to open valves,
turn on equipment, etc. As this is continuously monitored, eventually the
temperature
will equal the stored value in the computer/microprocessor – this will then cause
the
heater to be turned off. The role of sensors is also discussed
Ring networks: Comments earlier in this
booklet 1 - a faulty connection between two
and also in some depth in booklet
stations1.
can cause network failure
2 - it is difficult to add a new station/device as
it has to come between 2 existing stations
In real time (transaction) processing
3 fileswellare
- this type works often
heavy updated
in real time (e.g.
during loading
4 - it is possible to create large networks using
when this topology
booking flights on an airplane); but in real time process control, physical
quantities
Bus networks:
(such as temperature) are continuously monitored and the input is processed
sufficiently quickly to be capable of influencing the data source.

Networks Comments

1 - requires less cabling than a star network


For types of network topology
2 - are briefly
if there described
is a central
network goes down
here.
cable problem the entire

3 - less expensive network than the other


systems
4 - works best with a limited number of stations;
performance worsens as new 11 stations added
Star networks:
Comments

1 - if one station/connection fails the other


devices are not affected
2 - if the central hub breaks down, the whole
network fails
3 - it is easier to identify faults using this type of
topology
4 - it is easy to expand this type of network

Tree networks:

Comments

1 - this features star nodes on a bus network


2 - all the advantages and disadvantages of both
types of networks described above apply to this
system; it is quickly gaining in popularity since
it has all the good features of bus and star
topologies

Multimedia applications

Multimedia involves the use of a computer to present:

- text
- graphics
- video
- animation
- sound

in an integrated form. It has its main uses in:

- commercial applications (advertising, journalism, presentations, etc.)


- entertainment (special effects, video games, fine arts, etc.)
- education (CBT training, uses in virtual reality training, etc.)
12
5.4 Problems

A list of examination-based problems now follows. These can be used as revision


questions or centres can use the questions to make up their own assessments to
give candidates practice under examination conditions.

(1) (a) Name two household appliances that are microprocessor controlled.

(b) Describe what functions the microprocessor controls in the named


appliances.

(2) (a) Name four different types of sensors and give an application for each
one named.

(b) Choose one of your named applications and describe how the
sensors are used to control and monitor it.

(3) (a) Describe the main differences between Random Access Memory
(RAM) and Read Only Memory (ROM).

(b) Various external, removable memory devices exist. Choose which


device (using a different one in each case) you would use for the
following, and give a reason for your choice:

(i) storing multimedia files


(ii) storing music files
(iii) storing documents produced on a word processor

(4) A number of specialised input/output devices have been developed to help


disabled people use computer systems.

Name three input/output devices and describe how they would help a
disabled person.

(5) Compare the type of data that would be stored on a barcode with the data
that would be stored on a credit card magnetic stripe.

Describe the different types of validation checks that would be made on data
stored on:

(i) barcodes
(ii) magnetic stripes on credit cards

13
(6) A railway station management team has decided to set up automatic
information kiosks to keep passengers up to date with train times,
cancellations, and general information.

(a) Which input devices could be used at these information kiosks?

(b) What advantages do these kiosks give customers compared to an


information desk manned by a human operator?

(c) What advantages does this system give to the station management?

(d) Using the space below show a typical “home page” which could be
presented to passengers at the railway station. Show any links,
menus, etc. which you think would be needed to make the system as
user friendly as possible.

(7) (a) Give four functions carried out by a typical operating system.

(b) Describe the main differences between real time (transaction)


processing and real time process control.

(c) Give two applications that would use:

(i) real time (transaction) processing


(ii) real time process control
14
(8) (a) Draw diagrams of a ring network and a star network
(b) Give one advantage and one disadvantage for each of the above
network topologies.

(9) A very large city library is changing over to a fully computerised system to
control all their operations.

The training department has been asked to develop a presentation to explain


to the library staff how their new system will affect them.

(a) What features should the trainer use in the design of the presentation
to make it is as interesting as possible?

(b) The presentation is to be stored on a laptop computer. What features


make the laptop computer ideal for this application?

(c) Many of the books in the library have been scanned in and stored on
the computer.

What advantages does this give to the customer?

(10) (a) A music file is 45 Mbyte in length. Approximately how much memory
space would this same file need if stored in MP3 format?

(b) Describe how it is possible to store considerably more data on a DVD


than on a CD even though dimensionally they are the same?

(c) Why have CDs and DVDs taken over from floppy disks as the main
secondary storage media on home computer systems?

15
Booklet 5 – answers and hints

1(a) Examples of household appliances using microprocessors:

(b) Together with what is controlled:

Appliance What is controlled


Digital camera shutter speed, lens focus, flash, aperture, etc.
Washing machine Water temperature, cycle time, wash cycle, loading,
etc.
Television Tuning of stations, decoding of digital signals,
interface with devices, picture/sound control
Microwave oven Timing, weight calculations, function (e.g. defrost
etc.)

2(a) Types of sensor and applications where they are used


Sensor Application(s)
Temperature Central heating system, chemical process
Moisture Greenhouse environment, production where moisture is
an issue (e.g. pharmaceuticals)
Oxygen Pollution monitoring, engine management systems
Light Greenhouse environment, traffic light control, automatic
doors
Pollution monitoring, greenhouse (soil), chemical
pH
process control
Infra red Burglar alarms, counting people, detection of heat
sources (e.g. automatic light control in washrooms)
Pressure Burglar alarm, counting vehicles (traffic light control)
Acoustic Burglar alarm (listening for foot steps, measuring flow
rates of liquids in pipes (chemical plant)
Motion Radar guns (traffic speeding detectors)
Proximity/distance Same applications as light sensors and infra red
sensors

(b) Example chosen: automatic doors:

- (light, infra red, pressure) sensors monitor the area constantly


- if a person is detected (breaks a beam or heat source picked up or weight
detected on a pressure mat) ….
- …. a signal is sent to the microprocessor controlling the process
- …. an ADC is used if the signal is analogue
- if a person has been identified, then a signal is sent ….
- the microprocessor compares incoming signal with stored data/current status
(e.g. checks if the door is already open)
- …. to an actuator to open the door

29
3(a) Differences between RAM and ROM

RAM - volatile memory


- can be written to or contents read
- temporary store to hold data currently being used

ROM - holds instructions to start computer (e.g. BIOS)


- can only be read and cannot be changed (i.e. ROM cannot be
written to or edited)
- non-volatile memory

(b) Uses for various memory devices:


Application Device Reason for choice
MP4 or DVD
Multimedia files Holds large amounts of data to allow audio,
visual, video and animation
Music filesMP3
Compresses sound files to allow several
tracks to be stored using less memory
Can store files which can be taken away and
Word processed used on
CDany
or flash
computer; don’t normally need a
document huge memory capacity therefore other
devices not really needed

4 Devices to help disabled people:


Device Application
For people who can’t use a keyboard allowing input;
Touch screensalso
+ head
helps
wand
people with learning difficulties since icons
are easier to understand

On-screen keyboards For people who can’t use keyboards (use head wand
to select letters)
Blind and partially-sighted people can communicate
Voice recognition
with a computer using microphone and software
(keyboard and touch screens can’t be used)
Easier to use than a mouse if people have problems
Trackerball using their arms and hands or if they have a
coordination problem
Helps people who are partially-sighted since the larger
Large font size/use
icons and/or
of colour
colourful outputs on large screens are
much easier to see
Dot matrix printers can be modified to produce raised
Braille printers
dots (i.e. Braille) – this helps blind and partially-sighted
people to read the output
Loud speakers and special software are used to output
information in the form of sound to help blind and
Voice synthesis
partially-sighted people; it also helps people who have
These help
difficulty people who have difficulty
reading/understanding text using normal
keyboards (either because of difficulty using hands/
Foot activated controls Large/concept
To allow people
arms
keyboards
with
or coordination
restricted hand/arm
problems)
communicate
movement30 to
5 Data stored on magnetic stripes and bar codes:

- bar codes would contain key data such as product details (data is coded in the
form of light and dark bands of variable thickness)
- magnetic stripes (these contain key data such as customer account number, etc.
and is stored in an electronic form)

validation check on a bar code and credit card is usually a check digit

6(a) Input devices on an information kiosk:

- touch screen
- mouse/trackerball
- light pens

(b) Advantages of automatic kiosks to customers:

- no language problems
- no need to wait in a queue
- always open
- information usually more up to date and more accessible

(c) Advantages to management:


C.I.E. RAIL LINK
- system can be linked into websites to give live updates
- can advertise special offers,
HOMEservices, notices,
HELP etc. PRINT EXIT
- lower costs to the company
Timetables
(fewer staff to pay)
Buy tickets
(d) Sample screen:
Train info

Platform map

Car hire

Local hotels
15/10/2010 16:40
for (1) layout is sensible (not crammed into one corner) (2) logical screen options
[NOTE:
given (3)there
clearly
is no
a computer
“right answer”
screen to
(e.g.
thisdrop
typedown
of question.
menu boxes)]
Examiners 31
will look out
7(a) Operating system
(b) Advantages of ring:provides, for example:
Advantages of star:

- -user
works well under heavy loading - if one station fails/connection fails
interface
the other stations are not affected
- device management
- possible to create large networks - easier to identify faults in the system
- handles interrupts
- spooling to expand network
- easy
- Disadvantages
memory managementof ring: Disadvantages of star:
- multitasking
- -batch
faultyprocessing
connection between - if central hub breaks down, the whole
- multiprogramming
two stations can cause network network fails
-failure
error reporting/handling
- -loading/running software
difficult to add new stations
- processor management
- maintain user accounts
9(a)- utilities
Features(e.g.
expected
copy,insave,
the presentation:
re-name, sort, etc.)
- multimedia (text, graphics, video, animation, sound, etc.)
(b) RTTP features:
(b) Laptop features:
- fast response needed
- -files updated
can store immediately
presentations on the hard drive
-- portable
used when making bookings (etc.)
system can link into any to stop system
multimedia double booking
- take
no control takes place, but human
full advantage of WiFi system involvement takes place

(c) Advantages
RTPC of scanning in books to customers:
features:
-- easy to sensors
use of import text,
andgraphics,
feedbackphotos,
loops etc. into own work
-- easier to locate information
output can influence the inputin books
- easier to cross-check information in books
- used to monitor and control processes
- access to old and rare books (more accessible)
-- can
usually
“blow noup”
human involvement
text/diagrams needed
to make them clearer
- easier to “make notes” on the pages for future reference
(c)- more
Applications
than one include:
customer can access a book at the same time

(i) booking airline tickets


10(a)
(ii)90% reduction
control – so memory
of a chemical space required is ~ 4.5 Mbyte
process

(b) DVD features:


8(a)
- dual layering
- higher density of data storage is possible

(c) Reasons for increase in usage of CDs/DVDs:

- greater capacity (can store multimedia files)


- more robust technology (harder to damage)
- longer “shelf life” if stored properly

RING STAR

32
33

You might also like