0% found this document useful (0 votes)
9 views160 pages

CIE A1 Computing

The document outlines the CIE AS Computing syllabus, focusing on computer systems, software types, and modes of use. It details components of a computer system, including hardware and software definitions, types of software, and the importance of operating systems. Additionally, it discusses various processing modes such as batch, real-time, online, and offline processing, along with sample questions for assessment.

Uploaded by

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

CIE A1 Computing

The document outlines the CIE AS Computing syllabus, focusing on computer systems, software types, and modes of use. It details components of a computer system, including hardware and software definitions, types of software, and the importance of operating systems. Additionally, it discusses various processing modes such as batch, real-time, online, and offline processing, along with sample questions for assessment.

Uploaded by

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

CIE AS Computing

Main Menu
INTERNATIONAL
EDITION

MODULE 1
INTRODUCTORY COMPUTER SYSTEMS,
COMMUNICATIONS AND SOFTWARE.
Written by Christopher Leadbetter

MODULE 2
STRUCTURED PRACTICAL COMPUTER TASKS
Written by Roger Blackford

Page No. 1 of 160


1: Introductory Computer Systems, Communications and Software

1.01 Components of a computer system and modes of use


1.02 System software
1.03 Programming tools and techniques
1.04 Data, its representation, structure and management
1.05 Hardware
1.06. Data transmission and networking
1.07 Systems Development Life Cycle
1.08 Choosing Applications Software
1.09 Handling of Data in Information Systems
1.10 Designing the User Interface
1.11 Characteristics of Information Systems
1.12 Implications of Computer use

Practice Papers

Main Menu

Page No. 2 of 160


1.1: Components of a Computer System and Modes of use

1.1.a & b Hardware and Software definitions


1.1.c Different software types
1.1.d Modes of computer system use
Sample questions

Previous Menu

Page No. 3 of 160


Chapter 1.1 Components of a Computer System and Modes of Use.

1.1.a and b Hardware and Software Definitions

A computer system consists of hardware and software.

The hardware is the physical part of the system. All computer systems require at least four types of
hardware.

INPUT PROCESSOR OUTPUT

STORAGE

 An input device is any piece of hardware that allows data to be transmitted to the computer processor.
No computer, however powerful, is of value unless it is possible to give it instructions and data to be
used when those instructions are carried out.
 An output device is any piece of hardware that allows the computer processor to convey information or
the results of its processing. There is no point in having a computer system carrying out processing of
any sort unless the results of that processing can be either reported or used to effect future input to the
system.
 Storage is any piece of hardware, which can store data outside the processor in a form, which is suitable
for input back into the processor. This is necessary because data must be saved for future use if the
processor is switched off and for transfer from one machine to another.

Descriptions of the basic hardware types will be given in Chapter 5.

The software of a computer system is the various sets of instructions, which tell the system how to do things.
These sets of instructions are collected together in workable groups known as programs. Without programs
of instructions computers would not be able to function because they would not know what to do.

1.1.c Different Software Types

Sets of instructions to make a computer do something are grouped together as programs. These programs
make up the software of a computer system.

Depending on the sort of task that a program is expected to accomplish they are grouped into different types
of software.

 Operating system software is a program, or set of programs, which control the operation of the computer
system. They are responsible for the way that the pieces of hardware communicate with each other and
for monitoring the way that the hardware of the system is used.
 User interface software is used to provide a method of communication between the person using the
system and the system itself. Put very simply it is what you see on the screen when you are using the
computer.
 Translator software is necessary because the computer uses a language that is difficult for human beings
to understand and a computer is not capable of understanding human language. The translator software
provides the computer with the equivalent of a Chinese-English dictionary so that it can look up what
things mean.

Page No. 4 of 160


 Utilities, or utility programs, are system programs designed to carry out common tasks; for instance the
programs that control output to the printer or the storage of data.
 Programming languages are used to write sets of instructions that the processor can understand because
it has a translator for that language. There are many different programming languages, each of which has
been designed for a particular type of problem.
 Common applications software includes word processors, graphics, spreadsheets, and many others.
These are the programs that you use to produce something worthwhile on the computer.

All of these different software types will be covered in more detail later on in the work. For the moment, the
important thing is that you understand that there are different types of software designed to carry out
different tasks, and that you can give a brief description of each.

Systems Software and Applications Packages

Systems Software.
Computers are machines that can carry out operations very quickly. This does not mean that they are in any
way intelligent. However fast the machine can work, it is useless if it does not know what to do. Computers
need specific instructions for even the most trivial of tasks. If a computer user had to supply these
instructions there would be very few people able to use one. Consequently, the manufacturer of the machine
will provide programs that are accessible to the user by using very simple commands, these programs are the
system software.
 The operating system is the set of programs that control how the computer responds to user requests.
Examples that you may have used include DOS and Windows.
 Utility programs are additional routines that can be added to an operating system or that are available to
the user within an operating system. An example that you may have on your computer system would be
a piece of back-up software that can be used to make sure that you do not lose all your work when the
computer fails.
 Some frequently used routines are stored in such a way that they are accessible to users. These routines
are stored together in a system library, and form part of the system software. This is something of a grey
area between system software and application software because application software also gives access to
library areas.
 Program translators are needed in order to allow users to produce programs in a simple format which can
then be translated into something which the computer will understand.

Applications Packages.
A piece of applications software is a program, or set of instructions, designed to make the computer carry
out some task. It differs from system software in that it makes the computer do something that is useful for
the user. Word word-processing software, or Paintbrush graphics software are both examples of applications
software because they both allow the user to produce something that is of general use.
If the software can be used in many different situations to accomplish different things then it is said to be
generic software. For example a word processor can be used to write a letter, or to produce a report, or type
an essay,… A word processor is a piece of generic software.
If the software contains programs that allow lots of different tasks to be carried out, together with a book of
instructions telling the user how the software should be used, then it is called an Applications Package.
An integrated package consists of several parts, each of which is an application package. Further, the
integrated package is designed so that users can easily move data between the different parts of the
integrated package. For example, if two of the parts are a word-processor and a drawing package, users can
move a drawing, created using the drawing package, into the word processing package.

1.1.d Modes of Computer System Use


An operating system is a set of software that controls the working of a computer system.
Just as it is possible to change a computer system by buying a new piece of hardware, it is also possible to
change it by altering the programs that are being used to control it.
Page No. 5 of 160
We will be looking, in some detail, at the different effects that it is possible to get by changing the operating
system software at a later stage in this course. For now, we will content ourselves with a brief look at four
different groups of system software.

1. Batch processing.
The fundamental principle behind batch processing is that there are some jobs that need to be done
on a computer that take lots of time to do and stop the computer doing other things. Big jobs that can
be made to wait are put together in a “batch” which are all dealt with when the computer is not
needed for anything else. For instance, a bank’s computer system is used a lot during the day-time by
bank employees, but at night time it is used very little. The bank statements that take a long time to
print out are collected together and sent through the system at nighttime when the computer is free.

2. Real-time processing.
A real-time processing system is one, which makes decisions quickly enough to effect the next input.
For instance, if you are playing a computer game where you are driving a car around a course, you
would expect the computer to take account of the fact that you just turned right before it decides the
next position of your car. If the computer was not in real time mode, your decisions would come too
late to affect the game.

3. On-line processing.
On-line processing is when the user has direct contact with the processor. If you are reading this on a
stand alone computer then you are probably on-line because your commands are being dealt with by
the computer system as soon as you input them. This is as opposed to…

4. Off-line processing.
Off-line processing is when the user (or input) does not have direct contact to the processor.
A real-time system must be on-line because otherwise the input would not be able to reach the
processor fast enough to affect the output. A system where input at a keyboard is stored on a disk
before being input to the processor later, is an off-line system.

Page No. 6 of 160


Example Questions.

This section contains example questions based on the work in this first section of module 1. The work is of a
very basic level because of its position in the syllabus, consequently the number of questions is somewhat
restricted.
Typical examiner’s comments follow each question.

Q 1. Explain the difference between hardware and software. [2]


A. -Hardware comprises the physical parts of the computer system, while..
-software are the programs that make the machine produce useful results.
Notice that the answer suggested provides a link between the two terms. This was expected because
of the use of the words explain the difference in the question. There are two marks available for the
question so make sure that you have said two distinct things. Make sure that the second point is not
just the opposite of the first. In this example there would be no mark for saying that software are the
other parts that are not physical.

Q 2. Give two reasons why a computer system would need to have some type of external storage
device. [2]
A. -In order to store files when the power to the processor is switched off.
-In order to store files which are too large to be stored in the processor itself, until they are needed.
-To allow for the transfer of data from one machine to another.
Notice that the question asks for reasons why the system needs to have storage, NOT for what is
stored. Be careful to answer the question asked. Note that there are two indicators in the question that
you should give two answers, the word in bold and the number of marks. This question does not ask
for a comparison or an explanation, so don’t give them. Notice that there are more than two
acceptable answers. If you can think of three then give them, the examiner will choose the two best,
but never give more than one extra answer because you then demonstrate that you are not sure and
the examiner will choose your first two answers, right or wrong.

Q 3. Describe the difference between system software and application software. [2]
A. -System software controls how the computer system works while…
-application software allows the user to make the computer do something useful.
Again, this is a comparison type of question so the two parts of the answer should be related.

Q 4. An integrated applications package contains a number of different pieces of generic software.


State what is meant by an integrated applications package and generic software. [3]
A. An integrated applications package contains
-a number of different pieces of software which…
-can communicate with each other in order to…
-allow the user to produce valuable work.
Generic software is
-software that can be used in many areas for different end products.
Notice the fact that there are three mark points for the first part of the answer, this does not mean that
all three marks can be gained by only answering one part. In this type of question, some of the marks
are always reserved for the last part of the question.

Q 5. Give an example of a computer application which would use


(i) batch processing,
(ii) real-time processing
and give a reason why each of your suggestions is appropriate. [4]
A. (i) -Printing bank statements for all the bank’s customers…
-can be done at a time when other work is not being done.
(ii) -Playing a computer game because…

Page No. 7 of 160


-you expect that any decision that you might make should be dealt with before the computer
makes its next move.
Notice that it is important to make a conscious decision about how the marks will probably be
awarded to stop you wasting time giving more thorough answers than necessary. Also, there are
certain standard answers that will always be right. Some students decide to come up with something
new in questions like this and, while initiative is applauded, often don't explain their application well
enough to get the mark. The warning is always “Don’t throw marks away”.

Page No. 8 of 160


1.2 System Software

1.2.a Operating Systems


1.2.b Types of operating systems
1.2.c Types of user interface
Sample questions

Previous Menu

Page No. 9 of 160


Chapter 1.2 System Software

1.2.a Operating Systems


An operating system is a set of programs designed to run in the background on a computer system, giving an
environment in which application software can be executed.
Most operating systems comprise a large set of programs, only some of which are stored in the processor
memory all the time. Many of the routines available in the O.S. are stored on the hard drive so that they can
be accessed when required. This not only saves space in the processor memory but also means that the O.S.
can be easily changed to a different one.
When you are using an applications package you are not communicating with the computer hardware, you
are communicating with the operating system. Without an operating system, no matter how many programs
you have, the computer is useless. The operating system sits between the hardware and the application
program or user.

Programmer
Operating system

User Hardware

Applications
package
1.2.b Types of Operating System

Batch Processing:
When computing was still a new science, there were not enough machines to satisfy the demand for
processor time from students in universities who wanted great calculations done, firms who wanted their
payroll worked out, and many others. The big problem was the ‘speed mismatch’ between the user sitting at
the keyboard who was very slow, and the machine which was very fast. There are two simple solutions to
this problem, one is to buy more machines and the other is to make the machines work more effectively by
taking away the slowest part of the system – the human being. Nowadays we might well opt to buy more
machines, but this used not to be an option. This problem gave rise to the development of batch processing.

A batch processing operating system is one that does not allow for interaction between the user and the
processor during the execution of the work. Lots of programs that need to be run are collected together (to
form a batch) and they are sent to the computer. The batch operating system then controls their passage
through the computer.
Nowadays, batch processing tends to be used where
 there are large amounts of data to be processed,
 the data is very similar in nature and…
 it requires similar processing,
 the computer system has identifiable times when it is not being used, and so has available processor time
 the application does not require human intervention.
Typical examples of applications which would be done using batch processing include production of bank
statements from customer files, production of gas (electricity, telephone) bills from customer records, the
compilation of high level language programs where a number of users want programs compiled.

Real-time:
A real-time O.S. is one which can react quickly enough to affect the next input, or process to be carried out.
Most real-time systems are based on control of some process in the real world or on information handling. A
chemical plant has a reaction vessel where the temperature is critical to the result of the process. The
temperature is monitored by a computer which accepts input from a sensor and then makes a decision
Page No. 10 of 160
whether to adjust the heating elements in the vessel. In this example, it would not be sensible for the
computer to be running any O.S. that is not real-time because if there was a delay in the decision making
process, it might mean that the reaction is corrupted in some way. A robot trolley is controlled by a
processor which takes input from a sensor following a black line on the floor, and makes decisions
concerning steering to keep the trolley on the black line. If the processor was not controlled by a real-time
O.S., the trolley would very soon leave the black line because it would not be steering quickly enough. A
catalogue shop processes orders by the code for a product being input and the system then comparing the
code with information in its files. When it finds the correct code it can report to the user the number of that
item that there are in the store. If there was only one left of a certain item, it would be necessary to record
the fact that a shopper had bought it before the next shopper has their request dealt with otherwise the
second person might be sold the same item. Because the information on the system must be processed
immediately the O.S. needs to be ready to handle input as soon as it comes in. This means that it cannot be
using up some of its slack time doing other tasks while it is waiting to be asked to do something. This
implies that the computer will not be using its full potential as far as processing is concerned. When this
happens it is said to display a high rate of redundancy. Real-time systems tend to display a high rate of
redundancy.

Single User:
As the term implies, a single user O.S. is specifically one that is used to control a system which has only one
user, and their programs, at any one time. A perfect example of a single user system is the one that you may
have at home. Only one person uses it at a time. Most single user systems are also

Multi-tasking:
This is a type of O.S. that allows several applications to be available simultaneously. On a simple single user
system you will probably be used to having a number of things running at the same time. Perhaps one
window shows a spreadsheet while another shows a word processing application. You may decide to copy
the sheet from the spreadsheet software to the word-processed document. It appears that more than one task
is running simultaneously. They aren’t, they just appear to be. The O.S. that most of us use on our own
computer systems, Windows, is a multi-tasking O.S.

Multi-user:
Again, as the name implies, this type of O.S. services more than one user simultaneously. There are two
types of multi-user O.S.:
1. A network system comprises a number of computers linked together for the purposes of
communication and sharing of resources. Normally one of the machines is used to control the rest of
the system, this machine is called the server. Networks are important because they allow hardware
and software to be shared and also mean that a single copy of the information on a system is needed,
and so can be kept up to date relatively easily.
2. A time-sharing system has a single (normally powerful) computer which is connected up to a number
of terminals. These terminals are not computers as in the case of the network system, but have a very
limited amount of processing power. Again, such a system allows communication between users on
the system and also allows sharing of hardware and software across the system. At the moment it is
difficult to tell the difference between the two types of multi-user system, but we shall return to this
in a later chapter.

Distributed:
A distributed system is one that allows software and data files to be distributed around a system. An
ordinary network will have a server controlling it and the access to the hard drive, which is connected to the
server. A distributed system might store the word processing software on one computer’s hard drive, while
the files of work are stored somewhere else, and the spreadsheet software is stored on a third disk drive. This
can speed access to files because there is no single bottle neck which all the information must pass through.

Page No. 11 of 160


1.2.c Types of User Interface
A computer is used by a person who needs to communicate with the machine in order to instruct it as to their
wishes. The person also receives responses from the computer. The means of communication between the
user and the machine is known as the user interface and consists of both hardware and software. There are
different types of interface, which are useful in different situations and for different types of user.

Form based:
If the majority of the input to a system is of a standard type, in other words the computer knows what sort of
input to expect, then a typical interface will produce a form on the screen to be filled in. This sort of
interface would be used where an operator is inputting information while asking a customer questions over
the telephone. The interface
 prompts the operator to ask all the questions
 makes the operator input the information in the correct order
 ensures that the information is input in the correct format by having specific areas to input the data
 makes the checking of the information easier.

The characteristics of a form based interface are that


 it has specified areas for the data. For example, boxes for input of coded material like the date or the sex
of the customer, and areas to be filled in with textual information
 it has a cursor which moves to the next box to be filled in, sometimes the box is highlighted to make it
clear to the operator where the data is to be inserted
 some of the boxes are more important than others and the cursor will not move on until some data has
been supplied
 it checks that what has been input is sensible for that box before moving on to the next.

Menu based:
Menu based interfaces are used in situations where the operator tends not to know what the options are that
are available. Examples of this would be information systems for tourists or users of a particular service. A
list of choices is made available followed by a further set of choices based on the first choice, and so on until
the result is obtained. Imagine a system at a train station in a popular holiday location. The first screen may
ask for the general area of interest (accommodation, trips, shopping, entertainment..), once the choice of
accommodation has been made the next screen may offer different standards of hotels. The next screen may
offer different price bands, and finally a list of all the available properties that match the previous choices.
Input is often done using a touch screen because of the location of such systems and because the people who
use them are often in no way computer literate, meaning that simple systems are essential.

Graphical:
Graphical interfaces are called GUI (graphical user interface) or WIMP (windows, icons, menus, pointer).
The terms describe what the user sees on the screen. There are many different types, but the user would
expect to be able to view different applications or files on the screen, this is done by putting each into its
own boarded area known as a window. The user will expect to be able to select options by use of menus of
choices and by using small pictures which represent the different options available. Choices are selected by
the user by using some sort of pointing device to indicate choice, typically this would be a mouse.

Natural language:
Sometimes referred to as a conversational interface, the computer will ask questions which elicit a response
which gives the user the impression that they are talking to the computer. The trick is that the system
restricts itself to questions to which the only sensible answers are the ones that it knows. If the user leaves
the expected responses, a message is produced which makes clear that a further attempt is required.

Command line:
Or command based interface is one where the user types a series of commands at the keyboard which tell the
computer what their intentions are. The user needs to know what the possible commands are, and also needs
to understand the way files are stored on the system. The characteristics of a command based interface are
Page No. 12 of 160
 the user needs to know what commands are available
 the user needs to understand the commands
 the user needs to understand the way that material is stored in the computer system

Because of the above points there are two very important characteristics about a command based interface.
First, the system is very much more open than in the other types of interface. Other interfaces restrict the
options that the user has available to them. This can be particularly important for the system manager
because different users can only be allowed to have access to specific parts of the system. The second
characteristic is that command based interfaces can only be used by computer literate people because you
not only have to understand the commands and their uses but you also need to understand something about
how the computer operates, particular how information is stored.

There are many other points to be made about interfaces, especially the fact that the second part of the
interface consists of the hardware necessary to put the software interface into operation. These points will be
made when the appropriate stage is reached in this course.

Page No. 13 of 160


Example Questions.

Q 1. Define what is meant by the term operating system. [2]


A. -A (suite of) programs…
-which run the basic functions of the computer…
-giving an environment in which to run application software.
A question which begins with the word define, leaves very little room for manoeuvre because it is
asking for a standard answer. This is not an opportunity to show your prowess by making up an
answer that is original- there aren’t any. Note, also, the fact that three answers have been given.
Always try to give one more answer than seems to be required by the question.

If you look at a mark scheme for an examination paper, the mark points are listed as a set of bullet
points so there is no reason why you should not do the same. This style of answer helps you to write
down your thoughts easily without getting confused by the language. The purpose of this
examination is not to test your ability with English, rather to test your knowledge of computing.

Q 2. Give two reasons why an operating system is likely to be stored on backing storage rather than
in the memory of the computer. [2]
A. - A full operating system requires a large amount of storage space that is better utilised in the
computer memory for applications
- Storage of the operating system on backing storage allows for easy upgrading or changing from one
system to a different one.
Note that the temptation to call the operating system the O.S. has been resisted in the answer. In
general, do not use abbreviations in your answers. There are exceptions, where the abbreviation is
the accepted form, but your own versions may be ambiguous or, even, not understood by the
examiner. If you do need to use an abbreviation, because the term is to be used a number of times,
give the term in full with the abbreviation that you want to use in brackets after it. For example, the
first time that you use the term operating system write “…operating system (OS)…” you can then
use OS as often as you like in the rest of your answer.

Q 3. Distinguish between a multi-tasking and a multi-access operating system. [2]


A. - A multi-tasking operating system is one where the user of the machine is given the impression that
they can carry out more than one task at a time.
- A multi-access operating system is one where it is possible for more than one user to access the
system apparently at the same time.
Note that there are a large number of points that could have been made about both of these operating
systems, but most of them would not answer the question. It is important when answering a question
starting with ‘distinguish’ to choose facts that show a comparison.

Q 4. State what is meant by a distributed system, and give an advantage of this type of multi-access
system over a simple network of machines. [2]
A. - A distributed system is one which uses many storage locations on different machines to store
software and files.
- Access to files can be speeded up because more than one file command can be carried out at a time.
When an advantage is asked for it is normal to state in the question, either explicitly or implicitly,
with what the comparison should be made. Be careful to give an advantage using this comparison
and not a more generalised one.

Q 5. A computer operator takes phone calls from the public who ring up asking whether a
particular item in a catalogue is available. The operator needs to type in a series of responses to
questions put to the caller, so that the computer can check the file and determine whether there
are any of that item available. Design a screen interface that would be suitable for the operator
to use. (4)

Page No. 14 of 160


A. - Form type interface
- Catalogue number
- Space for the description of goods, which will be filled in by the computer itself
- Spaces for computer to produce availability and price
- Laid out with spaces for input.
What is just as important here are the things that would not be on the screen. The question makes it
quite clear that there is no ordering going on, so spaces for name and address, or method of payment,
are not only going to score no marks, but will probably be penalised because they demonstrate that
the candidate has not understood the question. In this type of question it is important to demonstrate
that you have taken the situation into account.

6. The technician responsible for maintaining the system in question 5, uses a command line
interface.
a) Explain what is meant by a command line interface. [2]
b) Give two advantages and one disadvantage to the technician of using a command line
interface rather than a menu based interface. [3]
A. a. -Series of commands typed at a screen prompt…
-which give specific instructions to the computer.
b. Advantages:
-Entire system is available to the technician
-Access to the particular part of the system required is gained more quickly than using other
types of interface.
Disadvantage:
-The technician needs to know the commands that are available
-The technician needs to understand the way the system is designed so that it can be
navigated efficiently.
Note: The language used in this answer is not the sort of language that a candidate will use in an
examination. Don’t worry about this. Answers like “so that you can get around the system” are
perfectly acceptable.

Page No. 15 of 160


1.3 : Programming Tools and Techniques
1.3.a Structure
1.3.b Techniques for writing software
1.3.c Programming constructs
1.3.d Procedures and functions
1.3.e Program translation
1.3.f Types of programming errors
1.3.g Testing methods
1.3.h Debugging
1.3.i Annotation
Sample questions

Previous Menu

Page No. 16 of 160


Chapter 1.3 Programming Tools and Techniques.

1.3.a Structure
The solving of problems using computing techniques relies heavily on being able to divide the problem into
a series of steps that should be solved in a sequence in order to solve the entire problem.

The sequence of steps that need to be carried out in order to solve a problem, which takes into account the
order of the steps, is called an algorithm.

There are a number of ways of presenting such algorithms.


Consider the problem: How to calculate the perimeter of a rectangle when it has length (l) and breadth (b).
We all know that the answer is obtained by simply finding the lengths of the four sides and adding them up.
Indeed, the last sentence is an algorithm. It tells you how to solve the problem that has been set and if the
instructions are followed, the answer should be worked out. This is a prose solution to the problem because
the answer is given as though it is spoken language. While it is a perfectly good description of the algorithm
here, the problem is a very simple one. The difficulty with spoken language is that it is hard to describe more
complex solutions because of ambiguities.

Consider some other methods for writing down an algorithm.


1. In maths we use formulae for showing the solutions to simple problems, in this case
Perimeter = length + breadth + length + breadth
or
Perimeter = 2 * (length + breadth)
It is important to realise that there is no single right answer. Either of these formulae will work, and
when we are considering an algorithm some may be more efficient than others, but if they work out
the answer to the problem then that’s enough. A simple algorithm like this can sometimes be
expressed as a single formula.

2. There are two things that have to be done to produce an algorithm to solve this problem. We have to
times by two, and we have to add the length and breadth together. However there is one further
factor, they must be done in the right order or the answer will be wrong. This leads to another way of
writing down an algorithm: write down the steps and number them so that they are done in numerical
order. In this case the algorithm is
1. Find the length and breadth
2. Add the length and the breadth together
3. Multiply the result by 2
4. End
3. Another way of showing this order is to use arrows pointing from one instruction to the next

Find the length and


the breadth

Add the length and


the breadth together

Multiply the result by


two

End
Page No. 17 of 160
The example shows the individual instructions in nice neat little boxes, this is certainly not necessary, and
also uses the normal rule of reading down a page. However, providing the arrows are in the correct order
then the instructions can be placed anywhere. This type of representation of the algorithm is known as a
flow diagram.
There are many other ways of defining the solutions to problems, some of which you will meet later in this
course.

1.3.b Techniques for Writing Software.


When a piece of software needs to be produced, the problem to be solved is likely to be far more complex
than the calculation of the perimeter of a rectangle. An algorithm like that is easy for a human being to be
able think about because it is so short, however, most useful problems involve such complex algorithms that
it is not possible to consider them in one go. For this reason problems are normally divided up into a number
of smaller problems, each one of which can be solved separately, and then combined to give a solution to the
whole problem.
Consider that you have been asked to produce a solution to the problem of computerising a set of traffic
lights in the centre of a town. The problem is a very complex one, but if it is divided into:

 How is the data going to be collected from sensors and stored in the system?
 How is the decision going to be made about the changing of the lights?
 How is the data collected from the pedestrian crossing and then stored..
 and processed?
 What outputs are necessary, and how are they controlled?

Then each problem becomes more manageable.


This sort of approach to problem solving is called a top-down approach, in that we started with an original
problem (the top) and split the problem into smaller and smaller parts until they became manageable. When
each of the individual problems has been solved the solutions are combined to produce a solution to the
whole problem.

These individual parts of the solution are known as modules.


There are other advantages in this sort of approach.

 More than one person can be engaged on solving parts of the same problem simultaneously,
consequently the problem should be solved more quickly.
 Different people are good at different things, so our company uses Aisha to solve the problem of
collecting the information from the sensors, because Leon is not very good at that, whereas he is an
expert concerning controlling things using a computer, so he does the processing module.
 Last month, our company produced a similar solution for a set of traffic lights in a different town. The
sensors used were different, so Aisha still has to produce her module, and the number of roads is
different so Leon will still need to come up with a solution for his module. However, the lights and other
output devices being controlled are the same, so we might as well use the same module that we used last
time. This happens often, that one of the modules is the same as one used previously. Because of this,
software firms store the modules that they have produced so that they can be used again if the chance
arises. Collections of modules like this are known as software libraries.
 Because the algorithms for the modules are so much shorter than for the whole problem, it is likely that
the person producing a module will make fewer mistakes. Also, because the module is quite short, it is
much easier to spot any errors that have been made, and correct them. This means that the finished
software should be more reliable when it is being used.

One way of describing the modularisation of a problem is to use a diagram to show how the parts fit
together. Don’t worry about such diagrams at the moment, we will meet them again in module 3 and they
will become important when we want to explain the solutions of the major project in module 4 of this
course.

Page No. 18 of 160


If we imagine the same problem, and start with a control module, then realise that we have to provide an
input module, and so on… the problem will still be solved, although the approach is the opposite to the one
that we have just considered. This type of approach is known as a bottom up approach. Although the
outcome is the same it is a far more dangerous way to approach the problem because the final outcome has
not been considered and may not be arrived at by the most efficient algorithm.

1.3.c Programming Constructs


As we saw in the first section of this module, the solution to a problem can often be thought of as a sequence
of steps which should be taken in order. The same is true when a program is being written. Generally, you
start at the beginning and follow the steps, in order, until you come to the end, by which time the problem
should have been solved. Looked at diagrammatically, a computer program could be drawn as
Start

Program instructions

End
This type of combination of operations is known as a sequence. However, the real power of computer
programs becomes apparent when we change these rules. There are a number of ways of breaking out of the
simple sequence, we will look at two of them here.

1. Selection
Selection is the process of making a choice. The simplest example is the command
If…Then…Else… This is used to divide the sequence into two possible routes. There is a condition
(something like an answer being more than 10) and then two possible outcomes, one is followed if
the condition is met (for instance, use a discount price because of the number bought), and the other
is followed if the condition is not met (use the standard price).
Diagrammatically, this can be represented as
Start Start

Condition Compare answer with 10


Met Not met Answer >10 Answer <= 10

This example simply gives two options, the condition statement can have a number of possible
results, each giving a different route.
Note that, eventually, all these different routes must either come back together or must have some
suitable end point.

2. Repetition
There are a number of ways of repeating the same instructions more than once. We will have a look
at three methods here. Each one of these methods have two things in common. The first is some sort
of pointer that sends control of an algorithm to some point other than the next instruction in the
sequence, and the second is some method of controlling whether the pointer is followed or whether
the normal sequence of instructions is followed.

Page No. 19 of 160


A repeating construct is often called a loop.
a. The first of these loops is one where the control of the loop is at the end of the loop. It is
called a REPEAT…UNTIL loop.

Keep repeating the following commands

(LOOP) Instructions inside loop

Until some condition is met,


(Condition not met) then exit loop
(condition met)

Note that the instructions in the loop have to be carried out at least once before there is the chance of
meeting the condition.
b. The second loop structure is a WHILE…ENDWHILE loop. This structure has the condition
at the start so that it is possible to miss out the instructions in the loop entirely.

(Condition not met)


While the condition is met
Do the following commands
(Condition met)
(LOOP)
Instructions
Go back to the start of the loop

c. The third type of loop is called a FOR…NEXT loop. This loop is repeated a predetermined
number of times. A counter keeps check of the number of times the loop has been done, and
when it has done enough the loop is exited.
(Decide how many times to do the loop)

If the counter is less than, or equal to, the


number of times selected,
do the loop again

Add 1 to
the counter (LOOP)

Go back to the start of the loop

Note that with the For/Next loop the number of times around the loop is determined before entry into
the loop.

Page No. 20 of 160


1.3.d Procedures and functions
As we saw in section 1.3.2, it is useful to be able to divide a problem into modules so that each part of the
problem is easier to solve. When the algorithm is turned into a computer program it makes sense to program
each of these smaller modules separately and then connect them together to make the whole program. These
small segments of program are called procedures and functions. To start with we will call them all
procedures, they are very similar anyway, and later we’ll see what the difference is.

Imagine a computer program. It is made up of a number of instructions taken in order. In section 1.3.c we
saw some constructs that could change the simple order, but for the sake of clarity we will ignore them and
return to our original diagram of a program:
Start

Program instructions

End
If the program has been split into sections by modularising the algorithm, it is more likely to look like this:
Start

Start of Module 1
Start of module 2

End of module 1 End of module 2


End
Each of the modules is called a procedure when it is in the form of a program of instructions. The diagram
shows a main program which, just under half way through, runs a procedure to carry out a particular task,
which itself runs another procedure. Note two things about these procedures:

1. If they work something out, presumably they must pass the answers back to the main program,
otherwise they have been wasting their time.
2. When the procedure has been finished the next instruction is back where it came from in the first
place. This means that the computer must remember whereabouts it was when it went to the
procedure so that it can go back there.

We are not going to answer either of these questions now, but will return to them later.
A procedure could be used for putting a menu on the screen, and then another could be used for reading the
choice made and acting upon it. At some point a procedure could be used to work out the square root of a
number. This is slightly different because the result at the end of the procedure is a value which,
presumably, will be used in the main program. A procedure which gives a value at the end is known as a
function.

1.3.e Program Translation


When a human being writes a computer program it is important for them that they can use a language which
is easy to understand. After all, the algorithm will probably be difficult enough to follow without the
language being difficult as well. Computer languages like this, that the person finds easy to understand, but
the computer can’t, are called high-level languages.

A computer can only understand 0s and 1s, in other words, binary numbers. So the language which the
computer uses is all in binary and very difficult for human beings to use. Languages like this are called
machine code languages. If the program is written in a high level language and the computer can only run it

Page No. 21 of 160


in machine code, then it has to be translated from one to the other, just as a letter in Chinese may need to be
translated into English if an English speaker is to be able to read it.

High-level Machine
Language Translator code
A program which is written in a high level language is called the source code. After the source code has
been translated the program is called the object code (or executable form).

Source Object
code Translator code

The object code is normally much bigger than the source code because it takes lots of machine code
commands for each of the high level language commands.

There are two types of translator, one is called a compiler and the other is called an interpreter. We do not
need to know any more about these two translators yet.

1.3.f Types of Programming Errors


When programs are being written it is not surprising that mistakes are made, after all they are very
complicated. There are three types of error which can be made when program code is being produced.

1. Syntax errors. These are errors in the use of the language. The rules have been broken. A command
word might be PRINT. If it was typed in as PLINT the translator program would not recognise it and
so would not be able to translate it. This is not a difficult error to spot because when the programmer
tells the translator to translate it, a message will be returned saying that a mistake has been made and
telling the programmer which word it cannot recognise. There are other ways of breaking the rules,
for instance a language might be set up to only accept a mathematical formula if it is in the form of a
variable followed by an equals sign and then a collection of variables. So X = 3*(2+A) would be
accepted by the translator, but
3*(2+A) = X would be rejected as an error even though, mathematically, it is identical.

2. Logic errors. A logic error is a mistake in the way the program solution has been designed. For
example, an instruction in a program may tell the computer to jump to another part of the program.
This is fine as long as the instruction tells the computer to go to the right part of the program. If it
tells the computer to go to the wrong place, it is highly unlikely that the program will produce the
results that were expected. Unfortunately, such a mistake does not usually make the program stop
working, it just makes it produce wrong results. This makes it difficult to spot that a mistake has
been made, and even when the programmer realises that something has gone wrong, finding where
the error is can be very difficult. Another sort of logic error is sometimes referred to as an arithmetic
error.

3. Arithmetic error. This is a type of logic error. Arithmetic errors are created when inappropriate
arithmetic is used. A good example is when a computer is asked to divide by 0, this is impossible and
would cause the program to fail.

1.3.g Testing Methods


When a system is designed it is important that some consideration is given to making sure that no mistakes
have been made. A schedule should be drawn up which contains a test for every type of input that could be

Page No. 22 of 160


made and methods of testing that the program actually does what it was meant to do. This schedule is known
as the test plan. Note that it is produced before the system is produced.

There are a number of ways of testing a program.


1. Different values can be input for variables to determine whether the program can cope with them.
These values should include typical values, borderline values and values which are not acceptable.
For example, if a program is written which uses marks out of 100 from a maths examination as input,
the test data would include typical data like 27, 73.., borderline data which would be 0 and 100, and
unacceptable data like –34, 123, 16.345 This type of testing is called black box testing.

2. White box testing is testing the program to determine whether all the possible paths through the
program produce the desired results. As a large program can have a very large number of routes,
when you take into account the different condition statements and loops, white box testing is rarely
carried out exhaustively.

Think of black box as a test where you cannot see into the box (program) all you see is what comes
out at the end. White box testing means that you are able to see what is happening as the data goes
through the box because it is transparent.

3. Alpha and Beta testing. When you have written a program and you sit down to test it, you have a
certain advantage because you know what to expect. After all, you wrote the program. This can be
extended to the whole software company, as the employees are all computer-minded people. Testing
carried out by people like this is known as alpha testing. Eventually, the company will want ordinary
users to test the program because they are likely to find errors that the software specialists did not
find. Testing carried out by the users of the program is called beta testing. If you continue the course
next year, in order to turn your AS grade into an A level, you will have to write a project. This
involves using a computer to solve a problem for someone. When you have finished your project you
will be expected to test whether or not it works, this is alpha testing. You will also get marks if you
persuade the person whose problem you are solving to test it for you, this is the beta testing.

1.3.h Debugging
Errors in computer solutions are called bugs. They create two problems. One is correcting the error, this is
normally fairly straightforward because most errors are caused by silly mistakes. The second problem,
however, is much more complicated, the errors have to be found before they can be corrected. Finding
where the error is, identifying it, can be very difficult and there are a number of techniques available for
solving such problems.
1. Translator diagnostics. In section 1.3.e we were introduced to the idea of a translator program. Each
of the commands that are in the original program are looked at separately by the translator. Each
command will have a special word which says what sort of command it is. The translator looks at the
special word in the command and then goes to its dictionary to look it up. The dictionary tells the
translator program what the rules are for that particular special word. If the word has been typed in
wrongly, the translator will not be able to find it in the dictionary and will know that something is
wrong. If the word is there, but the rules governing how it should be used have not been followed
properly, the translator will know that there is something wrong. Either way, the translator program
knows that a mistake has been made, it knows where the mistake is and, often, it also knows what
mistake has been made. A message detailing all this can be sent to the programmer to give hints as to
what to do. These messages are called translator diagnostics.

2. Sometimes the program looks alright to the translator, but it still doesn’t work properly. Debugging
tools are part of the software which help the user to identify where the errors are. The techniques
available include:
a) Cross-referencing. This software checks the program that has been written and finds places
where particular variables have been used. This lets the programmer check to make sure that
the same variable has not been used twice for different things.

Page No. 23 of 160


b) Traces. A trace is where the program is run and the values of all the relevant variables are
printed out, as are the individual instructions, as each instruction is executed. In this way, the
values can be checked to see where they suddenly change or take on an unexpected value.
c) Variable dumps. At specified parts of the program, the values of all the variables are
displayed to enable the user to compare them with the expected results.

3. Desk checking is sometimes known as a dry run. The user works through the program instructions
manually, keeping track of the values of the variables. Most computer programs require a very large
number of instructions to be carried out, so it is usual to only dry run small segments of code that the
programmer suspects of harbouring an error.

4. In section 1.3.b we discussed the splitting up of a problem into smaller and smaller parts, until each
part was a manageable size. When the parts were combined they would produce a solution to the
original problem. Because we are starting with a big problem and splitting it into smaller problems,
this was called top-down design. When the program is written, each small program is written
separately, allowing the small programs to be tested thoroughly before being combined. This is
called bottom-up programming. The technique is particularly useful for testing the finished program
because it is far easier to test a lot of small programs than it is to test one large one. One problem can
arise, because the small programs have to be joined together, these joints have to be tested too to
make sure that no silly mistakes have been made like using the same variable name for two different
things in two parts of the program (tested by cross referencing).

5. Test strategies are important to establish before the start of testing to ensure that all the elements of a
solution are tested, and that unnecessary duplication of tests is avoided.

1.3.i Annotation
Program writers need to be aware that the programs that they write will need to be maintained long after
they have gone on to other projects. For example, a program is written to control the stock in a warehouse.
The program has been fully tested and any problems appear to have been solved. Some months later, a
particular chain of events occurs that means that the software does some instructions in an order that has
never arisen before, and an error occurs. Someone has to find the error in the program. Some time later, the
warehouse expands in order to deal with an increased supply of goods and the computer system needs to be
amended to allow enquiries from the Internet. This again implies that the program will need to be altered to
accommodate the new circumstances. In both these cases it is highly unlikely that the original programmer
will be the person that has to do the adapting of the code.

The new programmer is going to be grateful for all the help they can get in understanding the old program.
Help given in the code itself is known as annotation, the purpose of which is to make the code as simple as
possible to follow.

One way to help demonstrate the structure of the program is to make parts of the code stand out from the
rest by indentation. If this is done without some thought then it is meaningless, but if a procedure of a
program is made to stand out in this way then it is very easy to see whereabouts the procedure is.

If there is a loop structure, perhaps a While…Endwhile loop inside the procedure, then that can also be made
to stand out by using a further indent.

Many programming languages automatically indent some of the programming constructs available in the
language. Another way is to write comments in the code of the program which are aimed at a human being
looking at the program, rather than at the computer that is running it. Most programming languages have an
instruction that can be used for this. It simply tells the computer that anything that comes in this instruction
is to be ignored.

Page No. 24 of 160


A further technique is to use sensible variable names. If an input is required at some point in the program,
and the input is the number of marks that the student obtained in their maths exam, the variable used to store
the number could be many things. However, if the variable name X was used, another programmer looking
at the code would need extra information to understand what X stood for. If the original programmer had
used the variable name MATHS_MARK, the name is self-explanatory and hence makes the program easier
to follow. The other obvious way of making the program easier to follow is to adopt a top-down design
which enables the individual procedures to be easier to understand than one large program.

Page No. 25 of 160


Example Questions.

Q 1. A roll of wallpaper is 50cm wide. Each roll is 15m long. A room measures x metres long by y
metres wide and 2.5 metres high. Ignoring the door and any windows that there may be,
describe an algorithm for calculating the number of rolls of wallpaper needed to paper the
room. [4]
A. - Add twice x to twice y/Work out total length of walls
- Divide by .5metres/work out the number of strips of paper needed
- Divide 15metres by 2.5metres/work out the number of strips in one roll of paper
- Divide number of strips needed by the number of strips in one roll
- Indication of the order required.
Note that the mark scheme is not presented in any particular algorithmic form. This is because the
syllabus does not specify that a particular form be used so it is entirely up to the candidate, provided
that the two points about stating the tasks to be carried out and specifying an order are met. Also
notice that the first three steps of the algorithm are presented in two ways. One could be called
mathematical while the other is descriptive. Either is perfectly acceptable. One last point about the
mark scheme is that an algorithm implies that order is important, so it is highly likely that in an
exam, such a question would insist on an order as an essential feature of the solution. In other words
one mark would be reserved for providing a definite statement of order.

Q 2. Set the counter to 0 and the total to 0

Read a number

Add 1 to the counter

Add the number to the total

Yes
Are there any more numbers?
No
Divide the Total by the counter

Report the answer

Describe the effect of this algorithm. [4]


A. - An unknown number of numbers…
- is read into the algorithm.
- When there are no more numbers to read
- The average (mean) is worked out
- The answer is then output.
Producing an algorithm to anything other than a trivial problem under exam conditions is difficult.
One solution to this problem is for the examiner to produce the algorithm for the candidate and then
expect the candidate to follow the logic. The example here is a very simple one but illustrates two
points. First, the fact that whatever the algorithm is it will be short, and secondly that while many
algorithms are mathematically based the mathematics is not necessary to attain full marks. When
answering a question like this pay particular attention to the number of marks available, and be
careful not to simply write down what is given in the algorithm. E.g. no marks would be given here
for saying that one is added to the counter.

Page No. 26 of 160


Q 3. Give three advantages to using a top down approach when designing a solution to a
problem. [3]
A. - Many people can be involved in the solution
- Individual skills can be used
- A module can be used from the software library
- Each module is far easier to understand than the whole program is.
- Fewer errors are likely to be made
- Any errors that are made will be easier to correct.
A standard question, whose answer jumps from the notes.

Q 4. A piece of software is to be written which will control a central heating system. It is decided
that the software is to be written as a set of four modules. State four modules, whose combined
solution would be a solution for the whole problem.
A. - Handling of the input from the sensors
- Interface with the owner of the system allowing input of important values
- Processing module which makes decisions about the heating requirements
- Control of the output devices in order to carry out the processing decisions
- Alarm system in case of errors occurring.

Q 5. X=1
WHILE X < 9 DO
X=X+1
Y=X*X
PRINT Y
ENDWHILE
The intention of this module is to print out the square numbers from 1 to 100.
a) Write down the output that the module will produce. [2]

A. -- 4,9,16,25,36,49,64,81
- An indication that the candidate realises that the first value of X that is used is 2 instead of 1
- An indication that the last value used is 9 when it should have been 10.
Notice that the arithmetic is not being tested here. It is possible to get full marks even if you can’t
multiply. The examiner is not trying to test your mental arithmetic but is seeing whether you can
follow a small section of logic.
b) Using the same structure, produce a similar module that will work. [2]

A. - Change the X = 1 to X = 0
- Change the WHILE X<9 DO to WHILE X<10 DO
These are not unique possibilities. There are plenty of other ways of achieving the same results. The
mark scheme is really one mark for correcting each of the output errors in the original.

Q 6. REPEAT
INPUT NUMBER
IF NUMBER <> 0 THEN TOTAL = TOTAL + NUMBER
COUNT = COUNT + 1
ELSE ZERO = ZERO + 1
UNTIL COUNT = 5
ANSWER = TOTAL/COUNT
PRINT ANSWER, ZERO
a) If the numbers 3,5,4,0,4,0,9,1 are used as data for this procedure, state what the
printout will be when the procedure is completed. [2]
A. 5 and 2. (1 mark each)

Page No. 27 of 160


b) Identify the condition statement, and explain what it does. [3]
A. -IF…THEN…
ELSE…
-Decides whether the number input is zero or not.
-A count is kept of all the zeros input, and the other numbers are used in the calculation.
Note that the algorithm is provided. It would be hard to expect candidates to produce algorithms of
this type in an exam, to all but the most trivial of problems. The description in part (b) can be in the
broadest terms. The examiner is not looking for a brilliant insight into the logic, simply for an
indication that the student understands the general principles.

Q 7. State what is meant by the terms


i. Source code
ii. Object code
iii. Machine code [4]

A. -Generally, code means a set of instructions designed to carry out a task


-Source code is the version of the program written by the programmer…
- in high level language.
-Object code is the executable form of the program…
-created by the translator
-Machine code is in binary form.
Note that there are plenty of marks available here, and the fact that the mark comes at the end of the
question implies that the dotties are lumped together and that the marks are largely interchangeable.
Teacher’s note: there is no distinction between interpreter and compiler as yet. Even to the extent
that students are not penalised for not knowing that the interpreter does not produce an object code. It
is not yet in the syllabus, so should not be expected.

Q 8. Describe the relationship between the source code and the object code. [2]
A. -The source code is the original program while the object code is after translation.
- There is a one to many, relationship between the two.
Note. This could have been a very complex answer. However, you don’t know a lot about translators
and their effects yet, and a look at the number of marks available tells you that the answer is strictly
limited. The second mark point is rather strangely put, it simply means that the object code is longer
than the source code, and if that’s what you said you would get the mark.

Q 9. State three types of program error and give an example of each. [6]
A. -Syntax error
-Mistyping a reserved word, eg typing plint instead of print
-Logic error
-A jump instruction that tells the computer to jump to the wrong place
-Arithmetic error
-Inappropriate use of arithmetic. Eg dividing by zero
Note. There are many possible errors that could be given as examples of each of these. It is sensible
to stick to the standard answers that way there is no chance of picking a wrong one.

Q 10. A program is written that will allow the user to input a list of 5 numbers and will print out the
largest and the smallest of them.
The program is to be tested to see that it works under all conditions. The programmer decides
to use the test data 3,4,2,5,6,7 in order to test what will happen if more than 5 numbers are
input.
Give four other different sets of test data explaining the purpose of each. [8]

Page No. 28 of 160


A. - 1,3,-4,6,5
-To determine how it handles negative numbers.
- 1,3,4,-6,5
-To determine whether it chooses the largest number according to magnitude or whether it takes the
sign into consideration.
- 1.5,3,4,5,6
- To determine whether it can deal with fractions.
- 1,1,1,1,1
-To see what happens if the largest and the smallest are the same.
Note. There are many more sensible sets of test data that could be used. These are just examples.
Make sure that you read the question carefully and give ‘different’ sets of test data. Just changing the
data doesn’t make it different, it is the reason for the choice of data that must be different.

Q 11. Explain the difference between alpha testing and beta testing. [2]
A. -Alpha testing is done by the programmer or in the software house.
-Beta testing is done by the user.

Q 12. Explain how the translator program can issue error diagnostics and give an example of an
error that can be spotted by the translator. [3]
A. - Translator compares reserved word/syntax (rules) in its dictionary
- If different to what is in the dictionary the user can be told what and where the error is.
-eg PLINT is not in the dictionary of words that it knows, so there must be an error.
Note. The same example has been used again. I know this one is right, why risk changing it?

Q 13. Bugs are common in computer programs. Describe two techniques that can be used to help
debug a program. [4]
A. - Cross referencing of variables
- checks the program for occurences of the same variable being used more than once.
- Trace table.
- As the program is run the values of the variables are printed out as the instructions are executed,
allowing the user to see where sudden, unexpected, changes have occurred.
Note. There are lots of possible answers here, always choose the two answers that you are absolutely
sure of.

Q 14. a. Describe what is meant by annotation of a program code. [2]


A. -Explanation of the techniques used in the algorithm
-Needed by people employed to maintain or amend the program in the future…
-by explaining the logic and the reasoning behind the code.
b) Describe two methods that can be used to annotate code. [4]
-Indentation of groups of statements.
-This not only makes the group stand out, but also ensures that the person looking at the code knows
which statements should be treated together.
- Use of sensible variable names.
-This means that long references to look up tables are not needed and helps to make the
understanding of lines of instruction easier to follow.
Note. Again, these are standard answers, but no less effective for that and safe because we know they
are going to be right.

Page No. 29 of 160


1.4: Data, its representation, structure and
management
1.4.a Number Systems and character sets
1.4.b Data Types
1.4.c Arrays
1.4.d Linked Lists
1.4.e Stacks and Queues
1.4.f Files, Records, Items, Fields
1.4.g Record Formats
1.4.h Sizing a file
1.4.i Access Methods to Data
1.4.j Implementation of file access methods
1.4.k Selection of data types and structures
1.4.l Backing up and archiving data
Sample Questions

Previous Menu

Page No. 30 of 160


Chapter 1.4 Data: Its Representation, Structure and Management

1.4.a Number Systems and Character Sets.


Counting is one of the first skills that a young child masters, and none of us consider counting from 1 to 100
difficult. However, to count, we have to learn, by heart, the meanings of the symbols 0,1,2…9 and also to
understand that two identical symbols mean totally different things according to their ‘place’ in the number.
For instance, in 23 the 2 actually means 2 * 10. But why multiply by 10? Why not multiply by 6? The
answer is simply that we were taught to do that because we have 10 fingers, so we can count on our fingers
until we get to the last one, which we remember in the next column and then start again.

We don’t need to count in tens. The ancient Babylonians counted in a system, which is similar to counting in
sixties. This is very difficult to learn because of all the symbols needed, but we still use a system based on
sixties today: 60 minutes = 1 hour; 60 seconds = 1 minute; 6 * 60 degrees = 1 revolution.

Instead of increasing the number of symbols in a system, which makes the system more difficult, it seems
reasonable that if we decrease the number of symbols the system will be easier to use.

A computer is an electronic machine. Electricity can be either on or off. If electricity is not flowing through
a wire that can stand for 0. If electricity is flowing, then it stands for 1. The difficulty is what to do for the
number 2. We can’t just pump through twice as much electricity, what we need is a carry system, just like
what happens when we run out of fingers. What we need is another wire.

The ‘units’ wire no electricity 0


=0
The ‘twos’ wire no electricity 0

ADD 1

electricity 1
=1
no electricity 0

ADD 1

no electricity 0
=2
Carry electricity 1

ADD 1

electricity 1
=3
electricity 1

ADD 1

no electricity 0
Carry
no electricity 0 =4

Carry electricity 1

The computer can continue like this for ever, just adding more wires when it gets bigger numbers.

Page No. 31 of 160


This system, where there are only two digits, 0 and 1, is known as the binary system. Each wire, or digit, is
known as a binary digit. This name is normally shortened to BIT. So each digit, 0 or 1, is one bit. A single
bit has very few uses so they are grouped together. A group of bits is called a BYTE. Usually a byte has 8
bits in it.

One type of data that needs to be stored in computer systems is the letters of the alphabet. These are stored
as codes which look like binary numbers. For instance A could be stored as 000, B as 001 and so on.
Unfortunately, there are only 8 possible codes using 3 bits, so we could store the letters A to H but not the
rest, and what about the lower case letters and punctuation and…? The computer can store as many
characters as necessary simply by using more and more bits for the code. Some systems don’t need to be
able to recognise a lot of characters so they only use a few bits for each character. The number of bits
needed to store one character is called a byte which is usually said to have 8 bits because most systems use 8
bits to store the code for each character.

We now have enough codes, but another problem arises. If my computer stores A as 01000001 and your
computer stores A as 01000010 then the computers cannot communicate because they cannot understand
each other’s codes. In the 1960’s a meeting in America agreed a standard set of codes so that computers
could communicate with each other. This standard set of codes is known as the ASCII set. Most systems use
ASCII so you can be fairly sure that when you type in A it is stored in the computer’s memory as 01000001.
However, you can’t be certain because some systems use other codes. A less common code is called
EBCDIC, it was developed for use by larger scale computer systems and differs in that the code for each
character is different than that used in ASCII.

Notes: All the characters that a system can recognise are called its character set.
ASCII uses 8 bits so there are 256 different codes that can be used and hence 256 different characters. (This
is not quite true, we will see why in chapter 1.6.)

A problem arises when the computer retrieves a piece of data from its memory. Imagine that the data is
01000001. Is this the number 65, or is it A?

They are both stored in the same way, so how can it tell the difference?
The answer is that characters and numbers are stored in different parts of the memory, so it knows which
one it is by knowing whereabouts it was stored.

1.4.b Data Types


The computer needs to use different types of data in the operation of the system. All of these different types
of data will look the same because they all have to be stored as binary numbers. The computer can
distinguish one type of data from another by seeing whereabouts in memory it is stored.

Numeric data.
There are different types of numbers that the computer must be able to recognise.
Numbers can be restricted to whole numbers, these are called INTEGERS and are stored by the computer as
binary numbers using a whole number of bytes. It is usual to use either 2 bytes (called short integers) or 4
bytes (called long integers), the difference being simply that long integers can store larger numbers.
Sometimes it is necessary to store negative integers, these have to be treated as different types of data by the
computer because the Most Significant Bit (MSB) of the data stands for something different than in an
ordinary unsigned integer.

Another type of number is a fraction (or decimal). This is stored by changing the position of the point so that
it is always at the front of the number and then storing the fraction that is left (there is no whole part because
the point comes first). However, 2.3 and .23 will now both be stored as .23 so we need an extra piece of data
to be stored, the number of places the point has had to move. Fractions, then, are stored in two parts: the
fraction part (called the mantissa) and the number of places the point has had to move (called the exponent).
Because the first stage is always to move the point to the front of the number, and it is like the point
Page No. 32 of 160
“floating to the top”, fractions are stored in FLOATING POINT form. Obviously there is a lot missing from
this explanation, but that is more than enough for this part of the course. Simply remember that fractions are
stored in binary with the point at the front, and then a separate part is the number of places the point has had
to move to get it to the front.

Boolean data
Sometimes the answer to a question is either yes or no, true or false. There are only two options. The
computer uses binary data which consists of bits of information that can be either 0 or 1, so it seems
reasonable that the answer to such questions can be stored as a single bit with 1 standing for true and 0
standing for false. Data which can only have two states like this is known as BOOLEAN data.

A simple example of its use would be in the control program for an automatic washing machine. One of the
important pieces of information for the processor would be to know whether the door was shut. A boolean
variable could be set to 0 if it was open and to 1 if it was shut. A simple check of that value would tell the
processor whether it was safe to fill the machine with water.

Some types of data are used so often by computer systems that they are considered to be special forms of
data. These special forms of data can be set up by the computer system so that they are recognised when
entered. Two examples of such data types are Date/Time and Currency. The computer has simply been told
the rules that govern such data types and then checks the data that is input against the rules. Students will
probably be familiar with these data types through their use in databases. Such data types are fundamentally
different from the others mentioned here because the others are characterised by the operating system while
these two are set up by applications software.

Characters
A character can be anything, which is represented in the character set of the computer by a character code in
a single byte.

1.4.c Arrays
Data stored in a computer is stored at any location in memory that the computer decides to use. This means
that similar pieces of data can be scattered all over memory. This, in itself, doesn’t matter to the user, except
that to find each piece of data it has to be referred to by a variable name. e.g. If it is necessary to store the 20
names of students in a group then each location would have to be given a different variable name. The first,
Iram, might be stored in location NAME, the second, Sahin, might be stored in FORENAME, the third,
Rashid, could be stored in CHRINAME, but I’m now struggling, and certainly 20 different variable names
that made sense will be very taxing to come up with. Apart from anything else, the variable names are all
going to have to be remembered.

Far more sensible would be to force the computer to store them all together using the variable name NAME.
However, this doesn’t let me identify individual names, so if I call the first one NAME(1) and the second
NAME(2) and so on, it is obvious that they are all peoples’ names and that they are distinguishable by their
position in the list. Lists like this are called ARRAYS.

Because the computer is being forced to store all the data in an array together, it is important to tell the
computer about it before it does anything else so that it can reserve that amount of space in its memory,
otherwise there may not be enough space left when you want to use it. This warning of the computer that an
array is going to be used is called INITIALISING the array. Initialising should be done before anything else
so that the computer knows what is coming.

Initialising consists of telling the computer


 what sort of data is going to be stored in the array so that the computer knows what part of memory it
will have to be stored in
 how many items of data are going to be stored, so that it knows how much space to reserve
 the name of the array so that it can find it again.
Page No. 33 of 160
Different programming languages have different commands for doing this but they all do the same sort of
thing, a typical command would be
DIM NAME$(20)
DIM is a command telling the computer that an array is going to be used
NAME is the name of the array
$ tells the computer that the data is going to be characters
(20) tells it that there are going to be up to 20 pieces of data.
Notes: Just because the computer was told 20 does not mean that we have to fill the array, the 20 simply tells
the computer the maximum size at any one time.

The array that has been described so far is really only a list of single data items. It would be far more useful
if each student had a number of pieces of information about them, perhaps their name, address, date of birth.
The array would now have 20 students and more than one thing about each, this is called a two dimensional
array. Obviously everything gets more complicated now, but don’t worry as use of multi-dimensional arrays
is for later in the course.

We should now have a picture of a part of memory, which has been reserved for the array NAME$

Iram Name$(1)
Sahin Name$(2)
- -
NAME$ - -
- -
Zaid Name$(20)
To read data into the array simply tell the computer what the data is and tell it the position to place it in e.g.
NAME$(11) = Rashid will place Rashid in position 11 in the array (incidentally, erasing any other data that
happened to be in there first.

To read data from the array is equally simple, tell the computer which position in the array and assign the
data to another value
e.g. RESULT = NAME$(2) will place Sahin into a variable called RESULT.
Searching for a particular person in the array involves a simple loop and a question
e.g. search for Liu in the array NAME$
Answer:
Counter = 1
While Counter is less than 21, Do
If NAME$(Counter) = Liu Then Print “Found” and End.
Else Add 1 to Counter
Endwhile
Print “Name not in array”
Try to follow the logic of the steps above.

1.4.d Linked Lists


When data is stored in a computer the processor can store it in any location provided it can get the data back.
In order to get the data back, each of the locations where the data is stored is given an address so that if the
computer can remember the address of where it put some information it can easily retrieve it. If everything
has to be in the index then the index can get very large, it seems reasonable to try to cut down the size of the
index by grouping things together under one index entry. One method for doing this is by using an array, the
twenty people in the set could all be found by the one reference to NAME which pointed to the location of
the array. There are two major problems with arrays. The first is that if the size of the set grows because a
new student joins there is no room in the array to store the information. This is because the array size has to
be predetermined. The array could be made much bigger, say size 50, so that we are sure it will never be too
Page No. 34 of 160
small, but this leads to the second problem, that most of this space will never be used, consequently wasting
valuable memory. These problems can be overcome by using a linked list.
A linked list of data items tells the computer to store the data in any location and to link it to the previous
data item by giving the previous data item the address of the new one. That sounds very complex, the idea is
simple if we look at it in diagram form.
Imagine the list of names used in the example for the array.

Address Data Next address


Start address 60 Rashid 75
61 61 Iram 86
62
63 Zaid XX
-
-
85
86 Sahin 60
-

The diagram is intended to show a portion of memory. Each of the locations that can hold data are given an
address, and the address of the first data in the list is stored separately. This tells the computer where the first
piece of data is. If the first data item is not the one that is wanted, the computer goes to the next piece of data
by using the address that is stored with the data. These addresses are called pointers, the last one of which
has to be one that cannot possibly exist so that the computer knows it has reached the end of the list. Notice
that the two problems associated with arrays no longer exist.

Linked lists are often drawn showing the data in boxes and the linking addresses as pointers. This is the
better method for describing a list, just don’t lose sight of the fact that the arrows are really address
references.

Start Iram Rashid

Sahin Zaid XX

Note: The jagged line signifies that there are a number of others which would fit in there, but they are not
shown.

To initialise a list, all that needs to be done is to create a new start pointer for this list and add it to the index
of start pointers for all the other lists.

To search through the list for a particular piece of data follow these rules
1. Find the correct list in the index of lists
2. Follow the pointer to the next item
3. If the item is the one being searched for, report that it is found and end.
4. If the pointer shows that the end of the list has been reached, report that the item is not there and end.
5. Go to step 2.

Page No. 35 of 160


To remove a value from a list, simply change the pointer that points to it into one that points to the next
value after it. E.g. to remove Sahin from the example

Start Iram Rashid

Sahin Zaid XX

Note that Sahin’s data is still there, its just that there is no way of getting to it so it might just as well not be.

1.4.e Stacks and Queues


Queues.
Information arrives at a computer in a particular order, it may not be numeric, or alphabetic, but there is an
order dependent on the time that it arrives. Imagine Zaid, Iram, Sahin, Rashid send jobs for printing, in that
order. When these jobs arrive they are put in a queue awaiting their turn to be dealt with. It is only fair that
when a job is called for by the printer that Zaid’s job is sent first because his has been waiting longest. These
jobs are held, just like the other data we have been talking about, in an array. The jobs are put in at one end
and taken out of the other. All the computer needs is a pointer showing it which one is next to be done (start
pointer(SP)) and another pointer showing where the next job to come along will be put (end pointer(EP))

1. Zaid is in the queue for printing, the end pointer is pointing at where the next job will go.
2. Iram’s job is input and goes as the next in the queue, the end pointer moves to the next available
space.
3. Zaid’s job goes for printing so the start pointer moves to the next job, also Sahin’s job has been input
so the end pointer has to move.

EP
EP Sahin
EP Iram SP Iram
SP Zaid SP Zaid
1. 2. 3.

Notes: The array is limited in size, and the effect of this seems to be that the contents of the array are
gradually moving up. Sooner or later the queue will reach the end of the array. The queue does not have to
be held in an array, it could be stored in a linked list. This would solve the problem of running out of space
for the queue, but does not feature in this course until the second year.

Stacks.
Imagine a queue where the data was taken off the array at the same end that it was put on. This would be a
grossly unfair queue because the first one there would be the last one dealt with. This type of unfair queue is
called a stack. A stack will only need one pointer because adding things to it and taking things off it are only
done at one end.

1. Zaid and Iram are in the stack. Notice that the pointer is pointing to the next space.
2. A job has been taken off the stack. It is found by the computer at the space under the pointer (Iram’s
job), and the pointer moves down one.
3. Sahin’s job has been placed on the stack in the position signified by the pointer, the pointer then
moves up one. This seems to be wrong, but there are reasons for this being appropriate in some
circumstances, which we will see later in the course.

Page No. 36 of 160


Pointer Pointer
Iram Pointer Sahin
Zaid Zaid Zaid
1. 2. 3.

In a queue, the Last one to come In is the Last one to come Out. This gives the acronym LILO, or FIFO
(First in is the first out).
In a stack, the Last one In is the First one Out. This gives the acronym LIFO, or FILO (First in is the last
out).

1.4.f Files, Records, Items, Fields.


Data stored in computers is normally connected in some way. For example, the data about the 20 students in
the set that has been the example over the last three sections has a connection because it all refers to the
same set of people. Each person will have their own information stored, but it seems sensible that each
person will have the same information stored about them, for instance their name, address, telephone
number, exam grades…

All the information stored has an identity because it is all about the set of students, this large quantity of data
is called a FILE. Each student has their own information stored. This information refers to a particular
student, it is called their RECORD of information. A number of records make up a file.

Each record of information contains the same type of information, name, address and so on. Each type of
information is called a FIELD. A number of fields make up a record and all records from the same file must
contain the same fields. The data that goes into each field, for example “Iram Dahar”, “3671 Jaipur, 2415”
will be different in most of the records. The data that goes in a field is called an ITEM of data.

Note: Some fields may contain the same items of data in more than one record. For example, there may be
two people in the set who happen to be called Iram Dahar. If Iram Dahar’s brother Bilal is in this set he will
presumably have the same address as Iram. It is important that the computer can identify individual records,
and it can only do this if it can be sure that one of the fields will always contain different data in all the
records. Because of this quality, that particular field in the record is different from all the others and is
known as the KEY FIELD. The key field is unique and is used to identify the record. In our example the
records would contain a field called school number which would be different for each student.

Note: Iram Dahar is 10 characters (1 for the space), Pervais Durrani is 15 characters. It makes it easier for
the computer to store things if the same amount of space is allocated to the name field in each record. It
might waste some space, but the searching for information can be done more quickly. When each of the
records is assigned a certain amount of space the records are said to be FIXED LENGTH. Sometimes a lot
of space is wasted and sometimes data has to be abbreviated to make it fit. The alternative is to be able to
change the field size in every record, this comes later in the course.

1.4.g Record Formats.


To design a record format, the first thing to do is to decide what information would be sensible to be stored
in that situation. e.g. A teacher is taking 50 students on a rock-climbing trip. The students are being charged
20 dollars each and, because of the nature of the exercise, their parents may need to be contacted if there is
an accident. The teacher decides to store the information as a file on a computer. Design the record format
for the file.

Page No. 37 of 160


Answer.
The fields necessary will be Student name, Amount paid, Emergency telephone number, Form (so that
contact can be made in school). There are other fields that could be included but we will add just one more,
the school number (to act as the key field).

For each one of these fields it is necessary to decide what type of data they will be and also to decide how
many characters will be allowed for the data in that field, remember these are fixed length records.
The easiest way is to write them in a table
Student number Integer 1 byte
Student name Character 20 bytes
Amount paid Integer 1 byte
Emergency number Character 12 bytes
Form (e.g.3RJ) Character 3 bytes
Notes: It would be perfectly reasonable to say that the school number was not a proper number so it should
be stored as characters (probably 4 bytes).

The student name is quite arbitrary. 15 bytes would be perfectly reasonable, as would 25 bytes, but 5 bytes
would not. In other words there is no single right answer, but there are wrong ones. The amount paid is
listed as an integer as the teacher will store the number of whole dollars so far paid. This is not necessarily
the best data type, in this example currency may be better. As you get to learn about other data types you
may well be able to consider better ones still. Many students expect that the emergency number should be an
integer, but phone numbers, in Britain, start with a 0, and integers are not allowed to. If most numbers do
start with 0, the computer can be programmed to put the 0 in at the start of the rest of the number, but you
would have to say this in your answer. As we are not going to do any arithmetic with these numbers, why
make life more complicated than necessary. 3 characters were allowed for form. If in doubt, give an example
of what you mean by the data, it can’t hurt and it may save you a mark in the question.

1.4.h Sizing a File


We have just designed the record format for a given situation. It may be necessary to calculate how large the
file is going to be. Having decided on the size of each field, it is a simple matter of adding up the individual
field sizes to get the size of a record, in this case 37 bytes. There are 50 students going on the trip, each of
them having their own record, so the size of the data in the file will be 50 * 37 = 1,850 bytes.

All files need a few extra pieces of information that the user may not see such as information at the start of
the file saying when it was last updated, which file it is, is it protected in any way? These sort of extra pieces
of information are known as overheads, and it is usual to add 10% to the size of a file because of the need
for overheads. Therefore the size of the file is 1,850 bytes + (10% of 1,850 bytes) =2,035 bytes.
The final stage is to ensure that the units are sensible for the size of the file.
There are 1024 bytes in 1 Kbyte, so the size of this file is 2,035/1024 =
1.99Kbytes.
Note: Don’t worry about dividing by 1024, because, after all, this is only an approximation anyway. If you
gave the final answer as 2 (approx) then that is just as acceptable. Just make sure that you write down
somewhere that you know that there are 1024 bytes in a Kbyte, otherwise you can’t be given the mark for
knowing that.

1.4.i Access Methods to Data


Computers can store large volumes of data. The difficulty is to be able to get it back. In order to be able to
retrieve data it must be stored in some sort of order. Imagine the phone book. It contains large volumes of
data which can be used, fairly easily, to look up a particular telephone number because they are stored in
alphabetic order of the subscriber’s name. Imagine how difficult it would be to find a number if they had just
been placed in the book at random. The value of the book is not just that it contains all the data that may be
needed, but that it has a structure that makes it accessible. Similarly, the structure of the data in a computer
file is just as important as the data that it contains. There are a number of ways of arranging the data that will
aid access under different circumstances.
Page No. 38 of 160
Serial access.
Data is stored in the computer in the order in which it arrives. This is the simplest form of storage, but the
data is effectively unstructured, so finding it again can be very difficult. This sort of data storage is only
used when it is unlikely that the data will be needed again, or when the order of the data should be
determined by when it is input. A good example of a serial file is what you are reading now. The characters
were all typed in, in order, and that is how they should be read. Reading this book would be impossible if all
the words were in alphabetic order. Another example of the use of a serial file will be seen in section 1.4.l.

Sequential access.
In previous sections of this chapter we used the example of a set of students whose data was stored in a
computer. The data could have been stored in alphabetic order of their name. It could have been stored in the
order that they came in a Computing exam, or by age with the oldest first. However it is done the data has
been arranged so that it is easier to find a particular record. If the data is in alphabetic order of name and the
computer is asked for Zaid’s record it won’t start looking at the beginning of the file, but at the end, and
consequently it should find the data faster. A file of data that is held in sequence like this is known as a
sequential file.

Indexed sequential.
Imagine a large amount of data, like the names and numbers in a phone book. To look up a particular name
will still take a long time even though it is being held in sequence. Perhaps it would be more sensible to have
a table at the front of the file listing the first letters of peoples’ names and giving a page reference to where
those letters start. So to look up Jawad, a J is found in the table which gives the page number 232, the search
is then started at page 232 (where all the Js will be stored). This method of access involves looking up the
first piece of information in an index which narrows the search to a smaller area, having done this, the data
is then searched alphabetically in sequence. This type of data storage is called Index Sequential.

Random access.
A file that stores data in no order is very useful because it makes adding new data or taking data away very
simple. In any form of sequential file an individual item of data is very dependent on other items of data.
Jawad cannot be placed after Mahmood because that is the wrong ‘order’. However, it is necessary to have
some form of order because otherwise the file cannot be read easily. What would be wonderful is if, by
looking at the data that is to be retrieved, the computer can work out where that data is stored. In other
words, the user asks for Jawad’s record and the computer can go straight to it because the word Jawad tells it
where it is being stored. How this can be done is explained in section 1.4.j.

1.4.j Implementation of File Access Methods


This section is about how the different access methods to data in files can be put into practice. There will not
be a lot of detail, and some questions will remain unanswered, don’t worry because those will appear in
further work.

Serial access.
Serial files have no order, no aids to searching, and no complicated methods for adding new data. The data is
simply placed on the end of the existing file and searches for data require a search of the whole file, starting
with the first record and ending, either with finding the data being searched for, or getting to the end of the
file without finding the data.

Sequential access.
Because sequential files are held in order, adding a new record is more complex, because it has to be placed
in the correct position in the file. To do this, all the records that come after it have to be moved in order to
make space for the new one.

Page No. 39 of 160


e.g. A section of a school pupil file might look like this

Hameed, Ali, 21……..


Khurram, Saeed, 317………
Khwaja, Shaffi, 169………..
Naghman, Yasmin, 216………..

If a new pupil arrives whose name is Hinna, space must be found between Hameed and Khurram. To do this
all the other records have to be moved down one place, starting with Naghman, then Khwaja, and then
Khurram.

Hameed, Ali, 21…………

Khurram, Saeed, 317……….


Khwaja, Shaffi, 169 …….
Naghman, Yasmin, 216……..

This leaves a space into which Hinna’s record can be inserted and the order of the records in the file can be
maintained. Having to manipulate the file in this way is very time consuming and consequently this type of
file structure is only used on files that have a small number of records or files that change very rarely.

Larger files might use this principle, but would be split up by using indexing into what amounts to a number
of smaller sequential files. e.g. the account numbers for a bank’s customers are used as the key to access the
customer accounts. The accounts are held sequentially and there are approximately 1 million accounts.
There are 7 digits in an account number. Indexes could be set up which identify the first two digits in an
account number. Dependent on the result of this first index search, there is a new index for the next two
digits, which then points to all the account numbers, held in order, that have those first four digits. There
will be one index at the first level, but each entry in there will have its own index at the second level, so
there will be 100 indexes at the second level. Each of these indexes will have 100 options to point to, so
there will be 10,000 blocks of data records. But each block of records will only have a maximum of 1000
records in it, so adding a new record in the right place is now manageable which it would not have been if
the 1million records were all stored together.

00
01
00 02
01 …
02 99
...
… 00 0102000 DATA
99 01 0102001
02 0102002
One … 0102003
First level index 99 ……….
(first two digits 0102999
in account number)

100 10,000
Second level indexes Final index blocks
(third and fourth digits each containing up to
in account number) 1000 account numbers
Page No. 40 of 160
Random access.
To access a random file, the data itself is used to give the address of where it is stored. This is done by
carrying out some arithmetic (known as pseudo arithmetic because it doesn’t make much sense) on the data
that is being searched for. e.g. imagine that you are searching for Jawad’s data. The rules that we shall use
are that the alphabetic position of the first and last letters in the name should be multiplied together, this will
give the address of the student’s data.

So Jawad = 10 * 04 = 40. Therefore Jawad’s data is being held at address 40 in memory.


This algorithm is particularly simplistic, and does not give good results, as we shall soon see, but it
illustrates the principle. Any algorithm can be used as long as it remains the same for all the data.
This type of algorithm is known as a HASHING algorithm.

The problem with this example can be seen if we try to find Jaheed’s data.
Jaheed = 10 * 04 = 40. The data for Jaheed cannot be here because Jawad’s data is here. This is called a
CLASH. When a clash occurs, the simple solution is to work down sequentially until there is a free space.
So the computer would inspect address 41, and if that was being used, 42, and so on until a blank space. The
algorithm suggested here will result in a lot of clashes which will slow access to the data. A simple change
in the algorithm will eliminate all clashes. If the algorithm is to write down the alphabetic position of all the
letters in the name as 2 digit numbers and then join them together there could be no clashes unless two
people had the same name.

e.g. Jawad = 10, 01, 23, 01, 04 giving an address 1001230104


Jaheem = 10, 01, 08, 05, 05, 13 giving an address 100108050513

The problem of clashes has been solved, but at the expense of using up vast amounts of memory (in fact
more memory than the computer will have at its disposal). This is known as REDUNDANCY. Having so
much redundancy in the algorithm is obviously not acceptable. The trick in producing a sensible hashing
algorithm is to come up with a compromise that minimizes redundancy without producing too many clashes.

1.4.k Selection of Data Types and Structures


Data types.
When the computer is expected to store data, it has to be told what type of data it is going to be because
different types of data are stored in different areas of memory. In addition to the types of data that we have
already described, there are other, more specialised, data types. Most can be covered by calling them
characters (or string data, which is just a set of characters one after the other), but there are two others that
are useful. Currency data is, as the name suggests, set up to deal with money. It automatically places two
digits after the point and the currency symbol in. The other is date, this stores the date in either 6 or 8 bytes
dependent on whether it is to use 2 or 4 digits for the year. Care should be taken with the date because
different cultures write the three elements of a date in different orders, for example, Americans put the
month first and then the day, whereas the British put the day first and then the month.

Data structures
Students should be able to justify the use of a particular type of structure for storing data in given
circumstances. Questions based on this will be restricted to the particular structures mentioned in 1.4.c and
1.4.d and will be non-contentious. E.g. Jobs are sent to a printer from a number of sources on a network.
State a suitable data structure for storing the jobs that are waiting to be printed giving a reason for your
answer.
Answer: A queue, because the next one to be printed should be the one that has been waiting longest.

1.4.l Backing up and Archiving Data


Backing up data.
Data stored in files is very valuable. It has taken a long time to input to the system, and often, is
irreplaceable. If a bank loses the file of customer accounts because the hard disk crashes, then the bank is

Page No. 41 of 160


out of business.
It makes sense to take precautions against a major disaster. The simplest solution is to make a copy of the
data in the file, so that if the disk is destroyed, the data can be recovered. This copy is known as a BACK-
UP. In most applications the data is so valuable that it makes sense to produce more than one back-up copy
of a file, some of these copies will be stored away from the computer system in case of something like a fire
which would destroy everything in the building.

The first problem with backing up files is how often to do it. There are no right answers, but there are wrong
ones. It all depends on the application. An application that involves the file being altered on a regular basis
will need to be backed up more often than one that is very rarely changed (what is the point of making
another copy if it hasn’t changed since the previous copy was made?). A school pupil file may be backed up
once a week, whereas a bank customer file may be backed up hourly.

The second problem is that the back-up copy will rarely be the same as the original file because the original
file keeps changing. If a back up is made at 9.00am and an alteration is made to the file at 9.05am, if the file
now crashes, the back up will not include the change that has been made. It is very nearly the same, but not
quite. Because of this, a separate file of all the changes that have been made since the last back up is kept.
This file is called the transaction log and it can be used to update the copy if the original is destroyed. This
transaction log is very rarely used. Once a new back up is made the old transaction log can be destroyed.
Speed of access to the data on the transaction log is not important because it is rarely used, so a transaction
log tends to use serial storage of the data and is the best example of a serial file if an examination question
asks for one.

Archiving data.
Data sometimes is no longer being used. A good example would be in a school when pupils leave. All their
data is still on the computer file of pupils taking up valuable space. It is not sensible to just delete it, there
are all sorts of reasons why the data may still be important, for instance a past pupil may ask for a reference.
If all the data has been erased it may make it impossible to write a sensible reference. Data that is no longer
needed on the file but may be needed in the future should be copied onto long term storage medium and
stored away in case it is needed. This is known as producing an ARCHIVE of the data. (Schools normally
archive data for 7 years before destroying it).

Note: Archived data is NOT used for retrieving the file if something goes wrong, it is used for storing little
used or redundant data in case it is ever needed again, so that space on the hard drive can be freed up.

Page No. 42 of 160


Example Questions

Q 1. a) Express the number 113 (denary) in


(i) binary
(ii) in BCD
using an appropriate number of bytes in each case. [4]
b) Using the answer obtained in part (a) show how 113 (denary) can be expressed in
(i) octal
(ii) hexadecimal. [4]

A. a) (i) 128 64 32 16 8 4 2 1
0 1 1 1 0 0 0 1 =01110001.
(ii) 1 = 0001
1 = 0001
3 = 0011
Therefore 113 = 0000000100010011
b) (i) 113 = 001 110 001 in binary
= 1 6 1 in octal.
(ii) 113 = 0111 0001 in binary
= 7 1 in hexadecimal.
Notice: (i) and (ii) It was necessary to show a method of working out. Many students have calculators that
will automatically change from one number system to another, so it is necessary to show that you know
what you are doing, even if you use a calculator to check the results. Also, the question stated that the
appropriate number of bytes be used, in part (i) this is obviously 8 bits and is an easy mark, but in part (ii) it
is necessary to add a set of zeros to the front of the answer to make it a whole number of bytes. (iii) and (iv)
The question stated that the first answer had to be used, so one of the two marks is going to be given for
showing the relationship between binary and each of these two representations. Notice that for the octal
answer it was necessary to add a 0 to the front of the binary number to give 9 bits (3 lots of 3).

Q 2. Explain how the denary number –27 can be represented in binary in


(i) sign and magnitude
(ii) two’s complement
notation, using a single byte for each answer. [4]
A. (i) +/- 64 32 16 8 4 2 1
1 0 0 1 1 0 1 1 = 10011011
(ii) –27 = -128 + 101
= -128 + (+64 +32 +4 +1)
-128 64 32 16 8 4 2 1
1 1 1 0 0 1 0 1 = 11100101

Notice that the question asked “Explain…”, so just writing the answer down is not acceptable. There
will be a mark for showing the column headings, particularly the value of the MSB in each case.

Q 3. Add together the binary equivalents of 34 and 83, using single byte arithmetic, showing you
working. [3]

A. 34 = 0 0 1 0 0 0 1 0
83 = 0 1 0 1 0 0 1 1 +
0 1 1 1 0 1 0 1 = 117
1
Note that the question asked for the working. The part that shows that you are capable of doing the
arithmetic is the carry, don’t miss it out. In a question like this try to ask yourself what evidence the
examiner is expecting for the mark. The other marks are for using 8 bits for each value, and for the answer.

Page No. 43 of 160


Q 4. Describe how characters are stored in a computer. [3]
A. -Each character is given a code…
-as a binary number
-Each character code occupies one byte of data
-Typically one byte is eight bits
-Most computers use a standard set of characters like the ASCII set.
There are lots of marks available here. The question has been left deliberately open so that there are
plenty of mark points available.

Q 5. a) Explain the difference between integer and floating point data types. [2]
b) State what is meant by Boolean data. [1]

A. a) -Integers are whole numbers


-Floating point numbers allow for the storage of fractions.
b) -Boolean data is data that can exist in two states, e.g. true or false.

Note that in part (a) there may be lots of other differences that you know, but they are not really part of this
syllabus. If your answer is valid though, it will be given the marks. In part (b), this is another standard
definition, don’t try to elaborate too much or you may wander too far from the answer.

Q 6. An array is to be used to store information.


State three parameters that need to be given about the array before it can be used, explaining
the reason why each is necessary. [6]
A. -The size of the array (how many data items it will hold)…
-so that this amount of space can be reserved in memory.
-The type of data to be stored in the array…
-so that it can be set up in the correct area of memory.
-The name of the array…
-so that it can be identified when it needs to be used.
-The number of dimensions of the array…
-so that the computer knows what form the data is going to be stored in.
Note: these marks go in pairs. Don’t worry if you are not happy with the last point, this is a more
advanced feature of arrays – look at the notes on section 1.4.c.

Q 7. A garden centre stores details of each of the types of plant that it has for sale on a computer
system. The details of the plants are stored in alphabetical order in a linked list.
a) By drawing a diagram show how the plants are arranged in the list. You may use the
following plants to illustrate your answer
Pansy, Dahlia, Clematis, Sweet pea. [4]
b) Describe how a new linked list, of plants that like shaded conditions, can be created
from the original one. [4]
A. a)
Head of list table Dahlia
(Start Pointer) Clematis
Sweet pea XX
Pansy
Mark points:
-Some start position for list
-List in alphabetic order
-Use of pointers
-Use of null pointer to finish list.

Page No. 44 of 160


b) -Create new linked list by creating a new start point.
-Read values from old list in turn
-If plant in old linked list likes shade then…
-add to new list and put in pointer.
-Repeat until null pointer (end of list)
-Place null pointer after last entry in new list

Note: The first part is fairly simple. Stick to the simple type of diagram and don’t forget how to start
and end the list. The second part is more difficult because it means a certain degree of analysis of the
problem to be able to solve it. This is why there are rather more mark points available. When dealing
with linked lists, if you draw a diagram and remember to start and finish it, you won’t go far wrong.

Q 8. A stack is being held in an array. Items may be read from the stack or added to the stack.
a) State a problem that may arise when
(i) adding a new value to the stack
(ii) reading a value from the stack. [2]
b) Explain how the stack pointer can be used by the computer to recognise when such
problems may occur. [2]
A. a) (i) The array may be full, consequently no new value can be entered.
(ii) The array may be empty, there is no value to be read.
b) (i) The stack pointer will be pointing outside the array.
(ii) The stack pointer will be pointing at the first location in the array.

Notes. When discussing stacks and queues it is important to have a picture in your mind of what it
looks like. The simplest picture is to imagine them being held in an array. This is not the only way to
store them and you may have been shown other methods, but the array is perfectly adequate for this
course.

Q 9. A library stores details of the books that are available.


a) Apart from title and author, state 3 other fields that it would be sensible for the
library to store in this file, giving a reason why each of your chosen fields would
be necessary. [6]
b) State which field would be used as the key field of the record and explain why a key
field is necessary. [2]
c) State the size of each of the fields in your record. [2]
d) If the library stores approximately 20,000 books, estimate the size the book file. [3]

A. a) One mark for each of three sensible fields with an extra mark for an explanation of the need
for that field.
E.g. ISBN/to identify book
Shelf number/ to allow for ease of search for book
Fiction or reference or childrens’ (some form of category)/ to decide whereabouts in library it
should go
b) -Book number (ISBN)
-because it is unique to that record and hence can be used as an identifier.

c) Title 40 bytes
Author 20 bytes
ISBN 10 bytes
Shelf 3 bytes
Category 1 byte

Page No. 45 of 160


Mark points:
-Use of bytes
-Sensible field sizes.
d)Total size of one record = 74 bytes
-Size of file = 74 * 20000 = 1480000 bytes
-+ Overheads of 10% = 1,480,000 + 148,000 = 1,628,000 bytes.
- (Divide by 1024 until sensible units) = 1.55 Mbytes.

Notes: In part (a), any sensible fields (can you justify it?) are acceptable. For instance, Publisher/so
that more copies may be ordered, would be a sensible field. In part (b) you would be expected to
provide the answer ISBN, although an explanation would be accepted if it was clear what was meant.
Try to be aware of the standard key fields (account numbers, ISBN, barcodes, school numbers). The
sizes of the fields are only given as guidance. If you suggested 100 bytes for the title it would be
accepted as being reasonable. On the other hand 1000 bytes would be way over the top and 10 bytes
would be unreasonably small. Don’t worry about trying to get the ‘correct’ answer, there isn’t one,
just make it sensible. There is a correct answer for the ISBN, it is 10 characters long, but it is not part
of your syllabus to learn things like that off by heart, so as long as you don’t say something silly like
30 bytes, which demonstrates that you don’t know what an ISBN is, you will get the mark. In part (d)
make sure that you convert your answer to sensible units. Don’t worry about using a calculator, as
long as you show that you did know the correct method is to divide by 1024, an approximate answer
is all that is necessary. In this case it would be quite acceptable to write “Keep dividing by 1024, this
gives approximately 1.6 Mbytes”. When you answer this question your answer is highly unlikely to
be the same as this, don’t worry, the examiner will mark your answer and not expect it to be the same
as a model answer.

Q 10. a) Explain the difference between a serial file and a sequential file. [2]
b) Describe what is meant by a hashing algorithm and explain why such an algorithm can
lead to clashes. [3]

A. a) -Serial file holds data in the order in which it was received.


-Sequential file holds the data according to some order defined on the data.
b) -A hashing algorithm is pseudo arithmetic…
-carried out on the data…
-in order to determine the location of the data in the memory.
-A clash occurs when the answer to the pseudo arithmetic is the same despite the data used in
the calculation being different.

Note: This is a question where it is very easy to try to answer too much. Restrict yourself to what the
question is asking. Many candidates faced with part (b) will go into great detail about what to do
after clashes have occurred, this is not required and will earn no marks.

Q 11. A library keeps both a book file and a member file. The library does a stock take twice
a year and orders new books only once a year. Members can join or cancel their membership
at any time.
a) Describe how the library can implement a sensible system of backing up their files. [4]
b) Explain the part that would be played by archiving in the management of the files. [4]

A. a) -Book file needs to backed up twice (or three) times a year…


-when the stock take or book purchasing has made the file alter.
-Member file needs backing up daily(at least weekly) because of constant changes…
-would also need to keep a transaction log for the member file.
-Back up copies would be stored away from the building with the computer system in it to
ensure that a copy of files survived in case of fire.
-Multiple copies of the book file would be made

Page No. 46 of 160


-Member file copies and transaction logs may be kept for a number of back up periods.
b) -When books are discovered to be missing, or if a book is replaced by a more up-to-date
edition, the old records should be kept…
-but they are no longer live so are taken from the hard disk…
-after a copy (archive) has been made.
-When members leave the library the data should be archived…
-also when they have not taken a book out for a long period of time their record can be
considered to be dormant.
Notes: Backing up and archiving are topics which cause confusion among candidates. There really is
no need for such confusion if you remember that archiving has nothing to do with recovery after a
disk failure. Note that there are plenty of mark points available in this question.

Note: This chapter, or section of the syllabus, is by far the largest portion of module 1, and
consequently, candidates should expect a higher proportion of marks on the exam paper to relate to
this work than to the other sections.

Page No. 47 of 160


1.5: Hardware

1.5.a Control unit, memory unit, and arithmetic logic unit


1.5.b Types of primary memory
1.5.c Secondary storage media
1.5.d Transfer of data including buffers and interrupts
1.5.e Common Peripheral devices

Sample questions

Previous Menu

Page No. 48 of 160


Chapter 1.5 Hardware.

1.5.a Control Unit, Memory Unit, and Arithmetic Logic Unit


The first thing to be said in this section, is what is not necessary. The three topics that are listed in the
heading would normally lead to the fetch- execute cycle, this does not come into this module. Likewise, any
complicated diagrams showing how the various parts of the processor are connected up and communicate
with each other do not appear in the syllabus until next year. The requirements of this section are very
simple, they are restricted to a basic understanding of what these three parts of the processor are meant to
do.

Control Unit.
All computers follow instructions that are given to it in a program. These instructions are in a particular
order in the program, and following them, and carrying them out, will mean that the computer has
accomplished whatever task it was meant to do. Something, in the computer, has to manage the instructions
and make sure that all the other parts of the processor do what they should be doing. This is the job of the
control unit.

The control unit has three jobs


1. It has to decide which instruction to carry out next and then go and get it.
2. It has to decipher the instruction, in other words it has to work out what needs to be done to carry the
instruction out.
3. It has to tell other parts of the processor what they should do so that the instruction will be carried
out.

Arithmetic Logic Unit (ALU)


The ALU is where things are actually done in the processor.
1. The ALU contains circuitry that allows it to add numbers together (do arithmetic).
2. It allows for logic decisions to be made (If the value is negative then …, the part of the processor that
makes the decision is the ALU).
3. The third task of the ALU is to act as the gateway between the processor and the other parts of the
computer system. All input and output to and from the processor goes into the ALU and waits there
while the control unit decides what to do with it.

Memory Unit
The third part of the processor is where everything that the processor is going to use is stored. This includes
all the program instructions and all the data needed to carry out those instructions. One of the jobs of the
control unit is to be able to find the information stored there when it is to be used. The parts of the operating
system, which the computer is using at the time, also need to be stored in memory.

1.5.b Types of Primary Memory


The first question that needs to be answered is “What is Primary Memory?”
In section 1.5.a the concept of the processor needing to store data of all types in the memory was introduced.
However, as those who have used a computer will know, there are plenty of other places that a computer can
store data or programs e.g. a disk drive or a CDROM. These will be discussed in section 1.5.c. In the
previous section it was stated that any data or program instructions that the processor was to follow had to
be in the processor memory. Anything that is being held elsewhere, like on the surface of a disk drive,
cannot be used by the processor until it is moved into the processor’s memory. Because it is so important it
is called the primary memory. The primary memory of the computer is the memory that is advertised as
being “128 Mbytes of RAM”. This simply describes the capacity of the memory.

Page No. 49 of 160


There are a number of different types of memory in the processor.

1. ROM (Read Only Memory)


ROM is memory that cannot be altered. This means that even switching the computer off will not
effect the contents of the ROM. There is very little that needs to be stored in ROM so it tends to be
very small. In the past the whole operating system was stored on ROM, but that means that if you
want to use your computer in a different way or you want to install the latest edition of an operating
system to replace the one in use, you can’t because the computer can’t delete the old one. When the
computer is turned on it would be there. For this reason the operating system is stored on the hard
drive of a computer along with all the other programs that may be used. A problem arises because
when the computer is switched on it needs the operating system to be able to do anything useful, so a
small program is stored on ROM whose job it is to go and get the operating system from the hard
drive so that the computer can work. This little program is called the bootstrap, and the process of
retrieving the operating system is known as booting.

2. RAM (Random Access Memory)


RAM stores the programs that are being used by the computer (including the operating system) and
the data that is being used with those programs. When the computer is switched off all this data is
lost. RAM is said to be volatile memory because it is so easily changed, whereas ROM is non-
volatile because it cannot change.

Notes:
1. There are many other types of primary memory that you may have heard of (PROM, EPROM,
EAROM, SRAM, DRAM,…). They are all a type of either RAM or ROM and you have no need to
learn about any of them, in fact it is probably better not to until the later parts of the course.

2. A typical question will ask for an example of what is stored in ROM and RAM. The safest answers
are the bootstrap being stored in ROM and user software and data being stored in RAM. Problems
arise if a student answers that the operating system is stored in ROM because it can be, but in most
micro systems it isn’t for the reasons given above. The BIOS (if you don’t know what that is, don’t
worry, it is not in the course) is another problem. The BIOS itself includes user defined parameters
and hence is not stored in ROM entirely. In fact the BIOS tends to be stored in a special type of
RAM which is refreshed using battery power when the system is switched off. This is past the level
of this course and students are advised not to use this as an example of storage in ROM.

1.5.c Secondary Storage Media


Primary memory is memory within the processor. It is here that the computer stores data that are in current
use because the control unit does not have direct access to data that is stored anywhere outside the processor.
However, the storage that is available in the processor is limited in size and volatile. What is needed is
something that is less temporary in nature and that does not have the same restrictions as far as size is
concerned. This will be memory outside the processor. It is called secondary storage.
There are a number of different types of secondary storage that can be categorised according to
 Means by which the data is stored, optically or magnetically
 The technique used for storage of the data, sequential storage or direct access storage
 The capacity of the medium, how much can be stored on it
 Portability of the medium, can it be moved around easily
 Access times to the data stored.

1. Magnetic tape
Magnetic tape is still widely used, particularly in the form of tape streamers. The big disadvantage of
tape is that the access to the data stored is, by necessity, sequential which makes it largely unsuitable
for most data handling applications. However, large volumes of data can be held and the medium is
freely transportable. These qualities make it valuable for producing back up copies of files stored on
a computer system.
Page No. 50 of 160
2. Magnetic floppy disk
Floppy disks hold a relatively small amount of information. Most software is too large to be stored
on a floppy disk, as are commercial files of data. However, a floppy disk is very portable, allowing
for easy communication of data from one stand-alone computer to another. It is also readily
available, almost all microcomputers having a floppy disk drive. It is also convenient for storing
those files that are particularly confidential because the files cannot be broken into if they are being
carried by the owner, or locked away in a safe. Despite being direct, access times are slow because of
the limited speed of rotation possible and the relatively crude nature of the read heads.

3. Magnetic hard disk


Data is stored in the same way as on a floppy disk. The differences being that the hard disk is made
of a rigid material rather than a floppy plastic, and it is contained in a sealed unit. These differences
mean that the hard disk can rotate faster, the heads can get closer to the surface meaning that the
storage density can be greater, consequently that the amount that can be stored is greater and that the
access times are much faster. The hard drive is likely to be the main secondary storage for a
computer system, having very large storage capacities. Although they can be portable, it is more
likely that they will be fixed to the chassis of the machine because of the tolerances that they have to
work to.
4. CDROM
A CDROM is different from the storage devices so far mentioned because it is not magnetic. A
CDROM is an optical storage device, using the reflection of a laser off a pitted surface to store
information. Large quantities of data can be stored on the surface and it is completely portable from
one machine to another. In addition, most computer systems can now be relied on to have a CD
drive, and a CD is not alterable by the user. For these reasons, manufacturers have tended to use CDs
to produce software and large data files like encyclopaedias. It is now possible to write to CDs by
using a special peripheral device called a CD writer and a special CD, but the above points are still
true.
5. Others
There are many other types of secondary storage, two of which are worth a mention. Zip drives are a
more robust version of a floppy disk, having a faster access speed and a greater capacity. They have
become fairly popular for backing up work on microcomputers. DVD is a relatively new technology
that will probably replace CDROM as it can store much larger quantities of data and allow access at
high speed. For the purposes of the syllabus, the original 4 types of secondary storage are quite
enough at this level.

Speed of access to data:


Notice that there are no figures quoted for access times. There is little point in doing this because access
times vary according to the manufacturer and the point of development so far reached. If the author were to
quote a number, not only would it be wrong as far as this work is concerned because there is such a wide
range, but it would certainly be out of date by the time you read it. In general terms the tape streamer is the
slowest access because of the way that the data is stored sequentially, then comes the floppy disk which
suffers because of the nature of the medium. Access times from CDROM and hard drives are faster than the
other two, but because there is such a range of both types of drive available, it is impossible to say that one
is faster than the other.

Capacity:
Again, much depends on the type of drive or size of medium being used. Tape streamers come in different
sizes, but tend to be comparable in capacity with smaller hard drives. Of the different types of disk, a
reasonable analogy is that a floppy would store the text from a book, a CDROM would store a multi volume
encyclopedia, while a hard drive could store a library.

Uses.
Obviously, no list of uses will be complete. However, there are some obvious uses for each storage type
which take into account the advantages and disadvantages of each. A Tape Streamer is used for making

Page No. 51 of 160


backups of files held on computer systems. This makes use of the fact that it can store a large amount of
data, but the disadvantage of the access being slow does not matter because it is rare that a backup file
would be used anyway. A floppy disk has the advantage that it can be written onto and taken away from the
computer. Because of this it can be used for storing confidential files. Add to this the fact that all computers
can be relied on to have a floppy disk drive and it becomes a sensible way of transferring information from
one machine to another.

A hard drive has the advantages of being fast to access and also stores massive amounts of data. These
advantages mean that it is going to be used for storing software and user files. The disadvantage of being
attached to one machine is not important if the same users always use the same machines, some other
method of sharing will have to be devised if this is not true. A CDROM cannot be altered (unless it is a
special re-writable). This disadvantage can be turned into an advantage if the owner does not want the
contents of the storage to be altered. Examples of files stored on CDROM are software for import to a
system and large reference files like encyclopedias.

1.5.d Transfer of Data, including Buffers and Interrupts


There are two places where data can be stored in a computer system, the primary memory and secondary
storage. Sometimes it is necessary to transfer data from the primary memory to secondary storage, perhaps
because the computer is going to be switched off in which case the data in primary memory would be lost.
Sometimes it is necessary to transfer from secondary storage to primary memory, perhaps because the
processor wants to use some data held in the secondary storage and, consequently, needs to move the data
into the primary memory first. Whichever direction the data is to be transferred the method of transfer must
be planned. Normally the data would be transferred through a wire connecting the two storage areas
together. The type of wire and the different rules for data transfer are explained in section 1.6.d, sufficient
for the moment is to have a picture of data traveling freely in both directions.

Primary Secondary
Memory Storage

Unfortunately, we know that things can’t be that simple. We know that primary memory is part of the
processor, and that anything that goes in or out of the processor must go through the ALU, so the diagram
should look like this

Primary Secondary
ALU
Memory Storage

This causes a problem. The primary memory operates at great speed because it is part of the processor, while
the secondary storage is probably some sort of disk or tape which (while it seems incredibly quick to us) is
very slow at reading or writing the data, in comparison. This means that the processor should be able to get
on with something else because the secondary storage is so slow. Unfortunately, it can’t because it needs the
ALU that is being used for the transfer of the data. This problem is overcome by the use of a buffer.

Buffers.
The problem is caused because the secondary storage device is so slow compared to the processor, the
solution is to put a small amount of fast memory in to the system between the ALU and the secondary
storage device. This means that the processor can send data very quickly (or receive it), and then get on with
something else while the storage device takes its time in reading (or sending) the data. This small amount of
memory between the two parts of the system is called a buffer.

Page No. 52 of 160


Stage One: Filling the buffer from the processor

Primary Secondary
ALU Buffer
Memory Storage

Stage Two: Emptying the buffer to storage

Primary Secondary
ALU Buffer
Memory Storage

Interrupts.
This system is fine if the buffer can hold all the data that needs to be sent to the storage device. However, if
there is more data than will fit in the buffer, the storage device has to be able to tell the processor (actually
the control unit) that it has used up all the data in the buffer and that it is ready for the next lot. This forces
the processor to stop what it is doing and fill the buffer up with more data. Because this message from the
secondary device makes the processor stop what it is doing it is called an interrupt. When the processor
receives the interrupt, the whole procedure is repeated.

Notes:
A buffer is a small amount of fast memory outside the processor that allows the processor to get on with
other work instead of being held up by the secondary device. An interrupt is the message which the
secondary device can send to the processor which tells the processor that all the data in the buffer has been
used up and that it wants some more. The example used here was communication between primary and
secondary storage, but the same is true for any communication between the processor and a peripheral
device, e.g. a printer or a keyboard. The system is not really quite as simple as suggested here, but further
complications can wait until the second year of the course.

1.5.e Common Peripheral Devices


Any hardware device that is part of the computer system but is not part of the processor itself, is called a
peripheral device.
Peripheral devices can be categorised under four headings.

1. Communication devices.
These devices allow for communication between machines and will be covered in detail in section
1.6.b.

2. Storage devices.
These devices, which provide for secondary storage in a computer system, have been described in
section 1.5.c.

3. Input devices.
There are too many different input devices to expect familiarity with all of them. However, by
inclusion in the syllabus there are some that must be understood. While this list is not exhaustive,
specific questions will not be asked about other input devices with the following exceptions. There
are some devices that are so common that any candidate taking an exam in computing can be
expected to have experience of using them, e.g. mouse, keyboard. Additionally, candidates should be
encouraged to learn about a variety of contemporary devices so that they can use them when
answering questions that ask for a hardware configuration for a specific application.

Page No. 53 of 160


a) Keyboard. A standard keyboard uses keys that stand for the different characters that the
computer recognises in its character set. Most keyboards contain the letters of the alphabet,
but not all do, for instance most calculator keyboards are very different, as are the keyboards
for use at ATM machines. The characters needed for specialist use machines are determined
by the use to which the machine is to be put. Keyboards are the most common form of input
device to a system because they are universally available and understood.

The common keyboard is known as the QWERTY keyboard because those are the first six
characters on the top line. The design is not very good for two reasons. First, the arrangement
of characters comes from the original typewriter whose keyboard was arranged to be the most
difficult to use in order to slow typists down so that they did not jam the mechanism of the
old machines. The second is that the keyboard itself is difficult to use comfortably because of
the way that the keys are arranged in rigid rows, making it awkward to keep your arms
comfortable while using it. The first problem is very difficult to solve because of all the
experienced operators that can use the present keyboard so well. Retraining them to use a
different arrangement of keys would not be feasible. Various attempts have been made to
address the second problem by arranging the keys in curves that fit the palm of the hand
rather than in straight lines. These are called natural or ergonomic keyboards.

One problem with normal keyboards is that they are particularly prone to damage from dirt or
liquids because of the gaps between the keys. A different type of keyboard, where the keys
are simply part of a continuous surface which has areas on it, which are sensitive to pressure,
can overcome this problem. Called touch-sensitive keyboards, or concept keyboards, they are
ideal for use outside because rain will not damage them like a normal keyboard.

A type of keyboard not yet mentioned is a musical keyboard. Normally arranged like a piano
keyboard these need a special piece of hardware to allow them to work properly, known as a
MIDI (musical instrument digital interface) this connects the musical keyboard to the
processor and allows data to be passed between the instrument and the processor.

b) Mouse. A mouse is a device designed to be used with a pointer on the screen. It is


particularly useful because it mimics the natural human reaction of being able to point at
something. A mouse is really two input devices in one. One is the movement around the
screen created by actually moving the mouse in a physical way, and the other is the ability to
select, which is done by using a switch (the mouse buttons). Variations have been developed
which use the same basic principles but are designed for particular applications. An example
is the tracker ball used in many laptop computers. This is like an upside down mouse where
the user moves the ball directly rather than moving an object around a flat surface. This is
necessary because when using a laptop there may not be a flat surface available.

c) Barcode readers. A barcode reader is a laser scanner that reads the reflected laser light from
a series of dark and light coloured lines of varying thickness. The different widths of pairs of
lines make up a code that can be converted into a number. This number can then be used as
the keyfield relating to a file of items that have been barcoded. The details of the contents of
the barcodes are not of importance to us in this section, except to say that barcodes can easily
be misread by the system, so one of the digits in the number is used to check that the rest of
the code has been read properly. This digit is called the check digit, and will be discussed in
more detail later in the course. Barcodes are particularly useful because they do not rely on
human beings to input the data, although, if the barcode is damaged so that the laser scanner
cannot read it properly, the digits represented by the code are printed underneath so that they
can be input by a user at a keyboard. Barcodes are used where the data does not change, and
so can be printed on original packaging.

Page No. 54 of 160


d) MICR (magnetic ink character reader). This is a device that reads characters that are
printed on an original document at the time of it being created. The characters are printed
using magnetic ink. The value is that the characters are readable by humans and by machines.
The only common use for such characters is the data printed on the bottom of cheques
containing account identification.

e) OCR (optical character reader). This is a device that reads characters and can distinguish
between the different characters in a given character set. It works by comparing the shape of
a scanned character with a library of shapes that it is intended that it should recognise. OCR
tends to be an unreliable form of input and works more effectively when it is restricted to
having to recognise a standard character set produced by printing rather than by using hand
writing. OCR is used for reading post codes on printed documents and also for reading
documents for blind people, the contents of which can be output using a voice synthesizer.

f) OMR (optical mark reader). This device can recognise the presence of a mark on a sheet of
paper. The position of the mark conveys information to the machine. For example a school
register may consist of a list of names of pupils in a class together with two columns of small
rectangles, one for present and one for absent. The same action (shading in a rectangle)
stands for both being present and being absent. The difference is the position that the mark
occupies on the paper. Printing in the sensitive areas of the sheet is done using a special type
of ink which the optical scanner does not see, that is why OMR documents tend to be printed
in a light blue or pink colour. The other standard use for OMR documents is as multi choice
examination answer sheets.

The big advantage of both OCR and OMR is that data can be input to a computer system
without having to be transcribed first, thereby cutting down the number of errors on data
input.

g) Scanners. A scanner is a device that converts a document into a series of pixels (picture
elements – these are small squares that, when put together, form a picture). The larger the
number of pixels, or conversely the smaller each individual pixel, the better the definition of
the final picture. There are different types of scanner, but all use the same principle to create
the image. A typical use for a scanner would be to input a picture of a house so that it could
be included with the details of a house that is for sale in an estate agent’s publication. A
scanner is an input device, not to be confused with a plotter which is an output device.

h) Graphics Tablet. A graphics tablet is a flat surface on which a piece of paper is placed. The
user can then draw on the paper and the tablet will sense where the pencil is pointing and
transfer the line to the screen.

i) Microphones. Used to input sound to a computer system.

4. Output Devices
There are too many output devices to be able to write notes on all of them. Again, the same thing is
true about output as is true about input, that it is important to know about those devices stated in the
syllabus and also a range of devices that will allow for sensible decisions about peripheral devices to
be made for a given scenario in a question.

a) Screens. Monitor screens are categorised according to the obvious colour/monochrome, also
according to the number of pixels that there are on the screen. The more pixels there are, the
better the picture will be, this is known as the screen resolution. This is being typed using a
very low resolution, monochrome screen. If you consider the contents, there is no reason for
any further sophistication to be necessary. However, a computer system running a modern
game program will need colour and many more pixels in order to produce a satisfactory

Page No. 55 of 160


picture. The more pixels that there are on the screen, the higher the resolution is said to be. A
particular type of screen, called a touch screen, acts as both an input device and an output
device. Information is output by the system onto the screen and the user is invited to answer
questions or make choices by pointing at a particular area of the screen. The device can sense
where the user is pointing and can report the position to the processor. The processor can then
deduce what the user’s reply was according to the position that was pointed to. Touch screens
are particularly useful in areas where keyboards are not appropriate, e.g. where the device
may suffer from vandalism. They are also useful for users who would find difficulty using
other input devices, e.g. very young children who want to be able to draw on a screen.

b) Printers. A printer is a device which provides the user with an output from the system which
is permanent. This output is known as hard copy, so a printer is a device which produces hard
copy. There are many different types of printer and the student should be aware of a number
of them, their uses, advantages and disadvantages. However, there is no need to understand
how they work. The first type is a dot matrix printer. These tend to be slow, and the output is
particularly poor quality. The big advantage is that the output is produced by using pins to
strike at the surface of the paper. Because of the physical nature of the way that the printout is
produced, it is possible to obtain multiple copies by using carbon paper or self carbonating
paper. A good example of this is the receipt that a shopper is presented with if buying
something using a credit card, there are two copies produced, back to back, one for the shop
to keep and one for the buyer to take away with them.

Ink jet printers, which produce output by spraying ink on to the paper could not produce the
two copies that the dot matrix can, but it can produce much better quality and in colour, at
low cost. This makes ink jet printers ideal for home use. Laser printers can produce very high
quality work at high speed. The cost is more than with the other types but used where it is
necessary to give a good impression, for instance sending letters from a solicitor’s office to
clients. Plotters are a type of printer designed for drawing lines and geometric designs rather
than for producing characters. The image is created by pens being moved across a piece of
paper, under the command of the processor. Plotters tend to be used for drawing blueprints,
perhaps in an architect’s office to produce detailed drawings of buildings for builders to
follow.

c) Speakers. Used to output sound from a computer system. There are many other peripheral
devices and, as has been mentioned, a knowledge of some others will not come amiss,
however that is enough to be able to answer questions in the exam. The questions will
normally take the form of presenting a scenario and then asking for a description of the
hardware required. The important thing to remember is how the marks will be awarded.
There will not be a mark for every device mentioned, but the candidate will be expected to
give sensible suggestions for each of the four areas of peripherals mentioned at the start of
this section. In other words the mark will not be for a keyboard or a mouse, but for suggesting
sensible methods of input to the system.

Page No. 56 of 160


Example Questions.

Q 1. State three functions of the arithmetic logic unit. [3]


A. 1. Any arithmetic is carried out in the ALU. (This normally takes the form of addition, and the
result is stored in the ALU temporarily before being returned to the memory)
2. Logical decisions can be made by the processor. (The processor can use the ALU to decide
whether one value is greater than another, or if one is negative,…, and then make decisions
based on the answers)
3. Communication with peripheral devices is carried out via the ALU. (All data which is to be
used by the processor has to be stored in the memory. Any item of data which is bound for
the memory must be stored temporarily in the ALU while the processor decides where it is
going to be stored)
Notice that the question asked for three answers. The sensible response would seem to be to number
them. The expected answers are the three single line responses. The contents of the brackets give
extra information which would not be expected in this question. However, if the question had said
‘Describe…’ or ‘Explain…’ instead of ‘State…’, then the question would have been worth 6 marks,
and some extra detail, for instance the contents of the brackets, would have been necessary.

Q 2. a) State two ways that RAM and ROM memory differ. [2]
b) Explain what types of data would be stored in each of RAM and ROM memory, giving
reasons for your answers. [4]
A. a) -RAM is volatile (will lose its contents when the power is switched off), while ROM is not.
-The contents of RAM can be altered, whereas the data stored in ROM cannot be altered.
b) -RAM would contain user files and software that is in current use.
-RAM is used for these files because they have to be alterable, and the user will want to use
different software from time to time, implying that the original software will need to be
erased so that it can be replaced. Losing these files when the machine is switched off is not a
problem because they will have been saved on secondary storage.
-ROM is used to store the bootstrap program.
-ROM is used because when the computer is initially switched on there must be a program
present that can be used to load up the rest of the operating system from secondary storage.
This program must not be altered because without it the computer cannot start to work.

Notice the way that the answers have been phrased in part (a). The question asked for a comparison
of ROM and RAM so both need to be mentioned when you are giving an answer. To say that RAM
is volatile is true, but does not answer the question until you say that ROM is not. Part (b) is asking
for reasons to be given. Notice that the reasons given related to the answers given in part (a). The
part (b) answer is not, “user files because there is more space in RAM”, although that could be right
if phrased a little more carefully.

Q 3. A student has a home computer system.


State what storage devices would be used on a home computer system and justify the need for
each one. [8]
A. -Hard disk…
-to store software and user files (e.g. word processor and essays)
-Floppy disk drive…
-to enable work to be transported between school and home so that it can be continued in the evening
-CDROM…
-to allow the import of new games to the PC.
-Zip drive…
-to back up the files, so that important work is not lost if the hard disk crashes.
Notice that the question does not specify how many devices should be mentioned. However, each
device has to be named and justified (2 marks) and there are 8 marks for the question, so four devices
seems sensible. What happened to tape? After all that is the first secondary storage that was
Page No. 57 of 160
mentioned in the text. Tape is not sensible in this example, there is not a big enough volume of data
to make a tape streamer worthwhile, and the old cassette tape is an antique by now. Consequently, a
tape device does not fit the application given. Notice, also, the way that the justification for each of
the devices was linked to the application, for a floppy drive, the answer did not just say that it could
be used to transport files, but it gave a good reason for wanting to do so in this case.

Q 4. Describe how buffers and interrupts can assist in the transfer of data between primary
memory and a secondary storage device. [4]
A. For the purposes of this answer I will assume that data is being transferred from the processor to the
secondary storage.
-Buffer is an area of fast access storage..
-which can be filled by the processor and then emptied at slower speed by the secondary storage
device…
-allowing the processor to continue with other tasks.
-When the secondary device has used the contents of the buffer…
-it needs to tell the processor that it requires more data…
-this is done by sending a message to the processor, called an interrupt.
Notice that the answer describes transfer of data from the processor to the peripheral. Transfer in the
other direction is equally valid and gives rise to a similar answer. However, if the two answers are
mixed together then it produces a confused, and often, wrong, answer. This is why the first statement
is important as it has set the parameters by which the question will be answered. You don’t have to
say this in your answer, but it makes clear what is being done.
Also, there are more mark points than there are marks available. Hopefully, you are getting used to
this because it is generally true in most questions. In this question there are obviously two points for
interrupts and two for buffers, but in order to get the marks you must make sure that the definition
appears somewhere. So, for the interrupt, you need to earn the last mark point, otherwise you haven’t
defined what an interrupt is.

Q 5. A department store decides to place a computer system by the main entrance to the store so
that customers can find out whereabouts in the store items are available. The different
departments remain in the same places, but the articles available in each department change
on a regular basis. State a sensible hardware design for such a computer system, giving reasons
for your choices of hardware. [6]
A. Input:
-Touchscreen
-Some protection against vandalism/restricts user access to contents of menu system
displayed/simple to use because it uses human reaction of pointing so no training necessary
Output:
-(Touchscreen)/printer
-Touchscreen outputs choices for user to select from/printer available for producing hardcopy
as a permanent record for the customer
Storage:
-Hard drive/CDROM
-Hard drive necessary to store details of the products on sale because of the large number of
changes that occur in this file. CDROM used to keep the store plan and the location of the
departments as these do not change.
Notice the large number of possible mark points. Also the way that the marks are split up. In this
type of question you can’t expect a lot of marks for simply writing down a long list of peripheral
devices, the marks are split up according to the four types of peripheral mentioned in section 1.5.e. In
reality, this question would probably have talked about such systems being available throughout the
store, but this would mean that they would be able to communicate with one another. As
communication comes in the next section it was left out of this example question, but such a question
would normally have 8 marks, 2 marks for each of the types of peripheral.

Page No. 58 of 160


1.6: Data Transmission and Networking

1.6.a Networks
1.6.b Hardware and Software
1.6.c Network Topologies
1.6.d Different types of data transmission
1.6.e Bit rates
1.6.f Error checking and correcting
1.6.g Switching
1.6.h, i Protocols
1.6.j Layering of interfaces
1.6.k Advantages and disadvantages of networking

Sample questions

Previous Menu

Page No. 59 of 160


Chapter 1.6 Data Transmission and Networking.

1.6.a Networks
All the systems that have been mentioned so far have been individual computers, sometimes with more than
one user, but single processors. This means that the systems we have discussed so far are not connected to
other machines. Imagine a classroom with 20 computers in it. Every time the lesson ends you would need to
store your files on secondary storage. It would be possible to store the files on a floppy disk and take them
away with you, but the likelihood is that the files will be stored on the hard disk. This means that the next
time you want to use those files you need to sit at the same computer. It would be much more sensible to
have a system that allowed access to the same files through any of the 20 computers. To allow the computers
need to be connected up to each other. When computers are connected together to share files they make a
network.

A network of 20 computers in a school classroom is obviously on a small scale, not because 20 is a small
number, but because the communication is made easier because of the short distances involved. If a business
with head offices in London and factories in Karachi and Hong Kong wanted to connect the computers on
the three sites up there is an obvious problem of distances to be overcome. Generally, networks over small
distances are called Local Area Networks (LAN) while those over great distances are Wide Area Networks
(WAN). Whether the network is a WAN or a LAN it will have the advantage of offering the users the
chance to communicate with one another, to share information centrally, to share copies of software and to
allow multiple access to files of data. In a LAN there is the added benefit of being able to share hardware, so
the classroom with 20 computers may only have 3 printers. Also those printers may be different types that
could be used for different tasks. This means that the type of printer used is dependent on the job that the
user wants it to do rather than the type of printer that happens to be connected to the computer on which the
work is being done.
To summarise:
 Computers can be linked together to form networks
 If the distances are short the network is called a LAN, if longer the network is a WAN
 Networks allow computers to communicate
 Networks allow the sharing of both hardware and software.

1.6.b Hardware and Software


Network Basics.
In order to connect computers in a network there are a number of essential things necessary
 Each computer needs to be able to communicate with others. In order to do this there needs to be a
special piece of hardware attached to the processor, called a network card. It is through this network card
that the computer can communicate.
 The computers need to be connected in some way. The standard method in schools is to use a cable. The
cable is coaxial, like a television aerial. The cable has a limitation in that the signal gradually
deteriorates as it is sent down the cable which means that the maximum length of the cable is about 300
metres. This maximum depends on a number of things, not least the quality of the cable used, but all
cable is ultimately going to be limited in length.
 With a number of computers attached to the network, communications are going to get complicated.
There is a need for something to control the signals being transmitted. This job is carried out by a
computer whose job is to control the network, it is known as a server or a network server. One of the
jobs of the server is to control access to the files held on a hard disk, because of this it is sometimes
known as the file server. Some networks have a number of different servers controlling different parts of
the system, for example, there may be a printer server to control use of the printers. On many LANs
these server functions are all carried out by the single network server.
 The communications around such a system are obviously quite difficult to control. It is necessary to have
a set of instructions that the network must follow, this is known as network software or a network
operating system.

Page No. 60 of 160


A wide area network differs because the distances involved tend to be far greater than for a LAN.
Consequently it is not possible to connect all the computers by a cable. Actually the cables already exist to
do this, the telephone system. So to connect two computers over a long distance, they can simply ring each
other up! Unfortunately, the type of signals produced by a computer are different to the type of signal that
can be sent down a telephone line. In order to send a computer signal down a telephone line it must be
altered first. This is done by another piece of hardware called a modem. A similar modem must be present at
the other end of the line in order to turn the signal back again.

1.6.c Network Topologies


There are a number of ways that the machines on a network can be connected together. The shape of the
network is known as its topology. We are interested in three different network topologies.

1. Bus network

In a bus network the hardware items all use the same, central, communication line, known as a bus. The
advantage is that the installation of the system is comparatively easy because there is only one
communication line. However, the disadvantage is that a single break in the cable will stop all
communications in the network.

2. Ring network

In a ring network the two ends of the bus are joined up. This creates a loop so that data can be sent in both
directions along the cable. If there is a break in the cable, the network will continue to operate because the
messages can go in the other direction.

3. Star network

Network
server

Page No. 61 of 160


In a star network the individual pieces of hardware are connected to some central point, usually the network
server. This means that the failure of a single piece of hardware or the breaking of a connector can only
effect that piece of hardware and none of the others. The wiring up of the network can be very complex,
though.

1.6.d Different Types of Data Transmission


Serial and Parallel transmission of data
Data needs to be transmitted between devices in a computer system. The easy way to do this is by using a
single wire that links the two devices. Data is transmitted in the form of bits down the wire, so an 8 bit byte,
that stands for a single character, will be transmitted in 8 parts, one signal for each bit.

Device 1 Device 2
011 0 1 1 0 1

The diagram shows the data byte 01101101 being transmitted. As there is only one wire, only one bit can be
transmitted at a time. This is known as SERIAL transmission of data. Serial transmission has the advantages
of being simple and reliable because the next bit is not transmitted until the current one has arrived at its
destination. However, because only one bit can be transmitted at a time, the speed of transmission is slow.

If the devices are connected by more than one wire, then more bits can be sent at once. A sensible number of
wires would be 8, because then a whole byte can be sent at once instead of having to send one bit at a time.

Device1 Device 2

0 transfer is called PARALLEL transmission. Parallel transmission of data is obviously


This type of data
faster than serial because all the bits are traveling at the same time, but because of the fine tolerances in the
transmission, it1 is less reliable as the bits can become muddled up.

1
Modes of Transmission.
If data is to be transmitted between devices, there are three different modes of transmission possible.
a) Simplex0 mode. If data can only travel in one direction then it is known as a SIMPLEX transmission.
A good example of a simplex transmission of data is tele text information, which is passed to a
1 receiver, but there is no way to send data in the other direction.
television

Transmitter Receiver

b) Duplex mode. When data can pass in both directions at the same time it is known as DUPLEX
transmission of data. An example of duplex transmission would be a telephone conversation as both
users can speak and be heard at the same time.

Device 1 Device 2

Page No. 62 of 160


c) Half duplex mode. When data can pass in both directions, but only in one direction at a time, the
transmission is called HALF DUPLEX. An example of half duplex is a CB radio system in which
each handset can either be set to receive mode or send mode.

Device 1 Device 2

1.6.e Bit Rates


Information needs to be sent to devices in a computer system from other devices. For example, a picture
stored in the memory of the computer needs to be sent down a telephone line to another computer.
Remember that the more pixels that there are and the more colours that can be represented, the better the
picture will be. However there is a limit to the amount of information that can be transmitted in a given time
down the phone line, so a decision needs to be made. One choice is to have as much detail as possible and
accept that it will take a long time to transmit it. The other is to limit the resolution of the picture, meaning
that there is less information to send so that the message will be sent more quickly. The number of bits that
can be sent in one second is known as the BIT RATE. The units used to measure the bit rate are BAUD. 1
baud = 1 bit per second.

Note that text can be sent much more quickly than other forms of information because it needs far fewer bits
(1 byte per character) than other types of data. When data other than text is being transmitted, e.g. on the
internet, it is important to limit the amount of data that needs to be sent or the time it takes to download the
data can be unreasonably long. The data can be limited by such simple things as reducing the size of pictures
so that they only take up a small part of the screen, or that they are restricted to a few colours. Speeding up
the transmission of the information by reducing the amount of data that is sent is known as compression.
This will be studied in more detail in the second year of the course.

1.6.f Error checking and correcting


When data, of whatever type, is being transmitted from one part of a computer system to another, it is
transmitted as a series of binary digits. Any data that is transmitted is going to be made up of a very large
number of bits. Consequently, there are bound to be occasions when the data is not transmitted correctly.
Luckily there are only two possible mistakes that can occur, either a 1 is received as a 0, or a 0 is received
as a 1. Mistakes occur rarely, but when they do occur they can be very serious, as the information is no
longer correct. This makes it very important that there should be methods for checking the data when it has
been transmitted.

a) Echoing Back. The simplest way of checking the transfer of the data is to send it back again. If the
data that is sent back is the same as the data that was sent in the first place then the original data must
have reached its destination correctly, if not then it needs to be sent again. This is known as
ECHOING BACK. Echoing back is very effective, but suffers from having to send data twice, thus
taking longer than necessary, and needing to be a duplex, or half duplex, system to allow data
transfer in both directions.

b) Parity. All data is transmitted as bits (0s and 1s). The Number of 1s in a byte must always be either
an odd number or an even number. If two devices that are communicating data decide that there will
always be an odd number of 1s, then if a byte is received that has an even number of 1s, an error
must have occurred. E.g. the byte 01011000 has 3 ones in it. 3 is an odd number, so it fits the rule
that it must have an odd number of ones. When it is sent there is an error in transmission so that the
first bit is received as a one. So, the byte received is 11011000. This has 4 ones in it, which is an
even number, so there must be an error. The receiving device would ask for it to be sent again.

Page No. 63 of 160


Notes:
 If two mistakes are made in the same byte they will cancel each other out and the faulty data will be
accepted. This problem can be overcome, and in the same way, a clever way of correcting error mistakes
can be implemented. This method is not part of this course.
 Earlier in this course it was said that a byte was the number of bits necessary to hold a character code.
Specifically, an ASCII character uses 8 bits in a byte, giving 256 different characters. This is not true
because one of the bits has to be reserved for a parity bit, the bit that can change to make sure that the
number of ones is always odd. This means that there are 128 different characters possible.
 The implication in all the above work is that odd parity is always used. Even parity can equally well be
used, whichever has been agreed between the two devices.
 Parity is not only used during data transfer between devices, but also when data is transferred between
different parts of the CPU.

c) Check Sum. Data will normally be sent from one place to another as a block of bytes rather than as
individual bytes. The computer can add numbers together without any trouble, so another checking
procedure is to add all the bytes together that are being sent in the block of data. The carry, out of the
byte, is not taken into account, so the answer is an 8 bit number, just like the bytes. This answer is
calculated before the data is sent, and then calculated again when it is received, and if there are no
errors in the transmission, the two answers will match.

1.6.g Switching
When a message is being sent from one machine to another, particularly over a wide area network, the
message may have to pass through other machines first. This may be forced on the system because there is
no direct route from one machine to another.

B
A C

D
E

In the network shown, it would be easy to send a message from A to D or from A to B because A is directly
connected to both of them. However, sending a message from A to C is much more difficult because there is
no direct route. There are two ways that the message can be sent
a) Packet switching. The message is split into a number of equal sized packets. Each packet has a label
saying where it is meant to be going and what number packet it is. These packets are sent along
communication lines towards the destination. Each time a packet reaches a node on the network the
node decides which direction to send it on. So, one packet in the message from A reaches node D.
The obvious route to take is the one directly to C, but it is already in use for another message, so D
decides to send it to E instead. The next packet arrives at D and, this time, the line to C is free, so the
packet is sent direct to C. When the message has all arrived at C it has to be reassembled in the
correct order.

b) Circuit switching. Before the message is sent, the network reserves a route from A to C. The message
can then be sent directly from A to C and will not need to be reassembled when it gets there.

Packet switching allows optimum use of the connections around the network because as many routes
are in use at one time as possible, whereas circuit switching means that the whole message is kept
together so it does not need to be reassembled at the destination.

Page No. 64 of 160


1.6.h/1.6.i Protocols
When data is being transferred from one place to another in a computer system there must be rules set up as
to how the transfer is going to be done. Typical rules would be
 A rule about the wire connecting the two parts of the system. Errors would occur if one device had a
serial connection and the other was expecting a parallel connection
 If one device sent data at a particular bit rate and the other device read what it received at a different rate,
the message would never be received correctly.
 If one device used even parity and the other device used odd then no correctly sent byte of information
would ever be accepted.

The set of rules that needs to be set up to allow the transfer of data to be carried out is known as a protocol.
There are a number of protocols that you may have heard of e.g. http, TCP (IP) but don’t worry about them,
you do not need to know specific examples of protocols, but you should be able to discuss some of the rules
that go to make up a particular protocol.

1.6.j Layering of Interfaces


The interface between two devices is the connection between them through which the data can be sent.
This connection between the devices can take the form of the physical connection, whether wires are used or
some other form of connecting them together. However, it also includes many other things like how error
correction is going to be carried out, how messages are routed from one place to another, how the flow of
data is going to be controlled, how the data transfer can be synchronised so that data does not become mixed
up, and many other things that need to be agreed upon.

This is a very complicated idea, but, in essence, there are two ways of setting up this interface. One way is to
try to do the whole thing in one go, and the other way is to divide the interface into sections and do one bit at
a time. For instance, first set up the rules about how the devices are to be connected physically, and later on
worry about how to spot errors that have been made in the data transfer. This is known as layering the
interface because the most basic layer has to be done first and then more layers may be put on top.

The main advantage of layering the interface is that changes may be made to one layer without having to
change them all. It also allows manufacturers to develop devices for particular layers, knowing that they will
be compatible with other devices at that level.

1.6.k Advantages and Disadvantages of Networking


Advantages.
 The main advantage of linking computers in a network is that they can share data. If two computers each
have their own copy of a database then, unless no changes can be made to it, one computer will always
have a more up to date version than the other because a change made on one machine will not register on
the copy of the database on the other machine. If the two machines are networked there only needs to be
one copy of the database, therefore any change made to the database will be used by both machines.
 The machines can be used to communicate, a good example being the use of e-mail over the internet.
 On a LAN the sharing of hardware and software between machines can reduce the cost of a large amount
of computer equipment being needed in a small area, although, the saving on software is not necessarily
what might be thought because the license for network software is far more than for a single machine.
 Also on a LAN, access to files does not depend upon the physical location of the user, but on who the
user is. For example, in a school classroom, if a pupil was working at a particular machine at the end of
one lesson they do not have to use the same machine the next lesson, they may even be in another room.
Disadvantages.
 The fact that the network allows access to user files from more than one machine means that keeping
files secure is far more difficult. Methods like user ID and password systems have to be employed to
ensure that the correct users are given access to the correct files.
 If there is a fault on the network it can effect more than one station, and if the server is faulty the whole
network will fail.
Page No. 65 of 160
Example Questions

Q 1. Explain the difference between a wide area network (WAN) and a local area network(LAN). [2]
A. - In a WAN the computers on the network are remote from each other, while in a LAN the
computers are close to each other.
- The method of communication between nodes is likely to be different, with a LAN typically
being hard wired and a WAN being connected by using phone lines.
Notes: The use of the terms LAN and WAN are perfectly acceptable without reference to what they
stand for, as it has been stated in the question. Even if it hadn’t been stated in the question, these sets
of initials are stated in the syllabus so there is no problem in using them without explanation.
However, be careful when using acronyms like this as what might be obvious to you may not have
been heard of by the examiner, so a brief explanation on first mention is generally a good idea.
Two mark points available, note that they are not given for saying that the WAN is remote while the
LAN is confined to a small area. This is really the same thing said the other way around. Be very
careful about saying the same thing twice and thinking you have both marks where you have really
only said one thing. Another example of this is when a question asks for advantages and
disadvantages of two things. The same thing given as an advantage of one will not be given a second
mark as the disadvantage of another.

Q 2. a) State three pieces of hardware that are needed to create a LAN from a set of stand alone
computers. [3]
b) Explain why the communication over a WAN differs from that across a LAN and state
how the hardware necessary for communication would differ from that used in part (a).
[3]
A. a) - Network cards in each of the computers
- Cable to carry the signals from one point to another on the network
- A network server to control access to peripheral devices and to files on the shared hard
drive.
b) - The distances between the computers are further than on a LAN…
- The cable used to connect up a LAN will only transfer signals over limited distances
- Other communication medium needed, e.g. modem and a telephone line.

Q 3. By drawing a diagram, or otherwise, describe a ring network and state an advantage that a
ring network has over a bus network. [3]
A. - Single ring of network cable shown clearly on diagram, may have spurs to single machines
- Server as part of network
- Sensible peripheral devices shown
- Advantage: If cable is damaged the network can continue to operate.
Notes: If the question suggests drawing a diagram it is because that is the best way of answering the
question, use that method unless you are totally stuck. There are no marks for doing so, but that will
be the easiest method.
Q 4. Explain the difference between
(i) simplex
(ii) half duplex
(iii) duplex
transmission of data, giving an example of the use of each. [6]
A. (i) - Simplex is the transmission of data in only one direction
- An example is the transmission of a television picture from the transmitter to the receiving
aerial, there is no signal sent back.
(ii) –Half duplex is a means of transmitting data in both directions, but only in one direction at a
time.
-An example of half duplex transmission is a walkie talkie where the handset needs to be set
to either send or receive.

Page No. 66 of 160


(iii) - Duplex transmission of data is the ability to send messages over the same link, in both
directions, at the same time.
- An example is the use of a telephone.
Notes: Nice, standard, question requiring a standard answer. As with so many of these questions, if
you try to make up your own examples you could be making a big mistake.

Q 5. Explain why the bit rate is more important when sending a colour picture from one device to
another, than it is when sending a page of text. [3]
A. -Colour picture requires more data because each pixel must be defined
-Page of text has less data because each character is defined by its own byte of data
-Bit rate is the speed at which a given amount of data can be transmitted which is more important the
more data that there is.
Notes: This answer is not quite right because it is possible to imagine a page of text written in 2
point font which would use a large amount of data, while a colour picture of alternating stripes of red
and blue would not need a lot of data to describe it. Also this answer does not take any account of
compression algorithms that many students may know something about. However, in principle this
answer is true, and, considering there are only three marks, any attempts to complicate the answer
must be counter productive.

Q 6. The following bytes of data are received by one device after being transmitted from another.
01001101
10001000
10101011
00011011
An automatic checking technique is used to check that the data has been transmitted without
error.
a) State which byte has been received incorrectly, explaining how you arrived at your
answer. [3]
b) Explain why it is possible that a byte of data could still be incorrect despite passing the
test that you used in part (a). [1]
A. a) -10101011
-Bytes should pass a parity check
-Other bytes are of even parity while this is odd
b) -If two bits in the same byte are in error the effect of each will cancel out the other.

Q 7. Explain the difference between packet switching and circuit switching. [2]
A. -Packet switching sends message in equally sized pieces in any order, while in circuit switching the
message is sent in order meaning that it does not need to be reassembled at destination.
-Packet switching involves the individual packets being sent onto the network before a route is
established, while circuit switching requires a route to be established before transmission.

Notes: A difficult question. The immediate reaction is to say that circuit switching needs a route to
be established before transmission. Packet switching does not need a route to be established. This is
the same point from two perspectives, and hence is only worth one mark. The second mark is much
more difficult to find.

Q 8. A computer is to use a printer to provide hardcopy output of jobs. In order for the data to be
transmitted and received properly a protocol must be set up between the two pieces of
hardware. State two parts of the protocol which would be essential in this example, giving
reasons why they are necessary. [4]
A. -Baud rate
-necessary because if the computer transmits at a different speed to that which the printer can receive
the message will become jumbled.
-Parity type

Page No. 67 of 160


-because if the computer transmits using odd parity and the printer checks using even parity correct
bytes will never be accepted.
Notes: There are many possible answers to this type of question. You may know more than the ones
stated in the text of this chapter, be warned, stay with the ones in the text then there is no chance of
misunderstanding. Some students, on sight of the word protocol, desperately want to write down
TCP(IP) or http. Be very careful. It would be difficult to think of a question, at this level, which
could possibly have those as answers.

Q 9. a) Explain the term “layered interface” when describing intercommunication between


devices. [2]
b) State a reason for arranging the interface between devices in a layered fashion. [1]
A. a) -Different rules have to be established to allow the communication to take place
-These rules are split up into types, for instance the physical connection between devices and
the agreement of error trapping routines will be handled separately
b) -The rules in one layer can be altered without having to alter those in other layers.

Q 10. A school computer department has decided to invest in new hardware in the two rooms that it
uses for computer lessons in the school. The teacher in charge has to decide between a network
of computers or a collection of stand alone machines. The teacher has asked your advice about
which hardware to implement.
a) State four advantages in implementing the network solution. [4]
b) State a disadvantage of using a network in this context and suggest a solution to the
problem. [2]
A. a) -Hardware can be shared. There is no need for a printer for each machine.
-Software can be shared. Only one copy of each piece of software is required.
-Pupils can access their files from any machine on the network, they do not have to use a
particular machine.
-Communication can be carried out between machines in the two rooms.
-Files stored on the disk drive only need to be updated once, so all machines can access the
same information in common files.
b) -Files are less secure because of reliance on single drive
-regular back up copies of files should be taken.
-Privacy of files is more difficult to control because of common access to hardware
-Use of passwords to control access to files.

Page No. 68 of 160


1.7: Systems Development Life Cycle

1.7.a. System Life Cycle as an Iterative Process


1.7.b. Problem Definition
1.7.c. A Feasibility Study
1.7.d. Information Requirements of a System and Fact Finding
1.7.e. Requirements Specifications
1.7.f. System Evaluation
1.7.g. Documentation
1.7.h. Testing and Implementation Planning
1.7.i. System Maintenance and the Software Life Span

Previous Menu

Page No. 69 of 160


Chapter 1.7 Systems Development Life Cycle.

1.7.a System Lifecycle as an Iterative Process


When considering the systems development life cycle it is important to think of the different stages as a
continually developing process rather than each stage being an end in itself. When one of the stages is
completed the following stages may mean that the previous ones may need to be considered again. If the
problem definition agreed with the end user later proves to be impossible to implement then the problem
will have to be redefined. If the required input proves to be not feasible then it may be necessary to alter the
expected output. If, during the training of the staff, one of the input operators proves to be colour blind then
the input screens may need to be altered in order to not have any clashes between red and green.

This reliance of each stage being on the following stages as well as the previous ones means that the process
is said to be iterative.

1.7.b Problem Definition


It is important from the outset to ensure that when a computer system is being designed all those that are
involved are agreed about the aims of the system.

There will normally be a person, or a company or organisation that decides that a task would benefit from
computerisation. This belief normally arises because there is a problem which cannot be solved by
previously used methods or similar problems seem to have been solved by computerisation elsewhere.
Unfortunately, the owner of the problem probably understands the problem itself quite well, but does not
understand the consequences of using computers to try to solve the problem, or, indeed, whether such a
solution is even possible. For this reason it is necessary for the organisation to employ a specialist who does
understand computers and computerised solutions to problems. This is the systems analyst. Unfortunately, it
is probable that the systems analyst is not expert in the area of the problem.

The system analyst’s job is to solve the problem by planning and overseeing the introduction of computer
technologies. The owner of the problem will be happy if the analyst can introduce a computer solution. The
problem arises when the analyst, who doesn’t know very much about the business, solves the problem that
they think needs solving, while the owner of the problem expects a very different problem to be solved.

It seems obvious that if someone is doing something for someone else that they should make sure that they
know what is required. If you are asked to answer questions 1 to 5 and you do 6 to 10 instead there is an
obvious breakdown in communication, but this is what can happen if you only listen to the instruction, “Do
the 5 questions”. The method most often used to overcome this problem is for there to be discussions
between all the interested parties, and then for a list of objectives to be written up. This list of objectives, if
they are all solved, will be the solution to the problem. The different people involved then agree to the list of
the objectives and the success or otherwise of the project depends on the completion of those objectives.

The definition of the problem is the most important part of the analysis because if it is not done correctly the
wrong problem may be solved.

1.7.c A Feasibility Study.


When the organisation and the systems analyst have agreed the definition of the problem, a decision must be
made about the value of continuing with the computerised solution. The organisation may be convinced that
there is a problem to be solved, and that its solution will be worth the effort and the expense. However, the
systems analyst is being paid to look at the problem, and its solution, from another point of view. The
analyst is an expert in computer systems and what is possible with computer systems. This analyst must
consider the problem from the point of view of the computerised part of the solution and make a report to
the organisation saying whether the solution is possible and sensible. This report is called the feasibility
study because it says whether the solution is feasible.

Page No. 70 of 160


The feasibility study will consider the problem, and the proposed solution, from a number of points of view.
 Is the solution technically possible? A car firm may decide that if robots are used on the production line
to assemble the different parts of engines then quality of work may improve. However, if it is not
possible to manufacture a robot arm of the correct dimensions to fit into the small areas under a car
bonnet, it doesn’t matter how big an improvement there would be in the quality of the finished product,
it would simply not be feasible.
 Is the solution economic to produce? Perhaps the robots exist that can be programmed to assemble this
engine and the benefits will be worthwhile. However, if the cost of the robots and the program to control
them is so great that it puts the car manufacturer out of business, the introduction of the robots is not
feasible.
 Is the solution economic to run? It has been decided that there are tremendous benefits in producing a
robot production line and the robots are very cheap to buy, but they have so many electric motors, and
they are so slow at assembling the engines that it is cheaper to employ people to do the job.
 What is the effect on the human beings involved? If the car plant is the only major employer in the
region, and the introduction will put much of the workforce out of work, then the employer may decide
that the human cost is too great, certainly the Government would.
 Is the workforce skilled enough? It will be necessary to employ highly skilled technicians to look after
the robots. If there are no workers with the necessary skills then the computerisation is not feasible.
 What effect will there be on the customer? If the customer is likely to be impressed with the introduction
of the new systems then it may be worth the expense, however, if the customer will notice no difference,
what is the point?
 Will the introduction of the new systems be economically beneficial? Put bluntly, will the introduction
of robots increase the profits made by the firm?

If the feasibility study shows a positive result, which is accepted by the company, the next stage will be for
the analyst to collect as much information about the process as possible.

1.7.d Information Requirements of a System and Fact Finding


When a computer system is being designed it is necessary to ensure that the designer of the system finds out
as much as possible about the requirements of the system. We have already mentioned the importance of
defining the problem but further difficulties can arise. Imagine an organisation that commissions an analyst
to design a new payroll program. The analyst and the boss of the organisation agree that the software needs
to be able to communicate with the relevant banks, and to deduct tax at source and other important details.
The analyst designs the solution and the software is written. It is the best payroll program ever produced and
is installed into the computer system ready to do the first monthly payroll. Unfortunately, many of the
workforce are employed on a weekly basis. A simple question to one of those paid in this way would have
highlighted this for the analyst and meant that the costly mistake was avoided. When a system’s
requirements are being studied there is no room for errors caused by lack of information.

The feasibility study has been accepted so the analyst now needs to collect as much information as possible.
Obvious methods of collecting information are to ask different types of people. It may not be feasible to ask
everyone in the organisation for their views, but a representative sample of workers, management, customers
should be given the chance to supply information. After all, the part time worker on the production line
probably knows more about the business than the analyst. There are three accepted methods of finding out
people’s views:
1. By interview. Interviews are particularly important because they allow the interviewee to talk at
length, and also to leave a prepared script. However, they are very time consuming and consequently
restricting in the number of people whose views can be sought.
2. By using questionnaires. Questionnaires make it possible to find out the views of a large number of
people very quickly, but because the questions are pre-determined the person who is supplying the
answers may find difficulty in putting their point of view across.
3. A compromise is to hold a group meeting. This allows a number of people to discuss points and
make their views known and yet cuts down on the amount of time spent in interviews getting the

Page No. 71 of 160


same answers over and over again. The problem with meetings is that one or two people tend to
dominate, not allowing all the members of the group to give their opinions.

Often the views of the people connected with the problem are clouded by years of familiarity, so it is
important for the analyst to also gain first hand knowledge of any existing systems. One way to do this is to
observe the current system in action. Care must be taken to take into account the fact that if the workers
know that they are being observed it is unlikely that they will behave in their normal manner. This is the
same effect as a television camera has on otherwise fairly sensible individuals. The second method is to
collect printed documentation and study it in order to find out what data is required by the system and what
form information is output.

1.7.e Requirements Specifications


The planning of any system design must start by deciding what the requirements are of the system. A system
may need to store data for future reference or processing. However, simply being aware that the system may
need to store data is not enough.
 Decisions need to be made about the types of data to be held as this will dictate the form that the data
will be stored in and the amount of storage space required for each set of information.
 Calculations as to the number of sets of data that are going to be held have to be made because the
volume of storage will make some storage devices more sensible than others. Also, the volume of
storage can effect the structures that will be used to store the data.
 Decisions need to be made about the relative importance of the different ways of accessing the data. Is it
going to be necessary to access individual items of data or will all the data be accessed at the same time?
 Will the data be changed regularly or is it fairly static?

When decisions are made as to the direction that a particular system is going to take, it is normal to produce
a list of tasks that need to be carried out to complete the system. These tasks should be in a specific order. It
would not make sense to consider inputting data into the system before designing the data structure into
which the data is to be put. This list is called a priority list and it forms the basis of the system design. Each
of the tasks that are in the list should then be considered separately to decide the important points about each
one. An example would be that the file of information on stock being held in a business must allow
 for 1000 items (immediately putting a lower limit on the size of appropriate storage)
 for direct searching for information on a single item (means that some storage media are not suitable,
and that some data structures cannot be used)
 another file, of manufacturers, to be accessed from each record in the stock file to facilitate reordering
(forces one field to act as a link between the two files).

Plenty of other facts must be considered and decisions made, but a set of constraints has already been placed
on the design. This is known as the design specification and it should be agreed between the analyst and the
organisation before the design is implemented.

Often, the inputs and outputs to a system and the storage and processing that goes on in the system is such
that, in order to understand it, the system needs to be divided up into a number of interconnected sections, or
modules, each one being simple enough to be handled as an entity. A diagram can be drawn which shows all
the sections and how they fit together. Such a diagram is called a Jackson diagram.

Jackson diagrams:
A Jackson diagram starts with the original problem as the highest level. The next, and subsequent, levels
show how the problems in the previous levels are split up to form smaller, more manageable, problems. This
continues until each of the blocks in the lowest levels are self contained, easily solvable problems. These
individual problems can then be solved and combined according to the links that have been used. If the links
between the different blocks are then used correctly, the result will be a solution to the original problem.
Imagine a Jackson diagram as a method for showing the individual modules that go to make up a solution to
a problem and the relationships between them.

Page No. 72 of 160


Original Problem
Links

Individual modules

Final level

The links between the modules can be conditional. For example if the result of a module was a mark out of
100, then there could be two possible print routines, one for failure if the mark was below a certain level,
and one for pass if it was above the pass mark.

An example of a Jackson diagram to show the solution to a simple problem.


A register is taken of the 25 students in a class. Each student can be either present or absent. It is necessary
to print out the number of students who are present and the number absent.

Regist
er

Initialise While count <25 ** Outp


ut
repeat
Count = 0 Input Present or Output
Cpresent = absent Cpresent
0 Cabsent
Cabsent=0
Increment Increment
C present C absent

Data flow diagrams:


These are diagrams that are used to describe systems. Boxes are used to stand for input, processes, storage,
and output. Arrows show the direction of communication around the system, and communications outside
the system. As the name implies, these diagrams are used to show the directions of flow of data from one
part of a system to another. Data flow diagrams can have complex shapes for the boxes that are used, but the
important thing is not the shapes of the boxes, rather the logical train of thought that has been used to
produce the diagram. Rectangular boxes, though not always used, are perfectly acceptable for all elements in
a data flow diagram. Such diagrams are intended to show how the processes and the data interrelate, not the
details of any of the programming logic.

Note: A Systems Flowchart is another name for a data flow diagram.


Students are expected to be able to follow the logic in a data flow diagram and, indeed, produce their own,
but not under examination conditions because the drawing of such a diagram would take too much of the
time allowed for the exam.

At this stage the analyst will also identify the hardware that will be necessary for the system to operate as the
user requires, and the software characteristics that will need to be satisfied for the system to operate.

Page No. 73 of 160


Design of Input, Output, and Data Structures
Input Design
All systems require input. The way that the data is input to the system depends on a number of factors.
 The data that is required. Is it graphical/textual/physical in nature? Is the data already in existence or
does it need to be collected first?
 The hardware that is available. Is the data to be entered via a keyboard by an operator, or is there an
automatic way to enter the data?
 The experience of the operator.
 The design of the user interface.

This section relates back to section 1.2.c which covered the different forms of software interface. The main
task in input design is to design the interface with the outside world so that data can be passed to the system,
both software and hardware.

Diagrammatic depiction of the system processing is covered in section 1.7.e, above. It is not necessary to go
into great detail about such diagrams, but students should be aware that they exist.

Output Design.
The results that are produced by the system must be presented in a way that is appropriate for the
application. If the system is designed to produce bank statements for customers, then it would not be
sensible to have an audio output. Similarly, a burglar alarm system would not serve the purpose for which it
had been designed if the output is a message on a computer screen saying that someone has broken in as
there is probably no-one in the house to read it, which is why the alarm was needed in the first place.
The decision about the type of output will depend greatly upon the same factors as the input, namely, the
hardware available, the form that the output needs to be in, the experience of the operator, indeed, whether
there will be an operator present.
Equally important to giving enough information, is the danger of providing too much. In order for users to
be able to understand the information presented various tricks can be used.
 Information can be arranged on a monitor screen by always putting the same sort of information in the
same place. The operator will then quickly become accustomed to the relative importance of different
areas of the screen.
 Information can be colour coded. Important information may appear in red while that which is less
important is in black. Notice that this implies some form of decision making on the part of the processor
to determine what is important in the first place. It is also necessary to be very careful about choice of
colours. People who are colour blind commonly find difficulty distinguishing between red and green, so
choosing these colours to stand for information that is dangerously near a limit or at a safe level, could
be disastrously wrong. Similarly, colour combinations have to be chosen carefully. Blue writing on a
black background is almost impossible to see, as is yellow writing in some lighting conditions.
 Video reversal can be used to highlight a particular piece of information effectively. This is when the
normal writing on the screen is black on a white background, but the piece that needs to stand out is
shown as white on a black background.
 Very important pieces of information may be shown as a dialogue box obscuring the rest of the screen
until it is dealt with.
 A printer may be reserved for special messages so that a hard copy of the information is preserved.
Again, the fact that the information appears on that printer means that it has a particular importance.
 Information can be made to flash, or can be printed in a different size, anything that makes the operator’s
eye go to that part of the screen.

Data structure design.


The data used in a computer solution will need to be stored somewhere. The storage is not that important.
What is important is getting it back again when it is needed. In section 1.4, the data structures array, queue,
stack, linked list, were described. When the solution is designed it is necessary to decide how access to the
data will be handled and to choose an appropriate data structure. Questions on this part of the syllabus will
tend to ask for the sort of choices that need to be made rather than any complex analysis of fitting a data
Page No. 74 of 160
structure to a given situation, though simple examples like modeling a queue at a check out till may be
asked.

1.7.f System Evaluation


Any system must match certain criteria if it is to be considered successful. This does not only apply to a
computer system but any system. For example, a car must satisfy various criteria before being able to be
called a car
 it must move under its own power
 it must be possible to steer it
 it must have 3 or 4 wheels
 it must have seats.
There would be many other facts, which would have to be true before most of us would recognise that this
system is a car. However, some assumptions have been made in just the four criteria mentioned here. A toy,
radio controlled, car fits all these criteria, but it was not the sort of system that we had in mind when
designing the criteria. Perhaps the second bullet point should have specified that it has to be controlled from
within the car itself, or should there be a new criteria that gives a minimum size for the vehicle. When
systems are being designed, this list of criteria, that the finished system must match, is of paramount
importance. It must also be agreed between the designer of the system and the commissioner of the design,
so that there will be no unfortunate misunderstandings. We can imagine a situation where the Ford motor
company commission a new car design, only to find that it is 30 cms long when delivered.
Note that these criteria are decided before the system is created. They are used to decide how well the
system works. In other words, does it do what it is meant to? This question can only be answered if it is
known what the system was meant to do in the first place.

1.7.g Documentation
The documentation of a system consists of all the text and graphics that explain how the system was
produced, how it should be used, and how it can be maintained. Documentation is created at different stages
in the life of a system and for different people to use. Some of the different types of documentation are met
in this section and others will be encountered later in the course. Indeed, much of the project work that is
done in module 4 consists of producing the documentation for a problem solution.

Requirements specification
This is a list of the requirements of the customer for whom the system is being designed. It consists, largely,
of the criteria that will be used for the evaluation of the finished system that were discussed in section 1.7.f.
It is usual for the system analyst and the customer to sign the list of requirements so that there is no
confusion when the work is finished.

Design specification
Taking the requirements specification and working out the stages necessary to produce the required end
product is known as the design specification. This will include the different stages, often shown in
diagrammatic form as mentioned earlier in this chapter, and also the criteria for each stage of the solution.
For example, one part of a solution may be the production of a file of data. The ways that this file of data
relates to the other parts of the system, and the specification of the file (what is the key field? How many
records will there be? What type of medium should it be stored on?) make up the design specification.

Program specifications
These will include detailed algorithms showing the method of solution for some of the parts of the problem.
These algorithms may well be in the form of flow diagrams or pseudo code. The language to be used, the
data structures necessary, and details of any library routines to be used will also be in the program
specification.

Page No. 75 of 160


Technical documentation
The technical documentation will include the program specifications, the coded program itself, details of
hardware configurations. Generally, anything that will aid a technician in maintaining or updating a system.
Indeed, technical documentation is otherwise known as maintenance documentation. This type of
documentation is not intended to be accessible to the user of the system, who does not need any of these
details to be able to use the system correctly.

User documentation
This is the documentation for the person who will actually be using the system. It contains those details that
are needed to make the system operate as it should. Items normally included in the user documentation will
be
 examples of output screens
 examples of valid input
 methods of input of data
 error messages and what to do when they appear
 How to install the system onto specific hardware
Some user documentation is part of the software and can be called up onto the screen when it is needed. This
type of documentation is called on-screen help.

1.7.h Testing and Implementation Planning


Any system needs to be tested to ensure that it works. This seems to be a fairly obvious statement, but in
reality such testing is impossible in all but the simplest of systems because it simply is not possible to test
every conceivable input to, or logical construction in, the system. This difficulty means that testing that is to
be done must be carefully planned and that it should relate directly to the criteria referred to earlier in this
chapter. Specific types of testing have already been covered in 1.3.g.

When the system has been completed it has to be implemented so that it is performing the tasks for which it
was designed. Initially, this involves
 ensuring that the correct hardware is available
 arranging for staff to be trained in the use of the new system
 inputting the data to the data files, either manually or by downloading them from the original system.
The system handover, itself can be done in a number of ways:
 Parallel running. Until the system can be considered fault free, the old and new systems are run side by
side, both doing the same processing. This allows results to be compared to ensure that there is no
problem with the new system. Such a system is ‘safe’ and also allows staff training to be carried out, but
it is obviously very expensive because of the need to do everything twice. Parallel running is used in
situations where the data is so valuable that there must be no possibility of failure.
 Pilot running. Key parts of the new system are run alongside the old system until it is considered that
they have been fully tested. This is a compromise with the idea of parallel running, but it does not give a
clear idea of the effects on the system of the large amounts of data that are going to be encountered in
the full application.
 Big bang, or direct change. The old system is removed and the new system replaces it completely and
immediately.
 Phasing. Parts of a system are replaced while the remaining parts are covered by the old system. This
allows for some testing of the new system to be done, and for staff training to take place, but also allows
for a back-up position if the new version does not work as anticipated.

This topic is not fully expounded upon here, the candidate simply needing to understand that there are
different methods of implementation and be able to outline some of the methods along the lines shown here.
This topic will reappear for a fuller treatment in section 3.8.e.

Page No. 76 of 160


1.7.i System Maintenance and the Software Life Span
Systems may be designed for a well-defined purpose and may realise that purpose, hence they would be
considered successful. However, the original reasons for a particular system to be created may change, the
hardware may alter, the law governing a system may change. For many reasons the original system may no
longer be satisfactory. One solution would be to produce a totally new system, another would be to adapt the
present one so that it can be used in the new circumstances. This situation is reviewing the system and is the
main reason for technical documentation.

While the system is running it will need attention because of faults being discovered, this again needs a
technician with a set of maintenance documentation.

Computing and computer applications is a subject that changes so regularly through improvements in
technology, new ideas, different legal frameworks trying to keep pace, that, in reality, a system should never
be considered to be finished. Rather than being a linear process with a beginning, a middle and an end, it
should be thought of as a circular process, continually returning to previous stages to fine tune them and take
advantage of changing circumstances.

Page No. 77 of 160


1.8: Choosing Applications Software

1.8.a Custom Written and Off-the-Shelf Software


1.8.b Features of Common Applications
1.8.c Generic Applications Software
1.8.d Applications for which Common Packages are not Appropriate
1.8.e Purpose and Impact of Generic Software

Example Questions

Previous Menu

Page No. 78 of 160


Chapter 1.8 Choosing Applications Software

1.8.a Custom Written and Off-the-Shelf Software.


When the analyst has analysed the problem and come to a conclusion about how it can be solved, a decision
has to be made about the software that should be used.

There are many pieces of software that have already been written and are immediately available to buy. This
type of software is called ‘off-the-shelf’ software because you can literally go into a computer shop and pick
a copy off the shelf. There are a number of advantages in buying an off-the-shelf package:
 The software has already been written and so is immediately available rather than having to wait,
sometimes a considerable time, for it to be written.
 The software will be used by many people or organisations, therefore they share the development costs
rather than one having to foot the whole bill. This implies that the software will be considerably cheaper.
 Copies of the software have been in use for some time and will have been in use by a variety of users.
This means that any bugs in the software should have been found and rectified; consequently it can be
expected to work.
 If it comes as part of a suite of software it can be relied upon to be compatible with other applications,
allowing, for example, the import of data.
 Because the software will be in general use there are likely to be well-established training courses for the
staff to be sent on to learn about the software.

A Custom package is one that has been specially written to solve a specific problem. Perhaps there is no
freely available piece of software that will satisfy the needs of the company, A piece of custom software
should mean that the organisation gets a piece of software that will do all the things that it requires doing,
and, equally importantly, does not contain extra routines that will never be used.

1.8.b Features of Common Applications


Stock control.
As the name implies, stock control systems are used to keep track of the stock being held by an organisation.
There are typically three areas that need to be handled by a stock control program. The first is to keep details
of the individual items that the organisation holds in its stock. These details will differ dependent on the item
being held and the information about it that the organisation decides is important. A consignment of towels
in the stock of a shop will need to have the colour of the towels stored, whereas the information stored about
bulldozers stored by a plant hire firm would not include colour as it is irrelevant to their function. What
would be included would be the horse power of the machines, which obviously does not apply to the towels.
The second is to store information related to the product though not directly about the product itself.
Examples would be storing details of the supplier, or where the goods are being stored in the
shop/warehouse. The third is to do with the use of the goods. Who has hired the bulldozer out? Where is it?
When is it due back? What sort of condition was it in when it was hired out?
Stock control systems are all to do with keeping track of stock, recording stock levels and the condition of
the stock and keeping track of where it is going.

Order processing.
Many stock control systems are charged with the need to record the number or amount of the goods that are
in stock. If the quantity in stock falls below a pre-determined limit then the system should automatically
institute a reordering process. This would be done by using the details of the supplier and possibly including
the human management in the process to allow for variations caused by season/fashion/.. Copies of the
orders would be sent to the accounts department so that when the invoice for the goods comes in it can be
matched up with the order. When the goods are delivered, the ordering system is informed so that the live
order can be shown to have been fulfilled, and the accounts department are told that the order has arrived
and that clearance has been given for payment to take place.
If the organisation is the one that is filling the order then the operation is similar, but in reverse.

Page No. 79 of 160


Payroll.
The payroll is a perfect example of a batch process. All the records need to be processed during the same run
because all the workers need to be paid. Each record undergoes the same type of processing, working out the
number of hours worked, multiplying by the hourly rate and then doing the tax calculations. The process
requires no human intervention during the processing.

The traditional picture of the payroll application is that the master file of workers is held on a tape, as is the
transaction file that holds the workers’ details for that week. The two are arranged in the same order and
then run together and the results stored on a new master file, again held on a tape. This gives rise to the
ancestral filing system form of backing up of files which was introduced in section 1.4. In this system, the
old files are kept so that if the new versions are corrupted they can be reproduced using the old master and
transaction files. Nowadays, the file is likely to be held on a disk with an index to allow fast access to
individual records, this would imply that the records are overwritten and that there is no new version of the
master file created.

Process control.
As the name implies, this is the use of a computer to automatically control a process. The computer receives
information about the process from sensors which allow it to make decisions. The results of these decisions
are actions that are carried out. The next set of input from the sensors not only tells the system about the
current state of the process but also allows the computer to compare with the last set of inputs to decide
whether the actions that it took last time had any impact. This process is known as feedback.

Point of Sale systems.


A computer used at a point of sale needs to carry out three actions. The first is to identify the goods being
bought, the second is to carry out whatever processing is required and to produce a satisfactory output, and
finally to arrange for payment.

The identification of the goods can be done in a number of ways, but the standard method is to read a code
from a barcode. This code is then validated (see chapter 1.9) and then sent to the processor. The processor
uses this barcode as the key field when searching the product file. When the record is found the contents of
the record are used to produce a printout for the customer (till receipt), and to accumulate the total value of
all the goods that have been bought. Finally, the payment can be made electronically by sending details of
the customer account to the bank or credit card company from where payment will be made to the store
immediately.

Marketing.
When a product or service is developed it is important to make the potential customers aware of it.
Marketing is the term given to this process. In computer terms it would include the use of systems to
produce advertising literature, the promotion of the product on the world wide web and the use of
techniques such as direct mailing by using purchased files of people who may reasonably be expected to
have some interest and then mail merging to produce ‘junk mail’.

Computer Aided Design (CAD).


This is simply the use of a computer system to design a commodity. It may be a house, or a carburetor to fit
a particular engine, or it may be a new traffic flow system around a town. The software can be used to do
calculations, will the roof be well enough supported by walls made from that particular product? It can be
used to make decisions about the manufacture, will the robot tool be able to maneuver into a position to be
able to screw the two halves together. It can be used to cost a solution, having decided on the design of the
carburetor the prices of the individual components can be used along with the known costs of production to
calculate the cost of each unit. It can be used to make predictions, what will happen if this street is made one
way?

Page No. 80 of 160


Computer Aided Manufacture (CAM).
CAM is the use of a computer to help with the manufacturing process. If the two principles of CAD and
CAM are combined then it should be possible to produce a seamless process whereby the computer
produces the design which is electronically sent to another system where the design is produced by a
computer controlled robot.

1.8.c Generic Applications Software.


There is nothing frightening about this section. The intention is simply that students should be able to
suggest sensible software for given applications. The software automatically divides itself into specific uses.
The student should be able to isolate the important characteristics of an application from the description and
then decide which of the generic software best fits the application characteristics.

Word processing.
Used for applications that have the need to communicate with others using text. Writing letters, mail
merging, preparing text documents for use in other software packages, are all typical uses of a word
processing package.

Spreadsheets.
Spreadsheets are a type of software that allows data to be stored. If this were all that a spreadsheet was to do
then there would be other, more satisfactory types of software available. A spreadsheet is particularly useful
because it can store different types of data, including numerical data, and that it can perform calculations on
the areas (cells) where the numerical data is being stored. Spreadsheets should be considered for any
example where data is stored and calculations need to be carried out on it. Examples would be profit and
loss accounts, budgeting, payrolls (although other, more specialised, payroll software would be used in a
large scale application), indeed any example that requires the manipulation of figures to give accurate results
or forecasts or predictions.

Desktop publishing (DTP).


This type of software is characterised by the ability to produce a page of printed output that has been
designed by using advanced layout techniques. The page may well contain text, graphics, tables and many
other types of output each one of which may be better produced using a word processor or a drawing
package or a spreadsheet. The value of the DTP is that it contains powerful tools for arranging these
individual items on the page, the printout of which can be used directly as the starting point for a printing
process. Typically DTP software is used for the production of leaflets, posters, proof copies of books and
magazines. Many word processors now have features which previously would only have been found in a
DTP, for instance the ability to produce text in columns or to surround graphics with text, and the distinction
between a DTP package and a word processor has become less clear cut.

Presentation software.
The growth of the use of presentation software has followed the development of portable computer systems.
If a salesman is to do a presentation to a group of people it is now possible for him to take a computer to the
meeting with a previously prepared presentation on it. The software allows for the preparation of a show
which typically follows a storyboard of individual screens. The software allows morphing from one screen
to another and also allows animation and full use of text and graphics within individual screens. If required,
a soundtrack can be added to complement the pictures being shown. Ideally, such a presentation should be
output via some device that would be designed for the audience expected to be watching. This would mean
that a single monitor would be fine for some automated display in a department store, but would require
something more akin to a projection screen for a larger audience. This could be accomplished using an over
head projector linked to the computer or an RGB projector.

Drawing packages.
This is a package that produces graphics output. Often such output is exported to a DTP for inclusion in
some publication, or to a piece of presentation software for inclusion in a display sequence. Another use for
such output is to enliven a page on the world wide web. There are many different forms of graphics package
Page No. 81 of 160
split into groups dependent on the way that the graphic is produced. The two most common are bitmap
graphics where each pixel is treated separately, and vector graphics where the lines on the drawing are
created mathematically. Different software packages create the graphics in different ways for instance
Paintbrush creates pictures in bitmap form while Draw uses vectors. The simple way of describing the
difference is in sizing the drawing. If a drawing held as a bitmap is increased in size then each of the pixels
is increased in size and hence becomes more obvious. If a drawing stored using vector graphics is increased
in size the only thing that changes is the mathematical formulae for producing the lines, which will produce
a picture of comparable quality whatever the size.

1.8.d Applications for which Common Packages are not appropriate


Common applications packages are those that have been designed to satisfy particular needs that are
common to a number of different applications. There are many other examples where computers are
necessary but where the use is so specialised that the software will need to be written (or at least tailored) for
that particular use. Uses that would require such specialist software are legion, but would include many uses
of control software. Robots used on production lines tend to be one-off machines, designed for that
particular purpose, consequently, the software that would drive them would, similarly, be one-off. A stock
control system in a warehouse would have standard modules, but would have other sections which would be
for that warehousing system alone. The important consideration is how different from the standard design is
the system for which we want the software, the further away from the standard, the more difficult it is to use
standard software, and the more likelihood there is that the system will require software written specially for
it.

1.8.e Purpose and Impact of Generic Software.


The purposes of the different types of generic software were covered in section 1.8.c.
The impact of the different types of software have been profound.

Word processing.
Expectations have changed markedly since the days of the typewriter, which can be thought of as the direct
precursor of the word processor. Letters or other documents are perceived to be unacceptable if they contain
an error. If an error is spotted then it is corrected and the document is reprinted. The advent of electronic
machines was heralded as the start of the paperless office, whereas the facts are that the amount of paper
consumed in office applications has multiplied enormously. The use of computers running word processing
programs was greeted with fear by most type writer operators for two reasons. The first was because of the
fear of unemployment. The logic went along the lines of: Each operator will be able to work much faster and
hence produce more output, therefore some of the operators can be made redundant. While this happened a
little, the truth was far from this, and there are now more computer operators than there ever were typists.
The second fear was that in order to use one of the new machines typists would have to undergo
considerable training. While this was true to some extent, and there were some typists who, largely through
being older found great difficulty in changing their old practices, most had little problem and even learned
new skills making them better qualified, giving more job satisfaction and the capacity for higher paid jobs.

Spreadsheets.
A spreadsheet is essentially an area which can be split up into rows and columns forming ‘cells’, in which
data can be placed. In its simplest form then, a spreadsheet is simply a data storage system. However,
spreadsheets begin to take on added significance when formulae are applied to the numeric data in the sheet
to make calculations, particularly calculations that make predictions about what would happen if some value
were to be changed. Spreadsheets can also be expected to have presentation tools like graphing packages in
order to produce the results in easily understandable form. The addition of a language so that algorithms can
be programmed makes a spreadsheet a very powerful software tool which goes beyond simply juggling with
figures necessary for doing a payroll or keeping the accounts and makes it possible to model situations in
mathematics and the physical sciences.

Page No. 82 of 160


Desk Top Publisher (DTP).
Strictly speaking a DTP combines elements of software and output devices so that published quality material
can be produced from a desk top computer system. In order to do this the output device needs to be top
quality otherwise the other parts of the system are let down, and the software needs to enable the user to
combine graphics images and textual images and manipulate them around the page before being printed out.
This system compares with the system that used to be in operation of creating the page physically from cold
type and attaching the page to a commercial printer before printing out multiple copies. Commercial printing
presses are now electronically set up meaning that the publication and the press can all be controlled from a
single micro computer. In the 1970’s there were fewer than 200 magazine periodicals available in Britain
because of the difficulty of setting up a new publication and the cost which could only be recuperated if
there were sufficient sales of the magazine. The cost of producing a magazine has fallen so much that a
small circulation title will still make a profit, and the production is very simple, often a one person job. This
has led to there being many thousands of titles now available, although it has, perhaps, done little for the
quality of such titles.

Presentation Software.
Presentation software allows someone to prepare a series of inter related slides to accompany a talk that is
being given, or even to be a stand alone system. Each slide has animations, colour and colour change, the
ability to morph into the next slide and many other features. When such software was first available those
who used it produced presentations that were out of the ordinary and consequently it was seen as something
to aspire to because of the novelty factor being able to hold the attention of an audience. However, as the use
of such presentations became more common, it became necessary to use more and more complex techniques
to maintain the novelty factor. This leads to presentations becoming overloaded with tricks in order to make
an impact. This distracts from the message that is being attempted to be put across to the audience. There is
no doubt that presentation software can be used to make a message more accessible to the audience, but it is
also true that no amount of clever gimmickry can hide a poor message.

Drawing Packages.
Drawing packages are, strictly speaking, software that allows the creation of graphics using vector graphics
as opposed to painting packages that use bitmaps. However, in this context the syllabus is referring to the
concept of the user being able to create graphics which can then be imported into other software packages to
enhance the work that is being done. No longer does the school worksheet need to be a simple text
document, but diagrams, pictures, even photographs can be included.

Page No. 83 of 160


Example Questions.

Q 1. Discuss the reasons that a solicitors’ practice would have for choosing off-the –shelf software
rather than custom written software if it was decided to change the word processor currently
being used because it was perceived to be out of date. [4]

A. The office manager would be keen to go ahead with the purchase as soon as possible because all the
decision making would have been done and the need has already been established. When making the
decision to change, current packages available would have been evaluated so there is probably some
confidence in what is available. The office is likely to be a relatively small operation with few users,
hence the relative costs of buying custom software compared to off-the-shelf software would be very
high as would the costs of the staff training.

Notes: The difficult question first in this section. A question which starts with ‘Discuss’ is expecting
a certain amount of analysis of the situation, not just hard facts. Also expected is a linking of the
question to the scenario given. Notice that there is an indication in the number of marks for the
question of the degree of depth of the answer. There were plenty of other points that could have been
made in answer to this question but plenty have already been stated to get the four marks, and four
marks means four minutes to answer the question and with reading and thinking time I’ve certainly
used that up.

Q 2. In the same scenario, State two reasons why custom made software might be more appropriate
than off-the-shelf software. [2]

A. -This application may need more specialised routines than are available in off-the –shelf software
-Many of the routines in the off-the-shelf software will not be relevant

Notes: A far simpler question than the first one. It simply needs two statements of fact, the standard
answers in the text, with no need to describe or explain, though notice that there is some relating to
the scenario.

Q 3. Describe how CAD/CAM can be used to produce prototype designs in a manufacturing


process. [4]

A. -CAD is used to design the item


-The software can be used to carry out tests on the finished design
-Completed designs sent electronically to CAM software
-which controls robot machinery to produce the item.
Notes: Standard answers are all that will be expected from questions about the standard software
packages. The facts that are produced in the text will be more than adequate for the needs of the
examination.

Q 4. A firm produces widgets for sale to the brewing industry.


A brewing company may come to the firm with a proposal for a widget to fit a particular
container, which will need to be produced by the firm which will then ship the finished product
in batches and invoice the brewing company. Sometimes the sales team will be sent to try to
persuade the brewing firm of the advantages of the company’s widgets.
Explain how the company can use commonly available software in the running of its business.
[6]
A. -CAD can be used to design the widget
-CAM can be used to produce prototype/help set up production line
-Spreadsheets can be used to keep track of the firm’s accounts
-Stock control software can be used to control the stock being stored in the warehouse
-Order processing software can be used to keep track of new orders when they arrive
Page No. 84 of 160
-Payroll software can be used for paying the workforce
-Presentation software can be used by the salesman to impress the brewery firm.
Notes: It is possible to make almost any software fit the given scenario when it is that wide in scope.
The important thing is not to be able to pick particular pieces of software but to give a reasonable
explanation of why that software would be used in the given situation.

Page No. 85 of 160


1.9: Handling of Data in Information Systems
1.9.a Manual and Automatic methods of Data Entry
1.9.b Methods of Image Capture
1.9.c Validation and Varification
1.9.d Output Formats
1.9.e utput According to Target Audience

Example Questions

Previous Menu

Page No. 86 of 160


Chapter 1.9 Handling of Data in Information Systems

1.9.a Manual and Automatic methods of Data Entry


All computer systems need to have data input to them otherwise they have nothing to process. The methods
of collecting the data can be divided into two types: automatic and manual data collection.

Automatic Data Collection.


The most obvious type of automatic data collection is in a control system where the computer collects its
view of the outside world from sensors that give information about the physical environment. The data
collection done by a sensor is continuous, but the reading of the data is within a fixed time period (the
processor does not want to know the temperature in the room all the time, but perhaps every 5 minutes. This
gives the previous decision long enough to have had some effect.) The use of only some of the available data
is known as sampling. Many sensors that measure physical values are analogue sensors while the data
required by the processor needs to be digital. Analogue data is physical data that creates a signal which
consists of continuously changing voltage (for example, a thermistor increases the voltage output as the
temperature which it is measuring increases.) This signal must be changed into the stream of 0s and 1s that
the computer can recognise. This is done by an analogue to digital converter. When data is collected off line,
often by sensors in remote locations, and then stored until ready for input to the system at a time that is
convenient to the system, it is known as data logging. A typical data logger will be in the form of a tape
recorder, on which the data is stored until a set of data has been collected and the data can be entered into
the system in one go. Obviously, this would not be suitable data input for a system which was controlling
the central heating in a house, but a remote weather station on a mountain top where different readings are
taken every 10 minutes and then radioed back to the weather centre once every 24 hours would need just
such a device to store the data until it was required.

Less obvious forms of automatic data collection are barcodes in a supermarket. The code is translated into a
series of dark coloured bars on a light background so that the data can be input to the machine without any
further preparation.

Automatic data collection can be considered to be any data collection that does the two stages of data
collection and data input to the system without going through the intermediate phase of data preparation to
make it suitable for computer use. Another good example is the school register which is taken by making
marks on a sheet of paper and that can then be read directly into the computer with no human intervention
by an optical mark reader (OMR). An OMR reads information by translating the position of the mark on the
paper into a meaning, so that two marks side by side on the paper mean different things because of where
they are rather than what they look like.

Other forms of automatically entering data are by voice recognition, which is rather unreliable, but is an
attempt by the computer to understand human communication, and by the use of magnetic stripes. These are
seen on the back of credit cards and bank cards. The stripe contains information about the owner of the card
in a form that the computer can use directly. Another form of data input used by banks is the magnetic ink
characters that are printed on the bottom of cheques before being sent to the account holder. The magnetic
ink is particularly easy for the computer to read and contains enough information to identify the bank and
the account at that bank. All of this can be done with no further human intervention after the original
printing of the cheque book. However, the data that is written on the cheque by the customer (who it is made
out to and for how much) is not ready for input and hence requires some human intervention to make it
useable.

Manual data entry.


The most obvious is the form that has been designed to collect data, which needs to be input to the
computer. An operator reads the data on the form and then types it into the computer via a keyboard. An
extra stage has been added here, the data has had to be typed in, in other words the original data was not in a
form acceptable to the computer. Computer systems are available that will read individual characters and

Page No. 87 of 160


input them without the data having to be transcribed, this would count as automatic data collection (it is
known as optical character reading (OCR)).

Questions on this part of the syllabus will be suggesting suitable input methods for particular situations, and
offering advantages and disadvantages for particular forms of data input in different situations.

1.9.b Methods of Image Capture


Scanner:
A scanner is a device that shines a strong light at a source document and then reads the intensity of the
reflected light. The surface of the document is divided into small rectangles, or pixels, and the light intensity
is measured of each pixel, it is then reported to the computer as a bit map. Scanners can be of different sizes,
typical is an A4 sized flat bed scanner where the document is placed on a sheet of glass which is then
scanned line by line, or a hand held scanner which can be rolled across the image a number of times
collecting a band each time, these bands of image can then be matched up by the software to produce the
complete document.

Video capture card.


A video picture is made up of a series of images which are changed approximately 26 times per second in
order to fool the brain into thinking that the images are moving. A video capture card is an interface board
which fits into one of the expansion slots in a processor that allows the processor to store the values of the
screen pixels for a specific picture. In other words it allows the action to be frozen. A typical example of the
use of a video capture card is the market stall that uses a video camera to take an image of a customer and
then to select one image to print onto the T shirt.

Digital camera.
Works in a similar way to an optical camera but does not store the image on film. Instead, the image is
stored electronically enabling the user to download it into a computer and manipulate the image and print
out the images if desired.

Each of these image capture systems results in an electronic image being stored in the computer system.
Image manipulation software can then be used to alter or edit the image in any way that is required. While
this allows the user to use their imagination and to tidy up pictures or crop them to miss out unwanted parts
of the image, it also allows unscrupulous people to produce pictures with very little foundation in reality. It
used to be said that: “The camera never lies”, this is certainly no longer true, witness the film Forrest Gump.

1.9.c Validation and Verification


When data is input to a computer system it is only valuable data if it is correct. If the data is in error in any
way then no amount of care in the programming will make up for the erroneous data and the results
produced can be expected to be unreliable. There are three types of error that can occur with the data on
entry. The first is that the data, while reasonable, is wrong. If your birthday is written down on a data capture
form as 18th of November 1983, it will (except in very rare cases) be wrong. It can be typed into the
computer with the utmost care as 181183, it can be checked by the computer to make sure that is a sensible
date, and will then be accepted as your date of birth despite the fact that it is wrong. There is no reason for
the computer to imagine that it may be wrong, quite simply when you filled out the original form you made
a mistake. The second type of error is when the operator typing in the data hits the wrong key and types in
181193, or the equivalent. In this case an error has been made that should be able to be spotted if a suitable
check is made on the input. This type of data checking is called a verification check. The third type of error
is when something is typed in which simply is not sensible. If the computer knows that there are only 12
months in a year then it will know that 181383 must be wrong because it is not sensible to be born in the
thirteenth month. Checks on the sensibility of the data are called validation checks.

Page No. 88 of 160


Faulty data.
There is very little that can be done about faulty data except to let the owner of the data check it visually on
a regular basis. The personal information kept on the school administration system about you and your
family may well be printed off at regular intervals so that your parents can check to ensure that the stored
information is still correct.

Verification.
Verification means checking the input data with the original data to make sure that there have been no
transcription errors. The standard way to do this is to input the data twice to the computer system. The
computer then checks the two sets of data (which should be the same) and if there is a difference between
the two sets of data the computer knows that one of the inputs is wrong. It won’t know which one is wrong
but it can now ask the operator to check that particular input.

Validation.
The first thing is to dispel a common misinterpretation of validation. In section 1.6.f checking of data was
mentioned. Specifically, the use of parity bits to check data. This is NOT validation. Parity bits and echoing
back are techniques that are used to check that data has been transmitted properly within a computer system
(e.g. from the disk drive to the processor), validation checks are used to check the input of data to the system
in the first place.

Validation is a check on DATA INPUT to the system by comparing the data input with a set of rules that the
computer has been told the data must follow. If the data does not match up with the rules then there must be
an error. There are many different types of validation check that can be used to check input in different
applications.

1. Range check. A mathematics exam is out of 100. A simple validation rule that the computer can
apply to any data that is input is that the mark must be between 0 and 100 inclusive. Consequently, a
mark of 101 would be rejected by this check as being outside the acceptable range.

2. Character check. A person’s name will consist of letters of the alphabet and sometimes a hyphen or
apostrophe. This rule can be applied to input of a person’s name so that dav2d will immediately be
rejected as unacceptable.

3. Format check. A particular application is set up to accept a national insurance number. Each person
has a unique national insurance number, but they all have the same format of characters, 2 letters
followed by 6 digits followed by a single letter. If the computer knows this rule then it knows what
the format of a NI number is and would reject ABC12345Z because it is in the wrong format, it
breaks the rule.
4. Length check. A NI number has 9 characters, if more or fewer than 9 characters are keyed in then the
data cannot be accurate.

5. Existence check. A bar code is read at a supermarket check out till. The code is sent to the main
computer which will search for that code on the stock file. As the stock file contains details of all
items held in stock, if it is not there then the item cannot exist, which it obviously does, therefore the
code must have been wrongly read.

6. Check digit. When the code is read on the item at the supermarket, it consists of numbers. One
number is special, it is called the check digit. If the other numbers have some arithmetic done to
them using a simple algorithm the answer should be this special digit. When the code is read at the
check out till, if the arithmetic does not give the check digit it must have been read wrongly, it is at
this point that the beeping sound would normally be heard if everything is alright.

Page No. 89 of 160


1.9.d Output Formats
When data has been processed by a computer system it is necessary to report the results of the processing.
There are a number of different ways that the results can be reported to the user.

Graphs.
Graphs show trends very clearly. Different types of graph can illustrate different characteristics, and when
two variables need to be compared, a visual representation can be very useful. However the importance of
the scales is paramount because otherwise a very misleading picture can be given. Also, the specific values
are not easily read from a graph, indeed, in a continuous distribution, it is simply not possible to take reliable
readings to any degree of accuracy.

Reports
A report is a hard copy printout of the values of variables. This has the advantage of producing the actual
figures according to the values specified by the user. However, the figures themselves may need skill to
interpret their significance and the value of figures in a vacuum is often hard to justify.

Interactive presentations.
The previous forms have relied on the format of the report being decided without the luxury of being able to
see what the figures look like in the first place. If the system allows the user to decide the type and range of
output required during the run then there is some positive user involvement leading to an interactive
presentation where the user can adjust the output to suit the example.

Sound.
Many applications do not lend themselves to a standard, visual, printout. Sound can be used for output from
some systems, obvious examples would be voice synthesis for reporting to blind people and an alarm system
to protect property against burglars.

Video.
Video is a visually satisfying form of output that takes large amounts of memory to produce because the
nature of the medium requires large quantities of pictures to produce the feel of continuous motion. Video is
useful for demonstration of techniques where there is little value in pages of instruction if a simple video can
illustrate something better.

Images.
‘Images’ can refer to any of the forms of output mentioned when they are shown on a monitor screen, as
opposed to the hard copy produced from a printer.

Animations.
Provide a good stimulus for an audience and lead from one slide to another when making a slide based
presentation. Animation takes considerably less processing power than other forms of motion, unless the
image being animated is complex. Animation is used so often that it can come across as being a boring
technique that has just been added for ‘gloss’.

1.9.e Output According to Target Audience


Imagine an intensive care ward at a hospital. There are six beds, each with a patient who is being monitored
by a computer, the outputs are available for a variety of users. There is a nurse at a desk at one end of the
ward. The nurse has other duties, but is expected to make the rounds of the patients to check on their
progress at regular intervals. Doctors come round the ward twice a day to check on the patients and make
any adjustments to their medication.

If a patient is sensed by the computer system to have suffered a relapse while the nurse is sitting at the desk,
a sensible output would be sound, some sort of alarm to bring the notice of the nurse to the fact that
something is wrong. This may be accompanied by a flashing light, or some other device, to quickly draw
attention to the patient needing attention. When the nurse goes around the patients to make a visual check of
Page No. 90 of 160
their conditions it is not necessary to know exact figures of heart rate or blood sugar, a quick glance at a
screen showing a scrolling graph of the state of the patient’s vital signs over the last 20 minutes will be
perfectly adequate. If the graph looks in any way abnormal it may be necessary to get a printout of the actual
values of the variables for that patient to determine what action, if any, needs to be taken. The doctor may
well want to see a printout of all the variable values for the last twenty four hours, particularly if there is
something happening to the patient which is difficult to understand, such historical data can hold the clue to
present symptoms. The doctor may change the medication or the parameters within which the patient can be
considered to be stable, this will involve the nurse resetting values on the scales of the graphical output, or
even resetting the parameters for setting off the audible alarm. This involves the nurse in using an interactive
presentation with the system. Once a week the nurse takes a first aid class at the local sixth form college.
There are too many students for a one to one presentation all the time so the college computer system has
been loaded with demonstration software showing an animation of the technique for artificial respiration.

When considering output always consider the importance of timeliness and relevance. Data tends to have a
limited life span, which can be different for the same data in different situations. The data on heart rate from
3 hours ago is not going to be of importance to the nurse looking after the patient, but it may be of great
value to the doctor in providing a clue as to the reason for a sudden change in condition. Some data is not
relevant to particular situations, however up to date it is. The colour of the patient’s eyes has no bearing on
their physical state and consequently should not be considered relevant to this example, although it may well
be in other circumstances.

Page No. 91 of 160


Example Questions.

Q 1. a) State two methods of data entry used by banks in their cheque system. [2]
b) Explain why banks find the use of your two examples suitable for this application. [4]

A. a) -Keying in of data, either to a disk for later entry, or directly onto the cheque in machine
readable form.
-MICR
b) -Keying in can be used to place the details of the payee onto the cheque together with the
amount,
-in machine readable form,
-or to store the data on a disk for future use.
-MICR is already in machine readable form
-placed on cheques at time of printing the cheque book
-means that complex figures like account number do not have to be keyed in which would
invite human error.
Notes: Although the answer is given as bullet points, the response expected would be a prose
explanation. Note that although MICR is not stated in the syllabus, the examiner expects you to have
a working knowledge of it and other input types not stated. The syllabus actually says ‘including…’,
in other words any input device may be alluded to in the question, although, in practice, the devices
used in the exam will be common and relevant to a simple situation.

Q 2. A small stall is to be opened, as part of a fairground, where the customer can have their
likeness printed on to the front of a sweatshirt. Describe two possible methods of capturing the
image to be printed. [4]

A. -Digital camera
-connected to the computer which uses
-software to crop and present the image to the printer.
-Camcorder where the image is sent to..
-a video capture card which produces a still image on a screen in the same way as a digital camera
does.

Q 3. A mail order firm receives orders from customers on paper order forms. These are keyed into
the computer system by operators. The data that is to be keyed in includes the 5 digit article
number, the name of the customer and the date that the order has been received.
a) Explain how the data input would be verified. [3]
b) Describe three different validation routines that could be performed on the data. [6]

A. a) -Two operators would…


-independently key in the data
-The two copies of the data are then compared..
-by the software..
-and errors are reported to the operators.
b) -Article number can have a length check carried out on it..
-if there are not 5 characters then the article number must be wrong.
-Name of customer can be checked with a character check..
-any characters other than letters or hyphen or apostrophe must mean that the check has been
failed.
-The date can be subject to a range check (actually a number of range checks)..
-the first two characters must be less than 32.
Notes: Do not use the verification technique of printing out the data so that the customer can check
it. This is a mail order company and hence this would be impossible. There are many possible
alternatives for part (b). Choose them carefully so that there are three different ones and so that all
Page No. 92 of 160
three pieces of data are used. Notice that there are two answers for each one, meaning that the
examiner wants to know what the type of check is, and also the rule that has to be followed by the
data to be treated as valid.

Q 4. A reaction vessel in a chemical plant is monitored, along with many others, by a computer
system using a number of sensors of different types. Describe three different types of output
that would be used by such a system, stating why such a use would be necessary. [6]

A. -Graphs (of the temperature, pressure..) showing the general state of the reaction vessel..
-to show the operator the trends in the vessel, for example shows clearly whether the temperature is
increasing.
-Report (of temperature)..
-while the graph shows a trend, the report gives precise figures.
-Sound
-an alarm would sound if the temperature went past a safe limit.
-Hard copy printout..
-to allow investigators to study problems that may cause a shutdown or unacceptably poor product.
Note: While knowledge of a chemical reaction is not part of a computing syllabus, it is reasonable to
expect students to realise that heat, or some other sensible parameter, would play an important part in
the reaction.

Q 5. Explain what is meant by the timeliness and relevance of data. [2]

A. -Timeliness is the concept that data changes over time and that data is only part of a sensible solution
for a short period before it becomes outdated.
-Relevance of data means that data has a bearing, or use, in that particular application.
Note: These are simple definition answers. Having said that the answers here would not be expected,
any answer that has the essence of the correct answer would be acceptable. Examiners are aware that
students take these papers under a lot of pressure and in a question like this will do their best to
compensate as long as the germ of the answer is there.

Page No. 93 of 160


1.10: Designing the User Interface
1.10.a Importance of Good Interface Design
1.10.b Peripheral Hardware for a Given Application
1.10.c HCI Design Issues
1.10.d Styles of Interface
1.10.e Characteristics of a User Interface
1.10.f Speed Mismatch

Example Questions

Previous Menu

Page No. 94 of 160


Chapter 1.10 Designing the User Interface

Note: Much of the content of this chapter has already been covered in sections 1.2.c and 1.5.e and this
chapter should be read in conjunction with those two sections.

1.10.a Importance of Good Interface Design


However complex the software, however expensive and powerful the hardware, the system is unusable if
there is no intuitively simple to use interface with the human being who is in control of the system or for
whom the system is producing results. The HCI must be unambiguous, allow the user to input all the data
that the user thinks important, and produce the output in an easily understandable form.

The intended user of the interface must be taken into account. The interface design for a pre school
playgroup to learn about numbers is going to be very different from the design of an interface for the
manager of a chemical plant to keep a check on the reactions around the plant. The interface that this
manager would use to study a particular reaction (perhaps tables of figures, or graphs showing the different
parameters of the reaction) is very different from the interface the same person would use if they were
wanting to see the flow of a chemical around the whole site. This would probably be in the form of a
diagrammatic representation of the site. The circumstances under which the interface is to operate are also
important. In the last chapter mention was made of the nurse looking after a group of patients. In those
circumstances an audible warning that a problem may be occurring is far more sensible than a visual one
which may be ignored if the nurse’s attention is drawn away from the screen. Finally, the designer of the
interface needs to take account of the purpose for which the interface was designed, namely the transfer of
data into the system and the communication of information from the system to the user. If the user is using
the computer to play a game then the paramount importance of the interface is that it adds to the enjoyment
of the user.

Consideration of the purpose of the interface,


 who it is for
 what information needs to be conveyed
 the circumstances under which the interface must operate
 the effectiveness of the communication
 the enjoyment obtained from using it
are all important when the interface is being designed.

1.10.b Peripheral Hardware for a Given Application


This section deals with the needs of the application rather than the peripheral devices themselves. For details
of the devices the reader’s attention is drawn to chapter 1.5.

When peripheral devices are chosen a number of factors need to be taken into account.
 Who are the people that are going to use the application? Specifically, consideration must be given to
their age (can they read is an obvious question), their ability with computer systems, their understanding
of the software in use (do they need to be given instruction how to use it or do they know what is
expected of them?), any physical disabilities which may make some hardware impossible to use.
 Is the system automated in any way? If so the peripherals may include sensors and actuators.
 Under what circumstances will the system be used? If the input and output devices are to be used in the
open air then the environment will dictate some restrictions which would not be necessary if the system
was being used in a computer room.
 The software that is being used. The software will dictate the type of input required and the type of
output that will be produced, consequently it will also have an influence on the peripherals that are
suitable for that input and output.
When answering questions drawn from this section, compare the requirements of the system with the
characteristics of the available hardware devices, and be prepared to state why a particular choice has been
made.
Page No. 95 of 160
1.10.c HCI Design Issues
Short term and Long term memory.
The information produced by a system can be of such a large volume that it is not possible for all the
information to be stored for future use by the user. Some of the information is presented via the user
computer interface, perhaps in the form of a scrolling graph. Such data is very transitory in nature because
the screen display is being constantly updated. Such data is part of the short term memory. The long term
memory is that which stores the data for future reference.

Visual perception.
This includes all the information that is presented by the system in such a way that it can be seen with the
eyes. This means that the information will be presented on a screen or on a hardcopy produced by a printer.
The size of individual pieces of information will be important as will the contrast used and the type of font
in the case of text.

Colour.
Colour is an important part of any HCI. The contrasting use of colours can highlight the more important
information, or can be used to distinguish one type of information from another. The different levels of
contrast between colours are necessary if the individual items of information are to stand out. Black on white
provides the highest possible contrast, while dark blue on black is very difficult to decipher.

Layout.
The layout of the data on the screen is important. The eye naturally reads from left to right and from top to
bottom. This means that more important information should be positioned toward the top and left of the
screen. The volume of information on the screen at any one time is also important because there is a limit to
the amount that the eye can follow and the brain distinguish in one sweep of the screen content. If the
information should be seen in an order, then the correct screen order is from top left to bottom right corners,
as the eye naturally reads.

Content.
The content of the information presented is important because a user will soon begin to ignore items of
information that are constantly being put on the screen despite not being necessary. Similarly, if a method is
used to show that a piece of information needs urgent attention, while the operator does not perceive the
urgency, then all such highlighted information may be begun to be ignored in the same way.

1.10.d Styles of Interface


This work has all been covered in section 1.2.c. Students should refer back to this section for any
clarification required.

1.10.e Characteristics of a User Interface


This work has all been covered in previous sections. Particular sections referred to are 1.2.c for type of
software interface, 1.5.e for hardware interface and 1.9.d for the type of report produced.

1.10.f Speed Mismatch


A typical computer system will consist of the processor to do the necessary calculations or other processing,
the peripheral devices to allow input, output and storage of data/information, and the human being that is
using the computer.

The processor can carry out its side of the task at great speed while the human being is very slow both at
providing input and making sense of the output. This difference in speed is known as the speed mismatch
between the operator and the processor. Peripheral devices work at far greater speeds than the human being,
but are considerably slower than the processor, consequently there are also speed mismatches on both
communications concerning peripherals. If there are enough computer systems this speed mismatch does not
matter so much, but if there is a shortage of processing time, then a method needs to be found to keep the

Page No. 96 of 160


slowest parts of the systems isolated from the processor. One way of doing this is to use batch processing
(see module 1).
The speed mismatch causes more problems if the decisions of the computer need to be acted upon
immediately. If a computer is being used to control the insertion of the graphite rods into a nuclear reactor it
may become important to ignore the human being once the decision has been made and simply to report that
an action has been taken after the event. In this way the speed mismatch has been overcome by cutting out
the slowest part of the system.

Page No. 97 of 160


Example Questions

A company has a workforce of around 2000. Some work in the office using the computer system for
administrative tasks, while others use the computer system on the production line for giving details of orders
that need to be manufactured.

Q 1. Describe the factors that would have been important in the design of the software interfaces to
be used by the office workers and the shop floor workers. [6]

A. -Ability of workers with computer systems..


-have they received training/are they used to computer use…
-The environment in which the system would be used…
-lighting conditions on the shop floor may be different to those in the office..
-colours will have to be different on the screen in order to maintain contrast.
-What output will be expected from the computer?..
-The office will probably use text while the..
-shop floor will probably need diagrammatic responses.
-The hardware that is going to be used to communicate in the HCI..
-will determine style of interface, e.g. touch screen input or keyboard.
Notes: Although the hardware has been mentioned briefly in passing, the answer must be limited to
software because of the question. These are standard answers taken from the text. Each answer needs
to be expanded a bit because of the word ‘describe’ in the question.

Q 2. Select appropriate peripheral hardware for these two application areas, giving reasons for
your choices. [12]

A. Office:
-Keyboard/mouse for input because…
-input is likely to be character based owing to typical office tasks.
-Monitor/laser printer for output because..
-output needs to be checked and then high quality printout for documents to be sent outside firm.
-Hard drive for storage because..
-of need to store and retrieve documents out of sequence.

Factory:
-Touch screen for input because..
-dirty environment could damage other forms of input device.
-Plotter for output in order to..
-produce design quality drawings for use in manufacturing process.
-Hard drive for storage in order to..
-store number of high quality drawings.

Communication:
-Necessary for communication, either between machines or to some central resource/LAN..
-requiring cabling/network cards.

Notes: The standard form of the hardware question requiring answers for input/output/storage/ and
communication where appropriate. In reality this is too big a question to be asked in an examination,
the normal question will be out of 3,4,6 or 8 dependent upon whether the question says state or
describe and whether communications play a sensible part in the application.

Page No. 98 of 160


Q 3. The office workers often have to key in the details of new members of the workforce. The
details of the worker are on a standard form, which the new employee fills in. Explain how a
form based software interface would be useful to the worker who has to key in the data. [4]

A. -The interface will have specific areas to hold the answers to questions.
-these should match the positions of the answers on the paper form...
-making it difficult to put the details in the wrong place..
-or to miss any out.
-Validation routines will be set up on each data area..
-to check the data entry and reject anything not sensible.
-Some areas will not allow a non-reply.
Notes: Again, standard answers, which will gain full marks even if many of the points are missing.
There is an element of testing the candidate’s ability to analyse a situation here, but the important
point is to test whether the student understands the concept of a form based interface.

Q 4. Explain the types of output that would be expected from the computer on the factory
production line, if it is used to control the speed of the production line as well as being used as a
tool for the workers. [4]

A. -Menu type of interface on the screen so that…


-a touch sensitive screen can be used for input.
-Hardcopy printout of the plans for products..
-produced by a plotter..
-so that they can be taken from the terminal and used at the point of manufacture.
-Sound so that..
-an alarm can be sounded if the line is traveling at the wrong speed.

Q 5. Explain why speed mismatch would mean that the computer should be in control of the speed
of the production line. (3)

A. -Speed mismatch is the name given to the difference in reaction time of the operator and the
computer.
-The computer is able to take decisions very quickly, while the operator works very slowly..
-The decision to change the speed of the line must be taken very quickly or product will not go
through all the manufacturing processes, so the computer controls it.
Notes: There is virtually no other question that can be asked about the speed mismatch. It is simply
the difference in reaction time and if the candidate can relate that to the application, they must get the
marks.

Page No. 99 of 160


1.11: Characteristics of Information Systems
1.11.a Passive and Interactive Information Systems
1.11.b Management Information Systems
1.11.c Applications Requiring Batch Processing/ Rapid Response

Example Questions

Previous Menu

Page No. 100 of 160


Chapter 1.11 Characteristics of Information Systems

1.11.a Passive and Interactive Information Systems


An information system is a system that provides information according to a user’s requests.

Passive information systems.


Passive information systems are systems that will answer queries based on the data that is held within them,
but the data is not altered. A simple example would be an electronic encyclopedia where queries can be used
to search for data and much valuable information can be learned, but the user is not allowed to alter the data.
Another example would be the student file in a school that can be accessed by members of the teaching staff
to find out where a student is at a particular time of day, or to look up their telephone number in order to
contact the parents. The database of information is a valuable resource but it is not possible for an ordinary
teacher to alter it.

Interactive information systems.


An interactive system is one that data can be entered for processing which may alter the contents of the
database. An example would be the school secretary updating the attendance record of a pupil in the pupil
file. In commerce, a stock control system in a supermarket is an interactive information system because it
not only gives information like the price and the description of the goods for the till receipt (passive), but
also updates the number in stock immediately (interactive) so that when the next item is sold the number in
stock has already been altered.

1.11.b Management Information Systems


A management information system is software that allows the managers within a company to access and
analyse data.

The management within a company, or any other organisation, is usually working on two levels. These
levels may be different levels of management or may be the same people but with two different tasks. One is
the day to day management of the organisation, keeping track of invoices, ensuring that the business has
enough stock, arranging for the workers to be paid… The other is the strategic management, making
decisions about what items of stock to keep, what new items to stock, what to discontinue…

The first of these management tasks is condition driven. The information system can be used to trigger
decisions that have to be made. A certain item is reported to be low in stock by the system requiring a
decision to be made as to whether to reorder and how many to reorder.

The second of these management tasks is to look at the wider picture. To extract information from the
system which can inform wider decisions like should an item be stocked, which areas of the business are
doing well and which are not, which workers are having to do a lot of overtime which may point to the need
to increase staff in that sector.

Such reports are termed Strategic level reports because they inform the executives who need to decide the
strategy that the company is to follow.

1.11.c Applications requiring Batch Processing/Rapid Response


Batch processing.
This work has been covered in module 1.
A batch processing system is used when the output does not have to be produced immediately. Other factors
are that the application will tend to use a large amount of data, that processing will tend to be of the same
type for each set of data and that human intervention is not necessary. In module 1 we saw that the perfect
example of batch processing is the payroll system, and nothing has changed because we are in a different
module.
Page No. 101 of 160
Rapid response processing.
In module 1 this was referred to as real time processing. Real time processing can be thought of as being
used in process control where the results of the process are used to inform the next input. A good example
would be the control of a robotic machine on the production line. The other example is in information
systems where it becomes necessary to update the file of information before the next enquiry is dealt with.
The classic example is the airline (or theatre) booking system. If a customer enquires whether there is a seat
available on the flight, and in response to a positive reply decides to buy the ticket, then the number of
tickets now available must be updated before the next person makes an enquiry, otherwise the second person
may be sold the same seat. Similarly, the mail order company will need to change the number of items in
stock before the next query arrives.

In general terms, an examination question will expect the student to be able to decide which of these two
types of processing are most appropriate in a given situation. It is not sensible to list a number of different
applications for each type and to expect students to learn them. The application in a question may not be on
the list and the student would not be demonstrating an understanding of the concepts even if it was. Far more
sensible is to learn to recognise the characteristics of each of the types of processing in a given application.

Page No. 102 of 160


Example Questions

Q 1. Explain the difference between a passive information system and an interactive information
system, giving an example of each. [4]

A. -A passive system is one where the database is not changed


-e.g. This book when it is installed on a network
-An interactive system is one where it is normal for data that is either offered to it or which it
produces will also have the effect of altering the data stored.
-e.g. A system that controls the progress of a computer controlled robot vehicle around a factory.
Notes: The amount of material that is covered in this section is so small that there are very few
questions that can be asked, in fact this just about covers all that can be expected of a candidate.

Q 2. A company payroll system uses a personnel file among others.


a) Explain the difference between batch processing and rapid response processing. [2]
b) Explain how batch processing and rapid response processing can both be sensibly used
in the context of the personnel file being used to calculate the payroll. [4]

A. a) -Batch processing is the processing of data by collecting the data and then processing it in a
single batch.
-Rapid response processing is processing where the result of the processing is needed
immediately.
b) -Payroll needs to be run once per week and..
-requires no human intervention, consequently perfect for batch processing.
-Enquiries by employees need to be handled on a one off basis..
-with the result of the enquiry being made available to the employee immediately.
Notes: The use of different operating systems at different times to perform tasks within the same
application area provides a very popular question.

Page No. 103 of 160


1.12: Implications of Computer Use
1.12.a Changing Trends in Computer Use
1.12.b Changes in Leisure and Work
1.12.c Privacy and Confidentiality of Data
1.12.d Legislation
1.12.e Controversial Information
1.12.f Health and Safety Implications

Example Questions

Previous Menu

Page No. 104 of 160


Chapter 1.12 Implications of Computer Use.

1.12.a Changing Trends in Computer Use


The history of the computer has been remarkably short for a device that now pervades every aspect of our
society and effects the lives of so many people in a serious way.

The first effective, useful, stored program machine is now acknowledged to have been the Colossus which
was a computer that was designed to break the German Enigma codes during the war. Confusion over which
computer was the first has been rife because of contrary claims and a lack of definition of what constitutes a
computer. Different centers around the world fiercely put forward their claims to have invented the first
computer, an argument that was settled by the lifting of the official secrets act from Colossus in the 1970s.

Such a seemingly mundane argument over something that only carried prestige for the eventual winner of
the argument, not money or power, was a symptom of the jealous way that people who were involved with
computers and who were able to use them guarded their privileges from others.

This mentality gave rise to the concept of ‘Fortress Computing’ where computer competent people kept
others away from the systems. There was some justification for this in order to use a scarce resource as
effectively as possible, but there was undoubtedly an element of such workers protecting their position by
making computer use seem somewhat mystical. The results of this are still seen today in the attitudes of
many middle aged and older people who believe that using a computer is beyond them. This is not their
fault, but something with which they were brain washed when they were younger.

The use of computers was largely confined to this technical elite in universities, and to larger businesses
where information systems were needed to produce payrolls and other information hungry examples. The
revolution in computer use came in the late 1970s with the invention of a cheap, small, relatively easy to use
machine called the Sinclair ZX79. There was very little it could do, for instance, it had 1/4K memory! But it
did mean that ordinary people could own their own computer. Also, the phenomenal success of the ZX79,
ZX80, and then the Sinclair Spectrum proved that there was a market. Until these machines no one thought
that ordinary people would want a computer, suddenly many manufacturers jumped on the band wagon, and
there was a plethora of machines. Each machine needed its own software and many started to go out of
business. There was no real market leader, although Acorn, in Britain, were very popular because their
machines were being used in schools, so parents wanted to buy one for their children to use in order to help
with school work. In the 1980s IBM, the world’s biggest computer manufacturer, decided that they would
produce a small machine. It was not successful, but many other, smaller, manufacturers decided to copy the
way that it was built. Such machines were called IBM clones. Gradually, as the IBM clones grabbed a larger
and larger share of the market, the other companies went to the wall. It certainly helped that Microsoft
operating systems were installed in the cloned machines, not because they were the best operating systems,
but because it meant that these machines could communicate easily and that files were compatible.
Nowadays, we have a society where, world wide, there is a higher number of computers in homes than there
are refrigerators or baths.

The effect of this has been enormous on society, and the effects are what are discussed in this chapter.

25 years ago the proportion of the world’s population that had access to a computer system was tiny,
nowadays it is very high, and increasing daily. However, there are still large numbers of the population,
even in a rich country like Britain, that do not have access on a regular basis. There is a distinct danger that
this will lead to another form of class-divided society, not based on accident of birth, or based on wealth (or
lack of it), but based on whether a person has access to the information revolution.

Imagine two people who live in a village. The village has a grocer’s shop and newsagent. The last bank in
the village has closed because it was too costly for the bank to maintain the branch which was losing money
because so many of the villagers had changed to running their account on the Internet. A person living in

Page No. 105 of 160


this village that has a computer connected to the Internet will be able to pay their bills, order goods from the
supermarket 20 miles away at a lower cost than buying them from the grocer, will have a wider variety of
choice from the supermarket than they could get locally. They will be able to book rail tickets, at a discount,
through the Internet, which will also allow them to pick up holiday bargains. The second person does not
have a computer, so has difficulty with having a bank account, has to use the village shop with much higher
prices, and does not have the convenience of ordering on the Internet, if they want to book a holiday there is
a 40 mile round trip to find a travel agent in the nearest town. These two people are very different in their
life styles and the social changes that have occurred to, not just one of them, because of the computer are
immense.

When we add to this the fact that one of these people used to be employed by the bank to run the branch in
the village, but is now out of work, while the other has been told to go on a training course to learn a new
piece of software, the scale of how much our lives are being effected by the use of new technology becomes
even more evident.

Note that many of the changes made to our life styles have been forced rather than being made by choice.

1.12.b Changes in Leisure and Work


Computer availability and acceptance has brought about large changes, not just in the ways that we live, but
also in the way we use our leisure time and in work practices.

Children, particularly boys, spend long hours of their leisure time in front of computer terminals playing
computer games. This is a very insular way of passing the time which is beginning to worry educational
psychologists because children who behave like this are in danger of not forming the social bonds and
learning about the social interaction necessary in later life. Some of the games are particularly violent, or
anti social. Although there is no hard evidence of a link between playing such games and anti social
behaviour of the child themselves, there is a growing belief that there is such a link. Long hours spent in
front of the monitor screen at an early age is becoming suspect in the amount of RSI and other injuries being
suffered by young adults, many years before their parents generation would have shown such symptoms.

Work practices are changing in a number of ways.


 Computers have meant that some repetitive tasks have been taken away from human beings. A robot on
a car production line can not only work more consistently than its human counterparts and do the jobs of
many people, it does not need paying. Many jobs have been lost to the human work force in this way.
However, companies that have invested in this way have tended to become more profitable which has
the effect of safeguarding the jobs that are still offered by the company, and also leads to expansion and
the creation of additional jobs.
 Additional jobs are created. Every time a robot is placed on a production line, someone has to build the
robot, someone has to write the software to control it, someone has to maintain it. The problem is that
the majority of jobs created require more skills than the jobs that have been lost. This in turn means a
‘skilling up’ of the workforce. This change in working practices is another example of the technology
creating two classes of people (Section 1.12.a), those able to learn additional skills and those not.
 The use of technology allows people whose jobs require a desk and who can communicate satisfactorily
with their colleagues without needing to be in the same physical environment to have their desks where
ever they want by using electronic means of communicating. This means that people can work from
home for at least part of their week. The implications are far reaching. Less pollution because of fewer
commuters and pleasant working conditions are both positive factors. Less positive is the ability of the
electronic systems to report the working practices of the workers to their boss, and the lack of social
contact which is so important in maintaining job satisfaction.
 In the past it would have been quite normal for a person to start a job after leaving full time education
and to stay in that job until they retired. Although this may be seen by some as being an uninviting
prospect, it does provide for security and gives automatic prestige to even the most lowly of workers
because of their seniority within the business bringing invaluable experience. This type of work practice

Page No. 106 of 160


is becoming less and less common as modern technology changes products, manufacturing techniques
and the life cycle of businesses.
 Electronic communications have changed the way that business is done. Communication can be
immediate, and the worker is never far from being contacted and consequently can be at work at all
hours of the day. A good example is the world’s stock markets. Twenty years ago, each country had its
own stock market, the performance of which might effect others when they opened, but they tended to
be fairly insular in their dealings. Nowadays, the stock markets of the world are all interconnected. As a
stock holder it is possible to buy and sell stock at any time of the day or night simply by using one of the
markets open at the time, no longer is it necessary to wait for the national market to open the following
day.

1.12.c Privacy and Confidentiality of Data


The expansion of computer systems around the world have given rise to more information being stored
about individuals than ever before. The problem is that to get another copy of a person’s information the
only thing that needs to be done is to press a button. Distance is no object either. Using electronic
communications it is possible to send a person’s information from one side of the world to another in
milliseconds and then to store that information in a system that the owner of the information is unaware of.
There would be no problem if it could be ensured that all the users of the information were going to use it
for the right reasons and that the information was always accurate, however these things cannot be
guaranteed. Consequently it has become important to protect individuals from misuse of their information
by legislation and by measures that restrict both the access to the data and the passing on of the data to other
users.

Unfortunately the use of electronic information does not recognise national boundaries and some authorities
are not as anxious to uphold the rights of the individual as others. A typical effect of this passing on of
personal information is the junk mail that comes through the letter box. An interesting experiment is to
change your initials every time you have to give your name. Within a relatively short space of time junk
mail will begin to arrive and by reference to the initials it is possible to work out who has sold your details
on and to whom they have been sold.

1.12.d Legislation
Most countries have now enacted legislation in attempts to overcome the problems that were mentioned in
section 1.12.c. The purpose of such legislation is to protect citizens from something that by its very nature
can be insidious because it is difficult to understand the consequences of unrestricted use of personal
information.

Legislation protecting personal information must not be confused with copyright law. Copyright law
protects intellectual property, in the case of a computer system it would protect the person who has written
the software rather than the user or the person whose details are being stored. Each country will pass laws
that are particular to that country, but they largely follow the same model that is used in Britain.
Any personal data that is stored in a computer system must
 be accurate and up to date.
 be relevant to the task for which it is intended to be used and used for that original purpose.
 not be kept longer than is necessary.
 be kept securely. Access to the data must be strictly controlled.
 be available, on request, to the subject of the stored data.
Other measures that could be expected would be some control over the passing on of data to other
organisations, exemptions for reasons of national security or because it is thought to be in the individual’s
interest.
In Britain the Data Protection Act that was passed in 1984 only applied to data that was read magnetically,
in other words was stored on a tape or a disk. It did not apply to data stored on a CDROM because that is
stored optically. This has now been changed by the latest version of the act. This shows that, just like

Page No. 107 of 160


everything else in the world of computers, things change very quickly and that human systems often find
difficulty in keeping up with the changes.

Attempts have been made to harmonise legislation across boundaries. The European Union pass their own
directives about data, but it is difficult to get agreement when individual parliaments still have sovereignty.

1.12.e Controversial Information


The Internet was originally started by the American military (ARPANET) as a means of communication in
time of war. The principle was that if a communications system has a central control system (like a
telephone exchange) then it is easy to disable that communications network by destroying the central
control. There can be as many telephones as you like, without an exchange they are useless. ARPANET was
devised so that there was no central control and consequently the losing of one part of the system does not
stop the rest of the system from operating.

This is the whole principle of the Internet, there is no control. When someone complains about the fact that
there is a page on the Internet that shows anyone how to make a bomb and says something like, “They
should have that page removed.” They are showing their lack of understanding of the net. There simply is no
‘They’, there is no one in charge. There are some things that all sane people would condemn, the obvious
example is paedophiles using the net for their own purposes. However, if there were some central body set
up to control the net and to make sure there was no paedophilia on the system, where would the line be
drawn. Hard core pornography and the use of cannabis are against the law in many countries, however, they
are legal in Holland. If the control of the net was in Britain then the law would say that these things would
not be allowed whereas if it were in Holland they would be allowed. We would contend that the Internet is a
useful tool in the fight against oppression and the suppression of human rights. But do our values necessarily
apply in a different society? Do we have the right to subvert another society by using the net for propaganda
purposes? If we do then why should we get upset when values that are not to our liking are sent back to us?

If the world wants an Internet then it will have to put up with the downside of an uncontrolled information
network as well as the advantages from instant mass communication. The truth is that even if the
Governments of the world did not want the net there is nothing they can do about it because how can they
pull the plug on millions of machines all at the same time?

1.12.f Health and Safety Implications


The human being is not a sedentary animal. The human body is not designed for long periods of inactivity.
The body is designed to move. The legs are designed to move us around, the arms to carry things and
support weights, the eyes are designed for 3 dimensional vision. We are not designed to sit for long periods
of time, supporting the weight of our own arms while small movements are made by the hands to press keys
and our wonderful 3 dimensional sight is used to stare at a flat screen no more than a metre away. The
human body is very resilient, but, as with any misuse of the body the long term use of computer systems in
this way will cause damage.

Muscles that are not designed to support relatively small weights (the arms) for long periods of time when
using the computer keyboard begin to be strained, particularly when such small movements are made. Joints
in the fingers and the elbow and shoulder are made to perform movements that they normally would not do,
and to perform them regularly over long time periods. Over time, these strains on the body can lead to pain
and to restrictions on movement which are difficult to ignore. A new condition has been identified called
repetitive strain injury (RSI). The simple cure for this is to take regular short breaks and to move around and
exercise the joints and muscles. Also helpful is the use of a Natural Keyboard which allows the user to sit
naturally while working.

Eyes did not evolve to stare at a flat surface that is very close for long periods of time. The eyeball should,
naturally, move about in the socket. This produces tears which lubricate the eyeball. Too much enforced
staring at one point can lead to a condition called dry eye which can be very painful. The eye can also tire
because it is being made to use a fixed focus for long periods. The use of glasses to help the eye to remain
Page No. 108 of 160
focused and regularly looking away from the screen can help to alleviate these problems, as can the use of
anti glare screens fitted to monitors to cut down the levels of contrast so that the eye can handle it better.

Much has been made in the past of the radiation that comes off the screen, and the possible damage that can
be done because of the radiation. While these worries have probably been exaggerated in the past, and the
more modern screens are far safer anyway, there is a lesson to be learned from the research into radiation
from mobile phones that demonstrates how even small amounts of radiation can be harmful.

Despite the problems that are associated with the computer itself, the most important problems are less to do
with the machines themselves.

Many computer installations are housed in rooms that were not designed for such use. The result is that
cables are left trailing and that the furniture used is not always suitable. Many schools provide good (or bad)
examples of this, where a new network has been bought with little thought for the classroom that it is going
to be squeezed into. Are there enough plug sockets or are too many pieces of electrical equipment going to
be run from too few sockets? Can the cabling be put in trunking? Is there adequate ventilation and is the
lighting suitable? If the lighting is the ordinary classroom lighting then it will make the screens even more
prone to glare. If the chairs are not comfortable then back problems can occur. These can be lessened by
using ergonomically designed seating which encourages good posture.

Working with computers can cause stress, particularly among workers who were not originally trained to use
them. Historically, once a worker has attained middle age they should be more experienced than the younger
people coming in to the firm who will probably be working under them. This situation has changed for many
people because of the use of computer technology. Because of the need to keep up to date with the latest
hardware and software it is now the young people coming into the firm that are more experienced than those
who have been there some time. This can lead to feelings of inferiority and stress on the older workers.

In section 1.12.b it was mentioned that the new technology allows remote working in many situations. While
there are substantial benefits accruing from this practice there are also problems brought about by the lack of
social interaction that human beings get from a shared work environment.

Environmental Issues
Strictly, this is not part of the syllabus, however an understanding of the implications of the use of
computers would be incomplete without comment about our environment.

Many years ago the use of computer systems in the office was hailed as the start of the paperless revolution.
In the 1950s LEO was invented. It was the Lyons (same company as the cakes!) Electronic Office. The idea
was that paper would “become a thing of the past” because messages would all be sent electronically. The
environmental implications of this were tremendous. No more cutting down forests to provide paper, no
more burning of the documents that are no longer needed so that they remained confidential, with an
electronic office this was no longer necessary. There was one tiny problem. With the introduction of
machines the amount of paper increased massively. The explanation is simple. Consider a project that you
are doing for one of your courses. How many sheets of paper do you use? Not, ‘how many do you hand in?’,
but ‘how many do you use?’ The difference is that if you have made a mistake you correct it and get another
printout, if you were using a typewriter you wouldn’t do that. When you send something for printing, how
often does the printer produce an extra sheet? Do you save it and put it back in the paper tray? How often
does the printer not print properly making another printout necessary? How many people printing off a
spreadsheet haven’t given the limits of the sheet so that the printer has printed 20 or 30 sheets of blank cells
before anyone has noticed? The same sort of things happen in business, so what should have been good
news environmentally has tended to backfire.

As has been mentioned before in this chapter, there is an element of people being able to work from home
rather than having to commute. This has obvious advantages in that the pollution is cut down because there
are fewer vehicles on the road, but it is not all good news, because if 50 people don’t go in to the office it is
Page No. 109 of 160
an additional 50 homes (offices in those homes) that have to be heated that day which would not otherwise
need to be heated. There is a minimal saving at the office block because some workers have to go in to work
and therefore the office block must be fully heated.

The computer systems themselves have to be produced. There is an environmental cost here on two fronts,
the computer requires a certain amount of power to enable the factory to make it, and then there are the raw
materials that are needed in the manufacture.

When computers are eventually finished with and need to be replaced, there is a large amount of hardware
that needs to be got rid of. Some is recyclable. Chips are heated in order to recover the gold used in their
manufacture, and some parts of the chassis can be melted down and reused. However, much of the content
of a system is not economically viable to reuse and consequently is discarded. As the life of a system in
business is about two years this adds up to an enormous waste of resources. When it is also realised that
some of the contents of a system are heavy metals and other toxic materials the environmental problems of
replacing a system are great.

Page No. 110 of 160


Example Questions

Q 1. Discuss the implications for customers of a travel agent closing down their agencies and doing
all their business on the Internet. [6]
A. -Lower overheads for the business…
-meaning that customers can expect to pay lower prices.
-Information will always be up to date because up dated centrally..
-but customer may find more difficulty in finding the information required because there is no
assistant to help.
-Customers who have the Internet will be able to access late bargains
-Customers without the Internet may find difficulty in booking any holiday.
-Customers with disabilities, particularly blindness may be more disadvantaged than most
-Complaints, if things go wrong, will be harder to make.
Notes: There are other points to make but only 6 marks, so don’t waste too much time. When you
think you have earned the marks, stop. The question is quite specific about it being from the point of
view of the customer, so don’t start to talk about workers losing their jobs. It may be true, but does
not answer the question. Although the mark scheme would be set out in this way, the question does
use the keyword ‘discuss’, so don’t just write notes, the examiner is looking for a coherent argument
which contains six of the sensible points.

Q 2. Describe two ways in which a computer system in the home can alter the interaction of the
family with the outside world. [4]
A. -Children play computer games…
-stops them going out and consequently they are safer, but…
-effects their social development.
-Parents may use the computer to work from home…
-cuts down the time spent commuting to work and allows for more leisure time…
-but may increase stress and worry about work because of reduced contact with colleagues.
Notes: Sensible to use obviously different members of the family. Need to say at least two things for
each one because the question uses the keyword ‘describe’. If you were thinking of saying that they
could send emails rather than write letters it may be worth a mark but is a little trivial for both marks.

Q 3. State two reasons why it is necessary to protect the confidentiality of information stored about
people. [2]
A Data can be misused…
-by insurance companies to alter an insurance premium,
-by thieves who want to know which addresses have large premiums and are hence worth burgling
-by employers who can check on employees moonlighting.
Notes: Again, many different possible answers. This would be a nice starter question for a paper, as
it expects simple one line answers.

Q 4. Describe three measures that would be expected in a country’s data protection legislation. [6]
A. Any three of the measures listed in section 1.12.d.
Notes: This is a banker question. It is such an important area of the syllabus it is likely to be asked on
a regular basis, the problem for the examiner is that there are only a few ways of asking the question.
Candidates should learn the measures stated in the syllabus and use them to answer the question.

Q 5. Describe the consequences of allowing upper school pupils to use the Internet to find
information for project work. [4]
A. -There is a danger that those pupils who have access to the Internet outside school will use it
anyway, and…
-therefore it is only right to allow access in school.
-Pupils may find inappropriate sites…
-which means that the teacher has to censor the material in some way.
Page No. 111 of 160
Q 6. Outline the health problems that may be experienced by telecall operators and state how such
problems could be overcome. [6]
A. -RSI…
-Use sensible keyboards and properly designed furniture to encourage good posture.
-Eye problems caused by staring at the screen…
-Wear glasses and fit anti glare screens.
-Problems associated with radiation from the monitor…
-Sit further away from the monitor screen.

Q 7. Describe two ways in which the use of computer systems in business has harmed the
environment. [4]
A. -The use of large amounts of paper because…
-everyone now expects that when a final copy of a document is produced it is perfect, leading to
many copies being produced.
-The high turn over of machines means that many new machines have to be produced and…
-the old ones must be disposed of. They contain toxic material which can harm the environment.

Page No. 112 of 160


PRACTICE PAPERS

It should be noted that these practice papers have not been though the same rigorous checking procedure that
genuine papers have. However, they have been set by a senior examiner, they have the same sort of mix of
questions from different parts of the syllabus, and they are the same length as genuine papers. Each paper
has two sections, which is what students can normally expect to see in a genuine paper. One section contains
very objective questions, the other begins with a scenario and the questions are then loosely based around
this scenario. They are marked out of 90 with approximately one third of the marks being awarded for the
scenario based answers.

The mark schemes are, perhaps, a little tighter than they would normally be, but hopefully they give a clear
indication of the standard of answer that the examiner is looking for.

Page No. 113 of 160


Paper 1
Answer all questions. Time allowed 2 hours

Q 1. Explain the difference between the hardware and the software of a computer system. [2]

Q 2. a) Explain what is meant by MICR. [2]


b) With reference to an example of MICR, give one advantage and one disadvantage of
its use. [4]

Q 3. a) Explain the difference between serial and sequential files. [2]


b) Describe how a hashing algorithm can be used on a random access file to access the
records. [2]

Q 4. An estate agents’ business stores files of data on a computer system.


The hard disk contains files of
 Properties for sale
 Accounts, with details of all income and expenditure
 Personnel files containing personal details of all the employees.
a) Explain the importance of
(i) back up files
(ii) archive files
to this business. [2]
b) Devise a sensible back up strategy for this business. [3]
c) Give a reason why each of the named files should be archived. [3]

Q 5. A computer system in a library is used to control access to the stock file which contains details of all
the books kept by the library.
a) State three fields, other than the title of the book, which would be stored in each record. [3]
b) State which field would be the key field, giving a reason for your answer. [2]
c) The books that are borrowed, or returned, each day have their records updated using batch
processing. Describe how this system would operate. [4]
d) If a member of the public wishes to enquire about a book the member of staff uses the
computer system to answer the query. Explain why a batch system would not be suitable for
this, and suggest an operating system that would be suitable. [2]

Q 6. a) Explain the difference between the communications on a LAN and on a WAN. [1]
b) Describe typical hardware that would be used to enable communication over a
(i) LAN
(ii) WAN. [4]

Q 7. Explain what is meant by a


(i) Boolean
(ii) floating point
data type. [4]

Q 8. a) Explain what is meant by the term operating system. [2]


b) Give two reasons why an operating system would be stored on a hard drive rather than in the
memory of the computer. [2]

Page No. 114 of 160


Q 9. a) Give an advantage of using
(i) serial
(ii) parallel
forms of data transmission. [2]
b) When data is transmitted errors can occur. Explain how
(i) echoing back
(ii) a check sum
can be used to check transmitted data. [4]

Q 10. a) Explain what is meant by a


(i) LIFO
(ii) FIFO
data structure, giving an example of each. [4]
b) Describe how a search can be made of an array of size n for a specific data item “TEST”. [6]

The remaining questions refer to the following information.

A mail order company stores details of orders and customers on a computer system. The same system
is used for the accounts and for the production of catalogues to be sent to regular customers.

Q 11. Identify common application software that would be effective in this situation. [3]

Q 12. Describe how similar letters could be produced to be sent to all customers who have not paid their
previous bill. [6]

Q 13. a) Distinguish between the following types of software interface: form based, menu based and
command based. [3]
b) Operators are employed to key in the orders that arrive by post each day. These orders are,
commonly, written on the order form that is part of the catalogue that has been sent to the
customer. State which of the three types of interface in (a) would be appropriate in this
example, giving reasons for your choice. [3]

The company employs a systems analyst to produce a stock control system. The feasibility study has
been carried out and accepted by the management of the company.

Q 14. a) State four factors that the feasibility study would have taken account of. [4]
b) Before continuing with the design of the solution the analyst needs to collect information
about the company and the way it does business. State three different ways that the analyst
can collect information giving an advantage of each. [6]

Q 15. When the analysis of the problem has been done and the design of the solution has been finalised, the
software has to be produced.
(i) Distinguish between custom written software and an off the shelf software package. [1]
(ii) Give four advantages of using off the shelf compared to custom written software. [4]

TOTAL (90)

Page No. 115 of 160


Paper 2
Answer all questions. Time allowed 2 hours.

Q 1. a) A program is to be written that will control a point of sale terminal in a small shop. Barcodes
are used to identify goods at the point of sale terminal. The program is to be divided into five
modules. Suggest the purpose of each of the five modules. [5]
b) State four reasons why it is sensible to write a program as a series of modules. [4]

Q 2. a) Explain why a computer system needs both primary memory and secondary storage. [2]
b) A piece of software is to be used in a pre school play group to help children identify
numbers. Describe a suitable hardware configuration for this system, giving reasons for your
answers. [6]

Q 3. A program segment has been written that accepts, as input, five letters of the alphabet, divided by
commas, and outputs them in alphabetic order.
Give four different sets of test data, which could be used to test the segment explaining why each
has been chosen. [8]

Q 4. a) State two different types of computer interface software. [2]


b) For each of the types of interface stated in part (a), give a situation in which its use would be
sensible stating why it is appropriate. [4]

Q5. a) State the three different parts of a central processing unit. [3]
b) Describe how the three parts combine to process an instruction. [3]

Q 6. It is intended to transmit data from device A to device B.


a) Explain why a communications protocol is important. [2]
b) Describe two parts of the protocol which will be necessary if the communication is to take
place successfully. [4]

Q 7. A typical Web page contains text and illustrations. Explain how bit rates help to determine the
contents of the page. [4]

Q 8. The barcodes used by an examination board to identify question papers use a four-digit code. The
first digit identifies the subject area, the second digit the level of the examination (there are five
possible levels, numbered 0 to 4), and the final two digits, the year of the paper.
For example 2301 is
2 is a maths paper
3 is an AS paper
01 is for the year 2001.

All examination papers are stored on a device as an indexed sequential file, the code number being
used to identify the correct paper in the indexes.
Using a diagram to illustrate your answer, show how this index would be set up. [4]

Q 9. a) Name and describe three different techniques which can be used when writing code which
would help another programmer to understand the way the program was written if they have
the task of maintaining the program in the future. [6]
b) Describe three different techniques that can be used to debug a piece of software. [3]

Page No. 116 of 160


The remaining questions refer to the following information.

A leisure centre runs a membership club, which allows members special deals on outings and discounts on the
prices of the various attractions within the centre.

Q 10. If a member wishes to book a series of swimming lessons they go to the information desk where the
payment is credited to their account and the lessons can be booked. Annually, details of the
members’ Christmas party must be mailed to the members. Explain how batch processing and real
time systems can be used to solve these two problems of computer use. [6]

Q 11. At the children’s Christmas party an entertainer prints pictures of the children onto t-shirts using a
video camera as input device. Describe how this process works. [5]

The leisure centre offers its members access to information about the centre and also to information in a
wider context for those of its members who wish to research into topics.

Q 12. a) Distinguish between passive and interactive information systems, giving an example of
each. [4]
b) The software systems used by the centre come with documentation. Explain the difference
between technical and user documentation, giving examples of the types of content that
would be expected in each. [5]

Q 13. A word processor operator uses a computer system for most of the working day. Discuss the health
issues that the operator may encounter due to the prolonged use of the computer and suggest sensible
methods of alleviating these problems. [5]

Q 14. A student is studying for as level examinations. Many of the assessed pieces of work need the
student to do some research before attempting the work. The student has access to a computer system
at the leisure centre. The system has a CDROM drive and a collection of encyclopedias on CD, and a
connection via a service provider to the Internet. Discuss the value or otherwise of these two sources
of information for the student. [5]

TOTAL (90)

Page No. 117 of 160


Mark Schemes for Practice Papers.
These mark schemes have not been vetted by a committee of examiners as would be the case with the real
thing.
They are not exhaustive. Many of the questions will have perfectly justifiable, alternative, answers which the
teacher should take into account when marking the work.
These mark schemes do, however, give a full answer for every question, and will hopefully be of use to the
student in demonstrating the type of depth of answer that the examiner is looking for.

Page No. 118 of 160


Mark Scheme. Paper 1.

Q 1. -The hardware is the physical parts of the system


-The software is the set of instructions that make the hardware do something useful.
(1 per -, max 2) [2]

Q 2. a) -Magnetic ink character recognition


-Special character set
-printed in magnetic ink.
(1 per -, max 2) [2]
b) E.G. the printing of account numbers on bank cheques.
-Advantage is that they are both machine and human readable.
-Need for comparison with number on cheque card, therefore need to be human readable.
Also need for fast input because of large volumes, therefore need to be machine readable.
-Disadvantage is the complex printing process that must be carried out when the document is
originally produced.
-This is possible on bank cheques because the account number does not alter during the life
of the cheque.
(1 per -, max 4) [4]

Q 3. a) -Serial files contain records in the order that they were received
-Sequential files have records in some logical order. [2]
b) -A field, usually the key field…
-is used as the data for an arithmetic algorithm…
-the solution to which gives the address of the data.
(1 per -, max 2) [2]

Q 4. a) (i) -Copy of current master file taken so that file can be replaced if it is corrupted.
(ii) -Long term storage of little used information…
-in order to free storage space on system.
(1 per -, max 2) [4]
b) -Multiple copies of master files stored…
-away from office.
-Taken daily (or other sensible period if explained)
-on tape streamer (or other sensible medium)
-Copy made of any changes since last back up/transaction log.
(1 per -, max 3) [3]
c) -Properties for ease of reference if needed for data relating to new sales.
-Accounts to provide data for inland revenue if required.
-Personnel to provide details for a reference for an employee who may have left some
time ago.
(1 per file, max 3) [3]

Q 5. a) Any three sensible. [3]

b) -ISBN (or equivalent)…


-because it is unique to that book.
(Note: library number would be better because it identifies each individual copy of
the book) [2]

c) -Details of book stored on…


-temporary (transaction) file
-At regular interval (daily)…
Page No. 119 of 160
-contents of transaction file merged with master file.
-Old copy of master file kept as a back up.
(1 per -, max 4) [4]
d) -Batch not suitable because enquiry needs to be answered immediately
-Real time system. [2]

Q 6. a) -LAN is over a short distance, WAN is a significant distance. [1]


b) (i) –Network cards
-Cabling
-Server
(ii) –Modem
-telephone line
-ISDN
-Satellite communications
(1 per -, max 2 per dotty, max 4) [4]

Q 7. (i) -Boolean data is a single bit…


-standing for true/false
-a logical value.
(ii) -Floating point is a representation of fractional values…
-given as two parts
-Mantissa is the value of the fraction
-Exponent is the number of times the point has had to move to make the number a fraction.
(1 per -, max 2 per dotty, max 4) [4]

Q 8. a) -Suite of programs
-giving an environment in which to run application software. [2]
b) -Saves space in primary memory
-Allows for operating system to be changed easily. [2]

Q 9. a) (i) -Transmission is more reliable because bits cannot become confused.


(ii) -Transmission is faster because more than one bit is sent simultaneously. [2]
b) (i) -When data is received it is transmitted back to the original sender.
-If the retransmitted data does not match the original, a transmission error has
occurred.
(ii) -The individual bytes of data are added together ignoring any carry out of the byte.
-The result is transmitted with the data so that it can be compared with the calculation
from the data after transmission. [4]
Q 10. a) (i) -A data structure where the last data item in will be the first one to be used.
-A stack.
(ii) -A data structure where the first data item to be put in will be the first to be used.
-A queue. [4]
b) -Set counter
-test Array (counter)
-increment counter
-Loop with…
-working condition
-Report when TEST found
-Exit condition
-Error condition if TEST not present.
(Answer can be in any form, this answer simply illustrates where the marks should be
awarded. 1 per -, max 6) [6]

Page No. 120 of 160


Q 11. -Database to store records of customers and orders
-Spreadsheet (or accounts software) for handling accounts
-DTP for production of catalogue. [3]

Q 12. -Database of orders searched for…


-those records flagged as unpaid.
-Foreign key used to access customer record and then…
-extract the necessary information from those records.
-This data used in mail merge with standard letter…
-in word processing software. [6]
Q 13. a) -Form based has areas of the screen to be filled in like a paper form.
-Menu based offers a series of choices, each choice leading to another choice.
-Command based expects reserved words to be typed in to produce a response. [3]
b) -Form based because…
-the screen design can mirror the paper order form leading to…
-fewer input errors. [3]

Q 14. a) -Is the solution technically possible?


-Is the solution economic to produce?
-What is the effect on human beings?
-Is the workforce skilled enough?
-Will the customer notice the difference?
-Will profits increase?
(1 per -, max 4) [4]
b) e.g. -Interview members of staff…
-allows for individual answers and altering of questions.
-Give out questionnaires (e.g. to customers)
-many peoples’ views can be sought very easily.
-Follow documents through the system/observe system operating
-provides first hand knowledge of system. [6]

Q 15. (i) -Custom written is software written especially for that application while off the shelf software
is software that is generally available but that will need to be tailored. [1]
(ii) -Available immediately.
-Already fully tested.
-Support readily available.
-Cheaper to get up and running.
-Work force available that can use it.
(1 per -, max 4) [4]

TOTAL (90)

Page No. 121 of 160


Mark Scheme. Paper 2.
Q 1. a) -Input/reading of barcode.
-Checking of input/barcode
-Search file for barcode/read record from file/update file
-Calculations of bill
-Output/screen display and till receipt
-Suggestion of stock control element.
(1 per -, max 5) [5]
b) -Fewer errors made because each module is easier to produce than a single large program
-More than one person can be employed in writing the code..
-this means that the program is produced far quicker.
-Individual programmer’s expertise can be used.
-Library routines may be used.
-Program is simpler to test and debug.
(1 per -, max 4) [4]

Q 2. a) -Primary memory is needed to store data that the processor is using.


-Secondary storage is needed to store data once the power has been turned off to the
processor. [2]
b) Input:-Touch screen because it allows the child to input by pointing, a natural reaction.
-Keyboard and mouse to allow an adult to give the computer instructions/load the program…
Output: -Printer to allow the adult in charge to receive hard copy evidence of children’s
progress.
-Colour screen to display choices, to keep the child’s attention.
Storage:-Software will have been purchased on a CD or DVD or similar, consequently a
need for a suitable drive. Reason is more important in all cases of hardware choice, than the
actual choice of hardware.
-Hard drive for storage of O.S., software, recording of children’s attempts.
(2 per classification, max 6) Note that there is no communication involved in this particular
example. [6]

Q 3. e.g.
b,A,d,c,e to test if the segment can cope with lower and upper case.
a,a,d,b,c to test the result if two letters are the same.
a b d e c to test what happens if the commas are omitted
a,e,d,c to test what happens if fewer than five letters are input.
(2 per test for sensible data and for a good reason for including it) [8]

Q 4. a) e.g.
-Menu based
-GUI [2]
b) -For use with a touch screen
-limits the number of possible inputs
-For use with a computer system in an office
-Easy to learn and use for people with different levels of computing ability.
(2 per type, max 4) [4]

Page No. 122 of 160


Q 5. a) -ALU
-Control unit
-Primary memory [3]
b) -The memory unit holds the instruction and its associated data
-The ALU carries out any arithmetic or logic operations implicit in the instruction.
-The control unit coordinates the rest of the processor and ensures that the instructions are
carried out. [3]

Q 6. a) -Need for a set of rules to enable…


-the correct transfer of data [2]
b) e.g.
-Baud rate…
-so that both devices are working at the same speed, to ensure that data bits do not become
confused
-Echoing back…
-so that one device does not wait for data to be echoed when the other device will not echo.
(Any two sensible, 2 marks each, max 4) [4]

Q 7. -A bit rate is the speed at which the data is communicated


-Text takes relatively little data in comparison to…
-pictures which require a large amount of data
-The greater the proportion of pictures to text, the slower the transmission will be
-Enough text needs to be included to make transmission times sensible.
(1 per -, max 4) [4]

Q 8. Suitable diagram similar to example given in text.


Mark points:
-Different levels of index
-Indication of pointers to provide abbess across levels
-2nd level contains 0 to 4
-3rd level has two digits
-Clearly shown how data is accessed.
(1 per -, max 4) [4]

Q 9. a) -Indentation…
-used to keep lines of code together so that they are easily identified as being a group
-Comments
-to explain the logic being used in spoken language.
-Meaningful variable names…
-so that the intention of each variable is obvious.
-Use of modules…
-to split a difficult or complex problem into smaller problems so that they are easier to
understand.
(1 per -, 2 per method, max 6) [6]
b) -Translator diagnostics
-Trace tables
-Variable dumps
-Desk checking
(1 per -, max 3) [3]
Q 10. -Swimming lessons involve access to individual record…
-while client present…
-therefore real time used with direct access to data record.
-Record will be immediately updated
-Party invitations are mail merged…

Page No. 123 of 160


-as part of a batch system which is carried out off line…
-when computer not needed for other things.
-All records used therefore serial access.
(1 per -, max 3 per type, max 6) [6]

Q 11. -Still picture isolated from video by video capture…


-converted into bit map image…
-input to processor where software allows picture to be…
-cropped and edited.
-Final version of picture sent to printer which prints…
-on heat sensitive paper which is then transferred to shirt.
(1 per -, max 5) [5]

Q 12. a) -Passive information system is one where the user does not alter the information, simply
looks at it.
-e.g. encyclopedia / information about events next week in the centre
-Active information system is one where the data is continually being changed.
-e.g. System that allows members to book tickets to a show next week, and must keep an up
to date record of the seats still available. [4]
b) -Technical is for programmer to troubleshoot or extend system
-program code
-algorithms
-data structures
-User documentation is for user to be able to make the system do what it is meant to.
-error messages
-installation instructions
-sample input/output.
(1 for distinction, 2 for examples per type, max 5) [5]

Q 13. -Bachache for sitting for long periods…


-orthopaedic chair/move around regularly
-Eye problems caused by staring at screen
-use of glasses…
-anti glare screens
-Radiation from screen…
-sit away from screen.
(1 per -, max 5) [5]

Q 14. -CDs may be out of date because they do not receive updating.
-restricted in the information contained…
-but information will be accurate and…
-easy to find.
-Internet contains enormous amount of data, mostly irrelevant…
-makes searching difficult…
-once found, there is no guarantee that information is correct…
-problem of inappropriate sites.
(1 per -, max 5) [5]
TOTAL (90)

Page No. 124 of 160


2: Structured Practical Computing Tasks

NOTE: This section utilises the Microsoft™ Word bookmark system.


1) Click on the toolbar “Insert”
2) Click on Bookmark to browse the section for subsections
3) Click "Go to” once you have highlighted your chosen section

Chapter 2.1: Design


Chapter 2.2: Application of Generic Software
Chapter 2.3: Testing
Chapter 2.4: Implementation

Main Menu

Page No. 125 of 160


Chapter 2.1 Design

Contents

2.1.1 Hardware Specification 1

2.1.2 Software Specification 3

2.1.3 Data Capture and Screen Layouts 3

2.1.4 Design and Document Reports 13

2.1.5 Data Structures 21

Page No. 126 of 160


Chapter 2.1 Design
2.1.a Hardware Specification
When a solution has been developed, you must be able to clearly specify the hardware needed to implement
the solution.

Suppose you have developed a solution that simply uses a database. Almost certainly all the hardware
needed will be a standard PC. You do not need to specify the keyboard, monitor and mouse. However, you
do need to specify the minimum amount of RAM required to run the solution. Remember, this is not simply
the size of the database. The solution will make use of an operating system and database software as well as
the database itself. If you have run your solution in 32Mb of RAM, then say so. Do not guess that it may
run in 16Mb of RAM as it may not. Specify how much space is needed on the hard disk. You may wish to
state that the database itself takes up 2Mb but another 10Mb is needed for application software. Specify the
screen resolution needed, such as 256 colour or 16-bit high colour, and so on.

You should also specify a CD-ROM drive if your solution is to be distributed on a CD.

If your solution needs specialised hardware, you should clearly describe it. For example, if the system is for
general use, you may need to specify a touch screen, or, if it is for use by those who may have difficulty
using a standard mouse, specify any special input devices such as a tracker ball or switches.

You may have created a solution that requires the use of sensors. In this case clearly specify the type of
sensors a user may need to purchase as well as any interface box that you have used.

Example Question
A programmer has developed a program which allows 11 year old pupils to investigate mathematical
puzzles as well as allowing them to practise mathematical skills. Specify the hardware needed. [3]

Answer
A PC with the following minimum specification is required.

133 Mz Pentium or better


32Mb RAM
2Mb hard disk space
1.44Mb floppy disk drive
Super VGA (800 x 600, high colour (16-bit))

Note that the PC is expected to have a keyboard and mouse. No marks are given for these devices. This
particular piece of software was created on a PC with a 133Mz Pentium processor, 32Mb of RAM and a
super VGA monitor set at 800 x 600, high colour (16-bit). Hence it is known that it will run on this system.
The software is distributed on two 1.44Mb floppy disks, hence the need for a 1.44Mb floppy disk drive.
After the software was installed on a PC, it was noted that 2Mb of hard drive space was needed. The
examiner is going to give a maximum of 3 marks for this question although four mark points are available.
Hence, if you only state three of the above requirements, you will still get full marks.

2.1.b Software Specification


As with hardware, you need to clearly state what software the user will need to use your solution. If it needs
Windows 98, you must say so. If you have used a particular application, such as MS Access, to produce
your database, the user will need to know this because you cannot distribute proprietary software with your
solution.

However, if you have written a program and you have compiled it, so that you are going to distribute a
program that is ready to run, you probably only need to specify the operating system needed.

Page No. 127 of 160


Example Question
Specify the software requirements for the example given in Section 2.1.b [1]

Answer
The only software needed to run the program is Windows 95 or later.

Note that the solution was written in Visual Basic and then compiled. It is the compiled version that is
distributed, hence the need only for an appropriate operating system.

2.1.c Data Capture and Screen Layouts


Data may be captured in many ways, one of which is by means of forms. Form design requires a lot of
thought, it is not simply a list of headings. The order of the headings is important as is the need for clear
instructions on how to complete the form. It is worth collecting some forms and noting the order of the
questions and the clarity of the instructions. Make a note of a few that you think are good and list your
reasons for choosing them. This will help you to design your own forms.

Users should find that the order of entering data on a form is natural. If the full name and address are
required, then keep the forenames and surname close together, do not have surname, address and then
forename. Make sure there is sufficient space for the data required and that the instructions for completing
the form are clear. For example, if the date of birth is required, a good layout is

Date of Birth: D D M M Y Y

or

Date of Birth: D D M M Y Y

Example Question
Design a form to collect personal data about pupils in a Primary school. [5]

First decide what data are needed. Clearly, forename(s), surname and address are needed. But you will also
need the date of birth of the pupil and details of parents/guardians and emergency contact details.

Now you must decide on whether to use free format or indicate the maximum number of characters for each
piece of information. Finally, what should be the size of the form? Should the form be printed on both
sides? Should it be in landscape or portrait orientation?

One solution is given here but there are many good solutions. You will be marked for content, order of data
entry and clarity of instructions. In this solution, A5 paper is used and the form is on both sides of the paper
which is in landscape orientation. Side 1 contains the pupil's details and side 2 the parents'/guardians'
details.

Page No. 128 of 160


HIGH TOWN PRIMARY SCHOOL
Please complete using BLOCK LETTERS

PUPIL'S DETAILS

SURNAME:

FORENAME(S):

ADDRESS:

STREET:

TOWN:

COUNTY:

POST CODE:

DATE OF BIRTH: D D M M Y Y

SEX (Tick one): Boy Girl

Page No. 129 of 160


PARENT/GUARDIAN

TITLE (DR, MISS, MR, MRS, MS, ETC:

SURNAME: INITIALS

ADDRESS( If different from pupil's):

STREET:

TOWN:

COUNTY:

POST CODE:

TELEPHONE:
Please include area code.
EMERGENCY

NAME:

TELEPHONE 1:

TELEPHONE 2:

When the data is entered into a computer system, it may be done by the system asking a series of questions
or by the user completing a form on the screen. In either case, be careful that the screen does not become
cluttered and that it is possible for the user to correct errors. If the system asks a series of questions, it is
easy for the screen to become cluttered. It can also be difficult to correct early errors. The following is a
poor design as the screen scrolls and it is difficult to correct early errors. (The italicised data are entered by
the user.)

A Amend a record
B Add a record
C Delete a record
D Quit

Choice: A

Enter key of record to be amended: SY14

Surname: SAYTH

Do you wish to change this surname? Y


What is the new surname? SAYTHE

Forenames: IMAR ABEEN

Page No. 130 of 160


Do you wish to change the forenames? N

Address: 17 The Mall


Lahore
Punjab
247183

Do you wish to change line 1? N


Do you wish to change line 2? N

Etc.

When designing screen layouts, you should consider very carefully the experience of the user. Most users
for whom you will be writing solutions will be novices, or knowledgeable but intermittent users. We will
consider the needs of the novice user and see how we can modify these for the knowledgeable user who will
only use the solution occasionally.

 The user will not be confident of what the system requires; this means that you must make sure that
the computer makes it clear what is to be done. Thus, all responses should be brief so that users can
remember what is needed.
 Responses should be what is expected and consistent.
 The layout of the screen should have a consistent pattern so that the user can expect to find similar
information in the same part of the screen throughout the use of the software.
 Input should be obvious so that no, or very little, training is necessary.
 Any messages to the user should be clear, unambiguous and jargon free. Use simple English in
which the grammar is correct and sentences are short and to the point. A message to a novice user is
completely different to that of an expert.
 Do not give the user too many options from which to choose (although the more experienced user
can cope with a few more than the novice). Consider using short menus with sub-menus so that the
user is guided through the choices.
 Remember that novice users vary considerably so that some are quicker than others. Let the user
define the pace. If there is a message for the user, make sure that the user can decide when to move
on.
 The user should know naturally when a response is required. Do not create a situation where the
user is left trying to work out what to do next.

We shall now look at a piece of software called Roberta's Diamond. This is an adventure game for 11 year
old pupils. It involves pupils moving through a house and garden to find a stolen diamond. In order to
move, pupils must solve mathematical problems; some of these are easy but some need further investigation.
This means that pupils must be able to save their positions so that they can continue when they have solved
the problem.

Fig 2.1.3.1 shows the initial screen. Most of the screen is taken up by the title but command buttons, down
the left hand side, clearly state what can be done. Here there are only four options.

Page No. 131 of 160


Fig. 2.1.3.1

If pupils choose Start a New Adventure, the screen in Fig. 2.1.3.2 appears. Notice that the left hand window
has hidden two of the original buttons and introduced a new button.

To the right of the command buttons are two more windows. The upper describes the position in the game
and the lower the user input. This is the format used throughout the software. In this case users are told
where they are and then asked a simple question with only two possible answers.

Page No. 132 of 160


Fig. 2.1.3.2

A similar screen is shown in Fig. 2.1.3.3. In this screen the centre of the screen shows the contents of two
list boxes from which the user can take objects. Take and drop are obvious but a user may click one of these
buttons without first choosing what to take or drop.

Fig. 2.1.3.3

If a player does click either Take or Drop, an error message appears. This is shown in Fig. 2.1.3.4. Notice
that this window has a red background to draw the player's attention. It has a simple error message and is
positioned at the bottom of the screen which is where nearly all input occurs. There are two reasons for this.
Firstly, this is where the user will naturally look to input data and, secondly, it prevents the user entering
anything until they have completed the Take or Drop correctly. (All windows, except the error message one,
are disabled at this point so the user has to click the O.K. button in order to continue.)

Page No. 133 of 160


Fig. 2.1.3.4

In order to move, users must solve mathematical problems. One of these is shown in Fig. 2.1.3.5. Notice
that this fills the screen so that the user's attention is concentrated on the problem. Further, the upper part of
the screen gives details of the problem while the lower part is for input. This is consistent with the other
screens. This consistency is very important as it trains the user to look at the correct part of the screen for
information and for entering data. Users should not have to keep searching screens to find out what to do
next. In order to maintain this consistency, you must try to think of all the possible scenarios that may occur
during the running of your solution. You will then be able to design consistent screens.

Page No. 134 of 160


Fig 2.1.3.5

Fig 2.1.3.6

Fig. 2.1.3.6 shows the message that appears when a problem has not been solved. As before, the
background is red and it is displayed at the bottom of the screen.

Page No. 135 of 160


Sometimes a problem needs a diagram. Diagrams are consistently placed in the centre of the screen,
between the description and the input window. This is shown in Fig 2.1.3.7 and Fig. 2.1.3.8. Notice, in Fig.
2.1.3.8, how easy it is to move a disk. With all the screens, if the input has to be typed in, the user may click
the O.K. button or press the enter key on the keyboard. This means that users can use the most natural
method for them.

Fig 2.1.3.7

Fig. 2.1.3.8

Page No. 136 of 160


2.1.d Design and Document Reports
This is an extension of the previous section. However, it is important that reports are appropriate to the
intended reader. For example, suppose a report is required that shows the expenses for four people. Fig.
2.1.4.1 shows the report in the form of a spreadsheet. This enables the user to compare expenses very easily.

B & L Publications

Monthly Expenses for August 2000


rd
Printed 3 September 2000

Travelling Telephone Postage Meals Totals


A. Beans 176.48 83.49 3.45 89.76 353.18
C. Doncaster 298.31 97.52 4.95 187.95 588.73
E. Franks 158.23 76.48 2.50 76.45 313.66
G. Harris 167.41 85.93 3.74 0.00 257.08
Totals 800.43 343.42 14.64 354.16 1512.65

Fig. 2.1.4.1

This is useful if the user wishes to make comparisons or needs detailed analysis. However, this can be very
confusing for some people; also it contains too much detail for the needs of some readers. A graph may be
more appropriate in these circumstances and the data is shown in graph form in Fig. 2.1.4.2.

Monthly Expenses August 2000


Printed 3rd September 2000

350.00
Expenses (£)

300.00
Travelling
250.00
200.00 Telephone
150.00 Postage
100.00
50.00 Meals
0.00
ns

ri s
er

nk
st
a

ar
a
Be

ca

.H
Fr
on
A.

G
E.
.D
C

Employee

Fig. 2.1.4.2

However, in some circumstances the report shown in Fig. 2.1.4.3 is more appropriate.

What should you consider when producing a paper-based report?

 All reports should have a title and any appropriate sub-titles together with an indication of the period
to which the report appertains.
 If the report is in columns, the columns should be clearly labelled.
 If any abbreviations are used, they should be meaningful to the end-user.
 It is important to group information according to the needs of the end-user and to make sure that field
sizes are sufficiently large.
Page No. 137 of 160
 All pages should be numbered but be careful using the system <page number> of (number of pages>
(e.g. 63 of 67) as this can cause problems if a page is deleted or inserted. If this happens the whole
of the report will have to be re-printed.
 Make sure that the report has aesthetic appeal.

B & L Publications
Monthly Expenses for August 2000
Printed 3rd September 2000

A. Beans
Travelling £176.48
Telephone £ 83.49
Postage £ 3.45
Meals £ 89.76
Total £353.18

C. Doncaster
Travelling £298.31
Telephone £ 97.52
Postage £ 4.95
Meals £187.95
Total £588.73

E. Franks
Travelling £158.23
Telephone £ 76.48
Postage £ 2.50
Meals £ 76.45
Total £313.66

G. Harris
Travelling £167.41
Telephone £ 85.93
Postage £ 3.74
Meals £ 0.00
Total £257.08

Totals
Travelling £800.43
Telephone £343.42
Postage £ 14.64
Meals £354.16
Total £1512.65

Fig. 2.1.4.3

Page No. 138 of 160


When designing screen output, you will need to make similar decisions to those made for printed output.
However, remember that screen output is more transient, it is not permanent like a printout. What needs to
be considered for screen output?

 Remember that the size of the screen restricts the amount of information that can be displayed. Do
not try to put too much on the screen at once.
 Use linked screens if there is a lot of information. The first screen should be linked to the next
screen. The second and further screens should be linked to their next and previous screens and
possibly to the first screen.
 Large characters and different fonts can be useful for headings as can the judicial use of colour.
 Do not overdo the use of different fonts and colours; the eye cannot cope with too many changes.

Example Question
Design a report that displays the expenses of the four employees of B & L Publications. The report should
group the data by type of expense not by employee, as in the text. You may use the data given in Fig.
2.1.4.1 to show how the report will look when data is entered. [8]

The marks will be awarded for the following points, up to a maximum of 8 marks.

 The name of the company is shown


 A heading showing the purpose of the report
 The period to which the report appertains
 The date the report was produced.
 Correct grouping
 Suitable indentation
 Sub-totals
 Grand total
 Easy to read and understand

A typical layout is shown in Fig. 2.1.4.4 and again in Fig. 2.1.4.5 but with data.

Page No. 139 of 160


B & L Publications
Monthly Expenses for August 2000
Printed 3rd September 2000

Travelling
A. Beans £
C. Doncaster £
E. Franks £
G. Harris £
Total £

Telephone

Postage

Meals

Totals

Fig. 2.1.4.4

Page No. 140 of 160


B & L Publications
Monthly Expenses for August 2000
Printed 3rd September 2000

Travelling
A. Beans £176.48
C. Doncaster £298.31
E. Franks £158.23
G. Harris £167.41
Total £800.43

Telephone
A. Beans £ 83.49
C. Doncaster £ 97.52
E. Franks £ 76.48
G. Harris £ 85.93
Total £343.42

Postage
A. Beans £ 3.45
C. Doncaster £ 4.95
E. Franks £ 2.50
G. Harris £ 3.74
Total £ 14.64

Meals
A. Beans £ 89.76
C. Doncaster £187.95
E. Franks £ 76.45
G. Harris £ 0.00
Total £354.16

Totals
A. Beans £353.18
C. Doncaster £588.73
E. Franks £313.66
G. Harris £257.08
Total £1512.65

Fig. 2.1.4.5

Page No. 141 of 160


Example Question

Design a set of screens to show the information on the report of the previous example. [8]

Answer
There are many possible answers to this question. The examiner will look for the following points and give
a mark for each to a maximum of 8.

 Title screen
 Screen for each expense and for totals
 Title screen allows movement to next screen
 Each screen, except title screen allows movement backwards and forwards (except last screen)
 Screen of contents allowing movement to each screen of expenses
 Name of business displayed
 Period displayed
 Date of publication displayed
 Every screen is well laid out
 Every screen has a heading with purpose and expense name
 There is an exit button

Figs. 2.1.4.6 to 2.1.4.8 show some of the screens. In this answer a table of contents is used to enable a user
to jump to a particular screen. This is not the only solution.

B & L Publications
Monthly Expenses for

August 2000

3rd September 2000

Conte
nts 
Exit

Fig. 2.1.4.6

Page No. 142 of 160


Monthly Expenses for August 2000
Contents

Travelling

Telephone

Postage

Meals

Title Totals Exit

Fig. 2.1.4.7

Monthly Expenses for August 2000


Travelling

A. Beans £176.48

C. Doncaster £298.31

E. Franks £158.23

G. Harris £167.41

Total £800.43
 Previous Contents Next 

Fig. 2.1.4.8

Page No. 143 of 160


2.1.e Data Structures
This book will not discuss data structures that are available in different programming languages, but will
look at the use of data structures in the design of a solution to a problem. Some languages make it easier to
implement data structures than others. For example, C++ makes it easier to implement a linked list than
does Visual Basic.

You will need to be able to use appropriately the data structures


 arrays,
 linked lists,
 queues,
 stacks,
 files.

The theory relating to these structures is in Sections 1.4.6 to 1.4.9.

During the design stage you do not consider how these structures are to be implemented.

Suppose you wish to simulate people queuing in a supermarket. Obviously, the data structure known as a
queue will be most appropriate. However, keeping a list of books in alphabetic order of author requires a
linked list.

You must be able to state the structure you are going to use and be able to give reasons for your choice.

Example Question
Describe, with the aid of a diagram, a data structure that will hold details of books held in alphabetic order
of author. [6]

Answer
A linked list with each node containing
 title,
 author
 publisher
 ISBN,
 pointer to next node.

The head pointer will point to the first element or will be null if the list is empty.

Each node will have a pointer to the next node except the last, which will have a null pointer.

Head Title Title Title


pointer Author Author Author
Publisher Publisher Publisher
ISBN ISBN ISBN

Pointer Pointer Null


pointer

Page No. 144 of 160


This is an appropriate structure because it is easy to add and delete nodes while preserving the alphabetic
order. This is because only pointers have to be changed.

Up to 4 marks will be awarded for content of each node, up to 3 marks for the diagram (1 for the head, 1 for
nodes and 1 for pointers). Another mark is for your reason. This gives a possible 8 marks, but the examiner
will give a maximum total of 6.

Example Question
Describe a data structure that could be used to undo actions taken while using a piece of software. Give a
reason for your choice. [3]

Answer
A stack is appropriate as it stores data in the order in which it arrives and removes data in reverse order. In
this case the actions of the user are stored as they are done and then, when the user wishes to undo an action,
the last action added to the stack will be popped off the stack and the action will be undone.

1 mark is given for the data structure called a stack; 1 for a description of a stack and 1 for the reason for
using a stack. The examiner will accept a diagram if it clearly shows what a stack is.

Note that in neither answer was a method of implementing the structure in a programming language
mentioned.

Page No. 145 of 160


Chapter 2.2 Application of Generic Software

Contents
2.2.1 Specifying Variables and Data Structures 1

2.2.2 Developing the Solution 5

2.2.3 Develop Inputs and Outputs 7

Page No. 146 of 160


Chapter 2.2 Application of Generic Software
2.2.1 Specifying Variables and Data Structures
In this Chapter you will not be taught how to use any specific application packages nor any programming
languages. However, when it is necessary to provide examples, Microsoft Office , Visual Basic (VB) and
C++ will be used. It is up to you to decide, for each task you are given, which is the most appropriate piece
of software to use to create your solution

Having designed a solution, your next task is to decide what data types to use and how to implement the data
structures.

It is important to use variable names that are meaningful, whether you are using a software package or a
programming language. Further, any objects that you use, such as command buttons, forms or text boxes,
should also have meaningful names.

Consider the spreadsheet shown in Fig. 2.2.1.1.

Fig. 2.2.1.1

The selling price is the cost price times 1 plus the mark up. Figs. 2.2.1.2 and 2.2.1.3 show two ways of
doing this. Clearly, Fig. 2.2.1.3 gives a better understanding of how the selling price has been calculated. In
this case cells B2:B4 have been named Cost_per_100 and cells C2:C4 have been named Markup. This use
of meaningful names makes the spreadsheet much more understandable.

Fig. 2.2.1.2

Fig. 2.2.1.3

The naming of cells is important; you can name individual cells, rows, columns and whole tables.
Remember, someone else is going to mark your work without reference to you. This means that your
solution must be understandable without any help from you personally. Naming cells has another important
advantage. If your solution needs modifying in order to manage new demands, it is much clearer how the
solution has been developed if meaningful names have been used; hence, it is easier to modify the solution.
The use of names also helps to find and correct errors when they occur.

Page No. 147 of 160


Meaningful names should also be used for the attributes in a database. For example, using Name as an
attribute is not very helpful. Is it a person's first name, full name, surname or even surname and initials? If
the database is to hold a person's surname and first name separately then use these terms as the names of the
attributes.

When writing computer programs, the use of meaningful variable names is very important. Further, when
defining variables, not only do you have to give the variable a name, you have to specify its type. Most
programming languages allow the use of many different data types such as integer, Boolean and string.
Some software developers insist on the use of a character in front of a variable name to indicate its type. For
example, all integer names start with the letter i(lower case), all variables of type Boolean start with the
letter b and all string variable names start with an s. Thus we have names like iCount, bFinished and
sFirstName. This naming system is up to you unless it is an in-house requirement.

Some programming languages insist on the declaration of variables before they are used, others, like Visual
Basic, do not. The purpose of the declaration statement is to provide a list of variables that are going to be
used and the type of data that the variable will store. This makes sure that the right amount of space is
reserved for the data and it enables the compiler, or interpreter, to check that you have used the variables
appropriately. In Visual Basic, if a variable is not declared, its type is set to the variant type when it is first
used. This allows the variable to hold any type of data. This has three drawbacks; first it can waste storage
space, second it can make a program very difficult to debug and third it can cause errors when functions are
called which expect a particular data type. Not declaring variables is bad programming practice.

You should specify any variables you are going to use to interpret your design and state their type. Thus,
taking the chocolate bars problem of Chapter 2.1, you need to specify five variables.

 NumOfChildren - number of children who are to share the chocolate bars


 ChocBars - number of chocolate bars to be shared by the children
 Factor - the highest common factor of NumOfChildren and ChocBars
 Cuts - the minimum number of cuts needed
 UserAnswer - the answer input by the user

All this needs to be done before the program is written. When writing the program, these should not only be
declared but the declarations should be annotated. In Visual Basic this would become

Dim NumOfChildren As Integer 'Number of children who are to share the 'chocolate bars
Dim ChocBars As Integer 'number of chocolate bars to be shared by 'the children
Dim Factor As Integer 'the highest common factor of 'NumOfChildren and ChocBars
Dim Cuts As Integer 'the minimum number of cuts needed
Dim UserAnswer As Integer 'the answer input by the user

And in C++ it would be

Int NumOfChildren; //Number of children who are to share the //chocolate bars
Int ChocBars; //number of chocolate bars to be shared by //the children
Int Factor; //the highest common factor of //NumOfChildren and ChocBars
Int Cuts; //the minimum number of cuts needed
Int UserAnswer; //the answer input by the user

Also, when programming a procedure or function, such as HCF of Chapter 2.1, it should be made clear what
the pre-requisites, post-requisites are and what is returned. In this case the function, in Visual Basic, should
start

Page No. 148 of 160


Public Function HCF(Num1 As Integer, Num2 As Integer) As Integer
'Pre: Num1 and Num2 are both defined and both are > 0
'Post: None
'Returns: The highest common factor of Num1 and Num2

When using data structures, clearly specify how they are to be represented. Suppose you have specified a
linked list in your design. You must now decide how you are going to represent it in the programming
language of your choice. In this case you may wish to use a one-dimensional array consisting of data and a
pointer. You can specify this by means of the diagram shown in Fig. 2.2.1.4

Linked list array:

Title Author Publisher ISBN Pointer


1 Data Data Data Data 3
HEAD
2
3 Data Data Data Data 7
4 Data Data Data Data 0
5
6
7 Data Data Data Data 4
8
9
10

Fig. 2.2.1.4

Normally an array has to contain the same data type in all cells. This is why the above is treated as a one-
dimensional array. The point is that each row has the same data type. In this case you will have to define
the data type as it is a compound type. That is, it consists of a mixture of standard data types. In Visual
Basic, this is overcome by using the Type statement and then declaring an array of the Type defined as
shown here.

Type Node 'Node is the name of the data type being defined. It will be the 'type used when defining the
array
Title As String * 50 'Title up to 50 characters
Author As String * 50 'Author up to 50 characters
Publisher As String * 30 'Publisher up to 30 characters
ISBN As String * 10 'ISBN of 10 characters
Pointer As Integer 'Points to next array element in linked list. 0 if end of list
End Type 'Node

Dim MyArray(10) As Node 'An array to hold book details and pointers

Dim Head As Integer 'A variable that points to the head of the list, 0 if list is 'empty

Similar instructions are available in other languages and some languages support linked lists without the
need to resort to arrays. The important thing to note is that the design is completely independent of the
programming language used to implement the design.

Another point to remember, particularly when using programming languages that create default names, is to
change the default names to meaningful names. This is particularly true when using languages such as
Visual Basic or VBA. Having a form with a large number of command buttons named Command1,
Command2, Command3, etc. is not helpful. The examiner does not know the order in which the buttons

Page No. 149 of 160


were created, therefore the examiner has no idea which button is Command1 or Command2, and so on.
Give objects such as command buttons, text boxes, labels and so on, meaningful names.

Fig. 2.2.1.5 is the same as Fig. 2.1.6.8 except that it shows the names used for the labels. Note the use of
prefixes to indicate the type of object being named. This is also a good idea. A complete list of appropriate
prefixes will be found in any good Visual Basic programming book. Some of the most useful ones are given
in the following table.

Object Type Prefix Example Object Type Prefix Example


Check box chk ChkBold List box lst LstBooks
Command button cmd CmdCancel Menu mnu MnuFile
Form frm FrmError Option button opt OptDifficult
y
Image img ImgLogo Picture box pic PicFlower
Label lbl LblTotal Text box Txt TxtAnswer

lblDescription txtAnswer
lblAnswer cmdFinished cmdCancel frmChocolate
Fig. 2.2.1.5

2.2.b Developing the Solution


You must make sure that you produce solutions that are clearly understandable to someone else who may
have to amend your solution at a later date. Solutions have to be amended because some errors do not
appear for a long time after implementation. Also, the needs of the users change and so modifications have
to be made. Sometimes it is possible, with minor amendments, to use the solution to a problem as part of the
solution to another problem. Put yourself in the position of assuming you have never seen the solution
before and ask yourself 'Do I thoroughly understand how this solution works?'. If you can answer yes, you

Page No. 150 of 160


will satisfy the needs of the examiner who will not be able to ask you any questions about your method of
solution.

Remember to supply the examiner with all the information needed to understand your solution. If a
spreadsheet has been used, make sure that you print out the formulae as well as the data. Also make sure
that you print a list of the names you have used and the cells to which they refer as shown here.

Name Cell Reference


Cost_per_100 =Sheet1!$B$2:$B$4
Mark_Up =Sheet1!$C$2:$C$4

If a database has been used, make sure you print out the queries that have been used and details of how
reports have been produced. You will also need to print the tables in order to show the data you have used.

If you have written any code, make sure it is well annotated. Remember, it should be possible to remove all
the code, leaving only the annotation and to still be able to write the code in another programming language.
This applies to all coding, including macros.

Consider the algorithm for finding the highest common factor (HCF) of two numbers.

HCF(Num1, Num2)
'Finds HCF of Num1 and Num2 using recursion
If Num2  Num1 And Num1 Mod Num2 = 0 Then
HCF = Num2
Else
If Num1 < Num2 Then
HCF = HCF(Num2, Num1)
Else
HCF = HCF(Num2, Num1 Mod Num2)
EndIf
EndIf
End HCF

Here is the Visual Basic coding showing the annotation.

Public Function HCF(Num1 As Integer, Num2 As Integer) As Integer


'Pre: Num1 and Num2 are both defined and both are > 0
'Post: None
'Returns: The highest common factor of Num1 and Num2

'Uses recursion
If Num2 <= Num1 And Num1 Mod Num2 = 0 Then
'Num2 will divide exactly into Num1, so Num2 is the HCF
HCF = Num2
Else
If Num1 < Num2 Then
'Swap the two numbers and find HCF again
HCF = HCF(Num2, Num1)
Else
'Swap the numbers, replace Num1 with its remainder after
'division by Num2 and then find HCF of result
HCF = HCF(Num2, Num1 Mod Num2)
End If
End If
End Function 'HCF

Page No. 151 of 160


Remember, annotation is very important; it is what explains the method of solution. In this module, your
teacher will mark your work and it will then be passed to a moderator to check the accuracy of the marking.
The moderator's only view of the solution is what you have printed out. The moderator will not have seen
your solution working. To the moderator, pages of code with no annotation, meaningless variable names
and object names are useless. The moderator will only allow marks to be given if it is clear that your
solution does what you say it does.

2.2.c Develop Inputs and Outputs


You will be expected to implement your input and output designs. You may use your application software
or programming language to develop the interfaces and produce hard copy. Thus, Fig. 2.2.1.5 was produced
using Visual Basic, brought into Microsoft Word, via Print Screen, and then it was annotated. You are not
expected to use a different drawing tool to produce the interface; nor are you expected to draw an interface
by hand.

Having designed the interface, you are expected to implement the input/output part of your solution. In this
example, users are expected to type a number into the text box and to press the enter key or click the
Finished button. They could click the Cancel button. This means that three events must be taken care of.
First, in the text box, users must only be allowed to enter the digits 0 to 9 or a backspace (to correct errors
that they may make); other keys must be ignored. This can be done by attaching the following code to the
text box txtAnswer.

Private Sub txtAnswer_KeyPress(KeyAscii As Integer)

'Only allow digits and backspace


If KeyAscii = 8 Then
'it's backspace so accept it and exit
Exit Sub
End If

If (KeyAscii < 48 Or KeyAscii > 57) Then


'it's not a digit so do not allow it by changing input to null character
'Effectively this means that no character has been entered
KeyAscii = 0
'Warn user of error by bleeping
Beep
End If
End Sub 'txtAnswer_KeyPress

Pressing the Cancel button must show an error message as the problem has not been solved. This is taken
from Roberta's Diamond which does not allow the user to continue unless the problem has been solved. The
code for cmdCancel is given here.

Private Sub cmdCancel_Click()

'The answer is wrong so set the global variable Kitchen to False


Kitchen = False
'Hide this form and return to calling routine which produces message to user
frmChocolate.Hide

End Sub 'cmdCancel_Click


Pressing the Finish button (or pressing the enter key) means that the system must check the user's answer.
The following code causes this to be done.

Private Sub cmdFinished_Click()


Page No. 152 of 160
'Check the answer after trimming any spurious spaces
'CorrectAnswer holds the integer value of the correct answer
'It is a global variable
If Trim(frmChocolate.txtAnswer.Text) = Trim(Str(CorrectAnswer)) Then
'The answer is correct so set the global variable Kitchen to True
Kitchen = True
Else
'The answer is wrong so set the global variable Kitchen to False
Kitchen = False
End If
'Now hide this form
frmChocolate.Hide
'and return to calling routine
End Sub 'cmdFinished_Click

To ensure that the enter key has the same effect as clicking the Finished button the property Default for
cmdFinish has to be set to True.

If you use files for input and output you should clearly specify their format. Suppose a file is to contain the
details of books and for each book the file holds the author's name, title, publisher, ISBN, edition and cost.
Each of these values could be held in a text file which uses a separate line for each value. The format of the
file would then be

Line 1: Author's name string value


Line 2: title string value
Line 3: publisher string value
Line 4: ISBN string value
Line 5: edition integer value
Line 6: cost currency value
Line 7: Author's name string value
Line 8: title string value
Line 9: publisher string value
Etc.

When you create your documentation, make sure you specify the file format you have used and include
printouts of the files.

Page No. 153 of 160


Chapter 2.3 Testing

Contents

2.3.1 Test Strategy 1

2.3.2 Test Data 2

Page No. 154 of 160


Chapter 2.3 Testing
2.3.a Test Strategy
Testing needs to take place during every stage of the development of a solution. This does not only involve
choosing suitable test data. It involves deciding the order of development of a solution and deciding at
which stages testing should take place. It also involves making sure that each stage of the solution satisfies
the criteria laid down initially. In this module, this usually means making sure that you have done exactly
what is requested in each part of a question.
Let us look at the chocolate bar problem again. The steps to be tested are listed here.
 The form appears correctly with all objects in the correct position with the correct captions.
 The text box only accepts the digits 0 to 9 and a backspace.
 The Cancel button notes that the problem has not been solved.
 The Finish button checks the answer correctly.

In examining the first bullet point we see that it involves generating two random numbers. The strategy may
involve first using two fixed numbers with a known answer. This will help to see if the objects are working
properly. We also have to decide when the description of the problem is to be created. In Roberta's
Diamond the description is created when the form is activated by the calling routine. To start with two fixed
numbers were used and, when all the objects appeared to be working, the code was modified so that two
random numbers were generated before the description was created. The numbers were generated when the
form was activated.

The last bullet point involves code that calls a function to calculate the highest common factor of two
numbers. This means that the function has to be tested and the call to it. So we have the following strategy.
 Create the form with its objects.
 Code the Form_Activate procedure to produce the label describing the problem and use two fixed
numbers in order to see that it works correctly.
 Check that the text box will only accept the correct characters (choosing test data will be discussed in
the next Section).
 Check that the Cancel button causes the correct message to be displayed.
 Make sure that the Finish button checks the user's answer properly.
 Replace the two fixed numbers with two random numbers and check that the system still works
correctly.

The Finish button sets a Boolean variable to True or False according to whether the user has correctly solved
the problem or not. The Cancel button sets this Boolean variable to False. The calling program checks the
value of the Boolean variable and then displays a suitable message. This part has to be tested before doing
all the above.
This stage of the testing is called alpha testing. It not only involves defining a test strategy but also choosing
test data. The test data is not chosen until the test strategy is fully defined. Choosing test data is explained
in the next Section.
After alpha testing, the software is sent to prospective users who test it by using it in a realistic environment.
In the case of Roberta's Diamond alpha testing took place at each stage of development and as each module
was added to the system. Beta testing was done by placing the software in several primary schools and one
secondary school, and allowing pupils to use it. The adventure takes between 4 and 7 hours to complete so
the beta testing took several weeks as pupils only spent about ½ hour per week using it in their lunch breaks.

2.3.b Test Data


Let us first look at black box testing. This involves treating the algorithm, or code, (whichever is being
tested) as a black box. That is, we know what can go in and what should come out. We do not know how
the result is achieved. See Fig.2.2.2.1.

Page No. 155 of 160


Algorithm
Test data Or Results
Code

Fig.2.3.2.1

Consider the task of finding the sum of a set of positive numbers that is terminated by a negative number.
We do not know how this is achieved. A possible solution was given earlier, but it is not the only solution.
The table below shows some suitable test data.

Test Data Expected Reason for Choice


Result
2,4,6,-5 12 Valid set of simple data
8,2,0,6,12,-1 28 Does it accept 0 as positive number?
3,7,6,-1.5 16 Does it accept decimal terminator?
3.5,2.8,4.6,-1 10.9 Does it accept decimal fractions?
2,8,4,-0.0000001 14 Does it accept negative number very close to zero?
3,4,1,0.0000001,-2 8.0000001 Does it accept a very small positive number?
5,-1 5 Does it accept single value correctly?
-1 0 Does it accept zero number of positive numbers?
999999,999999,-1 1999998 Does it accept very large numbers?
999999.9999,999999.9999,-1 1999999.99998 How accurate is it?
7,3,8,-999999 18 What happens with a very negative number?

Does this table make sure that the routine always works? No, it shows that it works for the chosen data and
we can make a reasonable assumption that it will work for all lists of positive numbers terminated with a
negative number. It may also show restrictions on the sizes of the numbers that may be used. However,
what happens if we have a list of 10,000 numbers? Does it still work? Clearly we cannot test all
possibilities. We can only choose the data so that we can be very confident that the system works.
Consider the testing of the text box in the chocolate bars problem. Again it is impossible to check all
possible inputs. What happens if a user presses several keys at the same time?
Now let us look at white box testing the following algorithm for the summation problem. In white box
testing we know the method of solution used.

Summation
Sum = 0
Input Number
While Number  0
Sum = Sum + Number
Input Number
EndWhile
End Summation
Now we can see that there is a decision point,
Number  0

This means that we should choose numbers just below and just above zero, as well as zero itself.
Now look at the algorithm shown in Fig. 2.3.2.2
What test data is needed? One possible answer is all the possible values from 0 to 100 say. This is
inconvenient if the marks are all whole numbers and impossible if decimal values are allowed. So we look
at the critical points in the algorithm. The first is

Page No. 156 of 160


0
Mark
 100?

So we try a negative number, a negative number close to zero (e.g. -0.0000001), zero, and a positive number
close to zero (e.g. 0.0000001). Similarly try 100 and two numbers very close to 100, one just below and one
just above. Treat the other decision points in the same way. As you can see, a large number of values need
to be chosen.

Input Mark

0
Mark
 100? No

Yes

Yes Mark
 70?

Output
Distinction No

Yes Mark
 60?

Output
Credit No

Mark Yes
 40?

Output
No Pass

Output
Fail

End

Fig. 2.3.2.2

Page No. 157 of 160


The important point to keep in mind when testing a solution is to devise a test strategy first and then choose
the test data. If a solution is made up from several modules, or procedures, test each module first on its own.
This may involve writing a simple driving routine. This is a routine that simply feeds the module with data
and reports the results. You should then test the main algorithm, or program, each time a module is added to
it to see if the linking works.
Finally, let us consider a routine that expects a five character code consisting of two upper-case letters
followed by three digits. What test data should we use? Here is a table showing you a possible set of test
data.

Test Data Expected Result Reason for Choice


AB123 Accepted Simple valid case
aB123 Rejected Lower-case in position 1
Ab123 Rejected Lower-case in position 2
ab123 Rejected Lower-case in positions 1 & 2
A123 Rejected Too few letters/characters
AB12 Rejected Two few digits/characters
ABC12 Rejected Invalid character in position 3
AB1C2 Rejected Invalid character in position 4
AB12C Rejected Invalid character in position 5
AB1234 Rejected Too many characters
A12345 Rejected Too many characters/too few letters
?B123 Rejected Invalid character in position 1
A£123 Rejected Invalid character in position 2
AB%23 Rejected Invalid character in position 3
AB1&3 Rejected Invalid character in position 4
AB12( Rejected Invalid character in position 5

Clearly it is impossible to check every possible combination. We have not checked for all upper-case letters
nor for all digits. Neither have we checked that all characters other than upper-case letters and digits are
rejected. We simply have to choose data that makes it reasonable to assume that the solution works
correctly.
When choosing test data in the examination, the examiner provides hints. Sometimes the examiner
specifically states the number of pieces of data expected. On other occasions the number of marks for the
question gives the clue. If there are 10 marks, for example the examiner is expecting 10 pieces of data.

Page No. 158 of 160


Chapter 2.4 Implementation

Contents

2.4.a Test a software solution 1

2.4.b User Instructions and technical documentation 2

Page No. 159 of 160


Chapter 2.4 Implementation
2.4.a Test a Software Solution
When documenting your test strategy and test data, you must show that your solution does what you say it
does. It is not sufficient to produce a table showing a list of test data, expected and actual results. Create a
table, with each row numbered, and then produce hard copy evidence that each test does what you say it
does. This output, which may be screen dumps, should be numbered so as to match the rows of the table to
the outputs. Always give reasons for choosing the test data.

In this module you may be asked to use data to show the output of a given routine.

2.4.b User Instructions


User documentation should first specify the minimum hardware requirements. This was discussed in
Section 2.1.1. Next you should specify the software requirements. This was discussed in Section 2.1.2.
You then need to explain how to load your software. If it simply means loading your software because it is
a compiled program, then say so. However, if it is, say, a spreadsheet solution, state how to load the
spreadsheet application package and then how to load your spreadsheet solution.

The rest of the document depends on how you decide to supply instructions for the user. If you are going to
explain everything in hardcopy format, you should have a separate section for each facility in your solution.
Instructions should be simple, using short sentences and avoiding computer jargon. Make sure that the
grammar is accurate and check the spelling. It is important to include screen dumps in each section so that
the user can see what to expect. You should include, in your documentation, a section that explains error
messages and what to do if one occurs. Always make sure that the user knows what to do next.

Another way of providing help is by means of on screen help. In this case you should, in hardcopy form,
explain to the user how to access this help. The moderator will expect you to include screen dumps of your
help screens so that your teacher's marking can be validated. It is a good idea to provide a completely
separate section in your work for user documentation. Many candidates make up a little booklet, in A4 or
A5 format, which is clearly titled 'User Documentation'. Make sure that, if you are using help screens, you
keep these screen dumps separate from the user documentation. They are only to show the moderator that
you have implemented the help screens.

In the user documentation, or in the help screens, you are not expected to explain how to use the keyboard,
mouse or any other standard piece of hardware. However, if you used a piece of specialist hardware such as
sensors, you must explain how to set up the hardware so that it can be used correctly. Similarly, you are not
expected to give instructions of how to use any standard interface such as Windows. For example, do not
explain how to use scroll bars, icons, or any other standard tools. When you have written your user
documentation, produce a contents page to be included at the front of the document. You will need to
number your pages. The other type of documentation is technical documentation. This is the information
which is supplied to the person who is going to maintain the system that has been produced. This section of
work is discussed in detail in section 1.7.

Remember, in this module you will be given structured practical computing tasks. You are not asked to do a
project. This means that when you hand in your solutions you should number your answers clearly and put
them together in a folder in numeric order. The solution to each question, or part question, should start on a
new page. Do not put each piece of paper in a plastic pocket. If you do, and the pockets become separated,
it is very hard to put them back in the correct order. It is a good idea to not only number the solutions but
also to number the pages. A contents list at the start is also very helpful. Use a word processor to write your
solutions where appropriate and use a spell checker to ensure the accuracy of your spelling. Marks may be
deducted for poor grammar and spelling. Finally, remember that the moderator will only see what you have
handed in on paper. This means that he, or she, will only award marks for what you have included in your
folder. You must not send disks to the moderator as they are not acceptable as evidence of work carried out.

Page No. 160 of 160

You might also like