You are on page 1of 82

1: Introductory Computer Systems, Communications and Software

1.1 - Components of a computer system and modes of use


1.2 - System software
1.3 - Programming tools and techniques
1.4 - Data, its representation, structure and management
1.5 - Hardware
1.6 - Data transmission and networking
1.7 - Systems Development Life Cycle
1.8 - Choosing Applications Software
1.9 - Handling of Data in Information Systems
1.10 - Designing the User Interface
1.11 - Characteristics of Information Systems
1.12 - Implications of Computer use

1.1.a and b Hardware and Software Definitions


1.1.ab - Hardware and Software definitions
1.1.c - Different software types
1.1.d - Modes of computer system use
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.

* 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 ar
e carried out.
* An output device is any piece of hardware that allows the computer processor t
o convey information or the results of its processing. There is no point in havi
ng a computer system carrying out processing of any sort unless the results of t
hat processing can be either reported or used to effect future input to the syst
em.
* 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 b
ecause data must be saved for future use if the processor is switched off and fo
r 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 pro
grams. 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 piec
es of hardware communicate with each other and for monitoring the way that the h
ardware of the system is used.
* User interface software is used to provide a method of communication between t
he 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 unders
tanding human language. The translator software provides the computer with the e
quivalent of a Chinese-English dictionary so that it can look up what things mea
n.
* Utilities, or utility programs, are system programs designed to carry out comm
on tasks; for instance the programs that control output to the printer or the st
orage of data.
* Programming languages are used to write sets of instructions that the processo
r can understand because it has a translator for that language. There are many d
ifferent 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 worth
while 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, i
t is useless if it does not know what to do. Computers need specific instruction
s for even the most trivial of tasks. If a computer user had to supply these ins
tructions there would be very few people able to use one. Consequently, the manu
facturer 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 resp
onds 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 sys
tem or that are available to the user within an operating system. An example tha
t 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 f
ails.
* Some frequently used routines are stored in such a way that they are accessibl
e to users. These routines are stored together in a system library, and form par
t of the system software. This is something of a grey area between system softwa
re and application software because application software also gives access to li
brary 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 w
ill 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 tha
t it makes the computer do something that is useful for the user. Word word-proc
essing software, or Paintbrush graphics software are both examples of applicatio
ns software because they both allow the user to produce something that is of gen
eral 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 proc
essor is a piece of generic software.
If the software contains programs that allow lots of different tasks to be carri
ed out, together with a book of instructions telling the user how the software s
hould 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 m
ove 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 dr
awing, 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 hard
ware, it is also possible to change it by altering the programs that are being u
sed to control it.
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 cours
e. 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 th
at need to be done on a computer that take lots of time to do and stop the compu
ter doing other things. Big jobs that can be made to wait are put together in a b
atch 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 e
mployees, but at night time it is used very little. The bank statements that tak
e a long time to print out are collected together and sent through the system at
night time when the computer is free.
2. Real-time processing.
A real-time processing system is one which makes decisions quickly enough to eff
ect the next input. For instance, if you are playing a computer game where you a
re 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 yo
ur 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 yo
u are reading this on a stand alone computer then you are probably on-line becau
se your commands are being dealt with by the computer system as soon as you inpu
t 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 a
t a keyboard is stored on a disk before being input to the processor later, is a
n off-line system.

1.2: System Software


1.2.a Operating Systems
1.2.b Types of operating systems
1.2.c Types of user interface
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 exec
uted.
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 t
he 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 co
mputer hardware, you are communicating with the operating system. Without an ope
rating system, no matter how many programs you have, the computer is useless. Th
e operating system sits between the hardware and the application program or user
.
Programm
er

User

Applications
package
1.2.b Types of Operating System
Batch Processing:
When computing was still a new science, there were not enough machines to satisf
y the demand for processor time from students in universities who wanted great c
alculations done, firms who wanted their payroll worked out, and many others. Th
e 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 solutio
ns to this problem, one is to buy more machines and the other is to make the mac
hines work more effectively by taking away the slowest part of the system the hu
man 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 b
etween the user and the processor during the execution of the work. Lots of prog
rams that need to be run are collected together (to form a batch) and they are s
ent to the computer. The batch operating system then controls their passage thro
ugh 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 h
as available processor time
* the application does not require human intervention.
Typical examples of applications which would be done using batch processing incl
ude production of bank statements from customer files, production of gas (electr
icity, telephone) bills from customer records, the compilation of high level lan
guage 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 so
me 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 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 proc
ess, it might mean that the reaction is corrupted in some way. A robot trolley i
s controlled by a processor which takes input from a sensor following a black li
ne 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 tro
lley would very soon leave the black line because it would not be steering quick
ly 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 i
n the store.
If there was only one left of a certain item, it would be necessary to record th
e fact that a shopper had bought it before the next shopper has their request de
alt with otherwise the second person might be sold the same item. Because the in
formation 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 w
hile it is waiting to be asked to do something. This implies that the computer w
ill 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 cont
rol a system which has only one user, and their programs, at any one time. A per
fect 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 simultan
eously. On a simple single user system you will probably be used to having a num
ber of things running at the same time. Perhaps one window shows a spreadsheet w
hile another shows a word processing application. You may decide to copy the she
et 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 simult
aneously. There are two types of multi-user O.S.:
1. A network system comprises a number of computers linked together for the purp
oses 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. Netwo
rks 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 conn
ected up to a number of terminals. These terminals are not computers as in the c
ase of the network system, but have a very limited amount of processing power. A
gain, such a system allows communication between users on the system and also al
lows sharing of hardware and software across the system.
At the moment it is difficult to tell the difference between the two types of mu
lti-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 distribute
d 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 syste
m 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 singl
e bottle neck which all the information must pass through.

1.2.c Types of User Interface


A computer is used by a person who needs to communicate with the machine in orde
r 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 diff
erent types of interface, which are useful in different situations and for diffe
rent types of user.
Form based
If the majority of the input to a system is of a standard type, in other words t
he computer knows what sort of input to expect, then a typical interface will pr
oduce 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 ov
er 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 mat
erial like the date or the sex of the customer, and areas to be filled in with t
extual 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 inserte
d
* 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 t
o the next.
Menu based
Menu based interfaces are used in situations where the operator tends not to kno
w 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 mad
e 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 pop
ular 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 d
ifferent price bands, and finally a list of all the available properties that ma
tch 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, mean
ing 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. Th
ere are many different types, but the user would expect to be able to view diffe
rent 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 op
tions 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 sor
t 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 quest
ions which elicit a response which gives the user the impression that they are t
alking to the computer. The trick is that the system restricts itself to questio
ns to which the only sensible answers are the ones that it knows. If the user le
aves the expected responses, a message is produced which makes clear that a furt
her attempt is required.
Command line
Or command based interface is one where the user types a series of commands at t
he 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
* 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 s
ystem

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 o
ther types of interface. Other interfaces restrict the options that the user has
available to them. This can be particularly important for the system manager be
cause different users can only be allowed to have access to specific parts of th
e 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 co
mmands and their uses but you also need to understand something about how the co
mputer operates, particular how information is stored.
There are many other points to be made about interfaces, especially the fact tha
t 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 appropria
te stage is reached in this course.
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

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, w
hich 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 fou
r 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 follo
wed, the answer should be worked out. This is a prose solution to the problem be
cause the answer is given as though it is spoken language. While it is a perfect
ly 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 sol
utions 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 thi
s 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 e
fficient than others, but if they work out the answer to the problem then that s e
nough. A simple algorithm like this can sometimes be expressed as a single formu
la.
2. There are two things that have to be done to produce an algorithm to solve th
is problem. We have to times by two, and we have to add the length and breadth t
ogether. However there is one further factor, they must be done in the right ord
er or the answer will be wrong. This leads to another way of writing down an alg
orithm: 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 instruct
ion to the next

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 y
ou 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 likel
y to be far more complex than the calculation of the perimeter of a rectangle. A
n algorithm like that is easy for a human being to be able think about because i
t is so short, however, most useful problems involve such complex algorithms tha
t it is not possible to consider them in one go. For this reason problems are no
rmally divided up into a number of smaller problems, each one of which can be so
lved 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 comput
erising a set of traffic lights in the centre of a town. The problem is a very c
omplex 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 pro
blems has been solved the solutions are combined to produce a solution to the wh
ole 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 simul
taneously, consequently the problem should be solved more quickly.
* Different people are good at different things, so our company uses Aisha to so
lve 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 usi
ng a computer, so he does the processing module.
* Last month, our company produced a similar solution for a set of traffic light
s in a different town. The sensors used were different, so Aisha still has to pr
oduce her module, and the number of roads is different so Leon will still need t
o come up with a solution for his module. However, the lights and other output d
evices being controlled are the same, so we might as well use the same module th
at 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 the
y 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 mistake
s. 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 sh
ould be more reliable when it is being used.
One way of describing the modularisation of a problem is to use a diagram to sho
w how the parts fit together. Don t worry about such diagrams at the moment, we wi
ll meet them again in module 3 and they will become important when we want to ex
plain the solutions of the major project in module 4 of this course.

If we imagine the same problem, and start with a control module, then realise th
at 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 fin
al outcome has not been considered and may not be arrived at by the most efficie
nt algorithm.

1.3.c Programming Constructs


As we saw in the first section of this module, the solution to a problem can oft
en 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 pro
blem should have been solved. Looked at diagrammatically, a computer program cou
ld 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 a
re 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 thin
gs in common. The first is some sort of pointer that sends control of an algorit
hm 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 no
rmal sequence of instructions is followed.
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 o
f 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 befo
re there is the chance of meeting the condition.
b) The second loop structure is a WHILE ENDWHILE loop. This structure has the cond
ition at the start so that it is possible to miss out the instructions in the lo
op entirely.
(Condition not m
et)
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 prede
termined 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 determin
ed before entry into the loop.

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 mod
ules 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 m
odules separately and then connect them together to make the whole program. Thes
e small segments of program are called procedures and functions. To start with w
e 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 o
rder. 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 dia
gram 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 throu
gh, runs a procedure to carry out a particular task, which itself runs another p
rocedure. 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 ca
me from in the first place. This means that the computer must remember whereabou
ts 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 the
m later.
A procedure could be used for putting a menu on the screen, and then another cou
ld be used for reading the choice made and acting upon it. At some point a proce
dure could be used to work out the square root of a number. This is slightly dif
ferent because the result at the end of the procedure is a value which, presumab
ly, 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 pr
obably be difficult enough to follow without the language being difficult as wel
l. Computer languages like this, that the person finds easy to understand, but t
he 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 pro
gram is written in a high level language and the computer can only run it in mac
hine 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. A
fter the source code has been translated the program is called the object code (
or executable form).

Translator

The object code is normally much bigger than the source code because it takes lo
ts 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 cal
led 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, aft
er all they are very complicated. There are three types of error which can be ma
de when program code is being produced.
1. Syntax errors. These are errors in the use of the language. The rules have be
en broken. A command word might be PRINT. If it was typed in as PLINT the transl
ator 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 tran
slator to translate it, a message will be returned saying that a mistake has bee
n made and telling the programmer which word it cannot recognise. There are othe
r ways of breaking the rules, for instance a language might be set up to only ac
cept a mathematical formula if it is in the form of a variable followed by an eq
uals sign and then a collection of variables. So X = 3*(2+A) would be accepted b
y the translator, but
3*(2+A) = X would be rejected as an error even though, mathematically, it is ide
ntical.
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 pa
rt of the program. If it tells the computer to go to the wrong place, it is high
ly unlikely that the program will produce the results that were expected. Unfort
unately, 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 h
as been made, and even when the programmer realises that something has gone wron
g, 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 create
d when inappropriate arithmetic is used. A good example is when a computer is as
ked 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 ma
king sure that no mistakes have been made. A schedule should be drawn up which c
ontains a test for every type of input that could be 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 value
s and values which are not acceptable. For example, if a program is written whic
h uses marks out of 100 from a maths examination as input, the test data would i
nclude 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 possibl
e 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 con
dition statements and loops, white box testing is rarely carried out exhaustivel
y.
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 t
est 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 t
he 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 sp
ecialists did not find.
Testing carried out by the users of the program is called beta testing. If you c
ontinue the course next year, in order to turn your AS grade into an A level, yo
u will have to write a project. This involves using a computer to solve a proble
m 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 p
ersuade 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 c
orrecting the error, this is normally fairly straightforward because most errors
are caused by silly mistakes. The second problem, however, is much more complic
ated, the errors have to be found before they can be corrected. Finding where th
e error is, identifying it, can be very difficult and there are a number of tech
niques 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 lo
oked at separately by the translator. Each command will have a special word whic
h says what sort of command it is. The translator looks at the special word in t
he command and then goes to its dictionary to look it up.

The dictionary tells the translator program what the rules are for that particu
lar 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 f
ollowed 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 d
etailing 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 wor
k properly. Debugging tools are part of the software which help the user to iden
tify 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 programme
r check to make sure that the same variable has not been used twice for differen
t things.
b) Traces. A trace is where the program is run and the values of all the relevan
t variables are printed out, as are the individual instructions, as each instruc
tion is executed. In this way, the values can be checked to see where they sudde
nly change or take on an unexpected value.
c) Variable dumps. At specified parts of the program, the values of all the vari
ables 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 pro
gram instructions manually, keeping track of the values of the variables. Most c
omputer 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 suspec
ts 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 combin
ed they would produce a solution to the original problem. Because we are startin
g 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 separat
ely, allowing the small programs to be tested thoroughly before being combined.
This is called bottom-up programming. The technique is particularly useful for t
esting the finished program because it is far easier to test a lot of small prog
rams 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 ens
ure that all the elements of a solution are tested, and that unnecessary duplica
tion 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 pro
gram 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 particu
lar chain of events occurs that means that the software does some instructions i
n an order that has never arisen before, and an error occurs. Someone has to fin
d the error in the program. Some time later, the warehouse expands in order to d
eal with an increased supply of goods and the computer system needs to be amende
d 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 unde
rstanding 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 thoug
ht 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 construc
ts 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. I
t simply tells the computer that anything that comes in this instruction is to b
e ignored.
A further technique is to use sensible variable names. If an input is required a
t some point in the program, and the input is the number of marks that the stude
nt 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 lookin
g 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 se
lf-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-d
own design which enables the individual procedures to be easier to understand th
an one large program.
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

1.4.a Number Systems and Character Sets.


Counting is one of the first skills that a young child masters, and none of us c
onsider counting from 1 to 100 difficult. However, to count, we have to learn, b
y heart, the meanings of the symbols 0,1,2 9 and also to understand that two ident
ical 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 no
t 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, wh
ich 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 a
ll the symbols needed, but we still use a system based on sixties today: 60 minu
tes = 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 th
e system will be easier to use.
A computer is an electronic machine. Electricity can be either on or off. If ele
ctricity is not flowing through a wire that can stand for 0. If electricity is f
lowing, 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 get
s bigger numbers.
This system, where there are only two digits, 0 and 1, is known as the binary sy
stem. Each wire, or digit, is known as a binary digit. This name is normally sho
rtened 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 t
he alphabet. These are stored as codes which look like binary numbers. For insta
nce 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 c
haracters so they only use a few bits for each character. The number of bits nee
ded 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 commu
nicate 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 memo
ry 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 th
an that used in ASCII.
Notes: All the characters that a system can recognise are called its character s
et.
ASCII uses 8 bits so there are 256 different codes that can be used and hence 25
6 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. Im
agine 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 m
emory, 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 fr
om 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 st
ored by the computer as binary numbers using a whole number of bytes. It is usua
l 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. Some
times it is necessary to store negative integers, these have to be treated as di
fferent 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 th
e 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 com
es first). However, 2.3 and .23 will now both be stored as .23 so we need an ext
ra piece of data to be stored, the number of places the point has had to move. F
ractions, 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). Becau
se the first stage is always to move the point to the front of the number, and i
t is like the point floating to the top , fractions are stored in FLOATING POINT fo
rm.
Obviously there is a lot missing from this explanation, but that is more than en
ough for this part of the course. Simply remember that fractions are stored in b
inary with the point at the front, and then a separate part is the number of pla
ces 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 infor
mation 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 da
ta.
A simple example of its use would be in the control program for an automatic was
hing 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 i
t 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 considere
d 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 d
ata types are Date/Time and Currency. The computer has simply been told the rule
s 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 u
se in databases. Such data types are fundamentally different from the others men
tioned here because the others are characterised by the operating system while t
hese two are set up by applications software.
Characters
A character can be anything, which is represented in the character set of the co
mputer 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 pie
ce 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 l
ocation 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 remem
bered.
Far more sensible would be to force the computer to store them all together usin
g 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 obvio
us that they are all peoples names and that they are distinguishable by their pos
ition 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 t
hat it can reserve that amount of space in its memory, otherwise there may not b
e enough space left when you want to use it. This warning of the computer that a
n array is going to be used is called INITIALISING the array. Initialising shoul
d 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 know
s 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.

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 it
ems. It would be far more useful if each student had a number of pieces of infor
mation 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 di
mensional array. Obviously everything gets more complicated now, but don t worry a
s 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 i
t the position to place it in e.g. NAME$(11) = Rashid will place Rashid in posit
ion 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 ques
tion
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 pro
vided it can get the data back. In order to get the data back, each of the locat
ions where the data is stored is given an address so that if the computer can re
member 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 twen
ty people in the set could all be found by the one reference to NAME which point
ed 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
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 b
y 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 a
ddress of the new one. That sounds very complex, the idea is simple if we look a
t 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 lis
t 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 add
resses are called pointers, the last one of which has to be one that cannot poss
ibly 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 sig
ht 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 fi
t 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 t
he item is not there and end.
5. Go to step 2.
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 exampl
e
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. Imag
ine Zaid, Iram, Sahin and Rashid send jobs for printing, in that order. When the
se 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 o
ther data we have been talking about, in an array. The jobs are put in at one en
d and taken out of the other. All the computer needs is a pointer showing it whi
ch 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 n
ext 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 S
ahin 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 r
each the end of the array. The queue does not have to be held in an array, it co
uld be stored in a linked list. This would solve the problem of running out of s
pace 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 w
as put on. This would be a grossly unfair queue because the first one there woul
d 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 ne
xt 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 point
er, 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.

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, o
r 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 dat
a 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 st
udents, this large quantity of data is called a FILE.
Each student has their own information stored. This information refers to a part
icular student, it is called their RECORD of information. A number of records ma
ke 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 u
p 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 b
e different in most of the records. The data that goes in a field is called an I
TEM of data.
Note: Some fields may contain the same items of data in more than one record. Fo
r 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 ad
dress 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 c
ontain different data in all the records. Because of this quality, that particul
ar 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 exampl
e the records would contain a field called school number which would be differen
t for each student.
Note: Iram Dahar is 10 characters (1 for the space), Pervais Durrani is 15 chara
cters. 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 re
cords is assigned a certain amount of space the records are said to be FIXED LEN
GTH. 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 w
ould be sensible to be stored in that situation.
e.g. A teacher is taking 50 students on a rock-climbing trip. The students are b
eing charged 20 dollars each and, because of the nature of the exercise, their p
arents 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.

Answer.
The fields necessary will be Student name, Amount paid, Emergency telephone numb
er, Form (so that contact can be made in school). There are other fields that co
uld 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 wi
ll be and also to decide how many characters will be allowed for the data in tha
t 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 a
nswer, 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 e
xample currency may be better. As you get to learn about other data types you ma
y well be able to consider better ones still.
Many students expect that the emergency number should be an integer, but phone n
umbers, in Britain, start with a 0, and integers are not allowed to. If most num
bers do start with 0, the computer can be programmed to put the 0 in at the star
t of the rest of the number, but you would have to say this in your answer. As w
e are not going to do any arithmetic with these numbers, why make life more comp
licated than necessary.
3 characters were allowed for form. If in doubt, give an example of what you mea
n 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 necessa
ry 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, s
o 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 f
ile it is, is it protected in any way?

These sort of extra pieces of information are known as overheads, and it is usu
al 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 fil
e.
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 appr
oximation anyway. If you gave the final answer as 2 (approx) then that is just a
s acceptable. Just make sure that you write down somewhere that you know that th
ere are 1024 bytes in a Kbyte, otherwise you can t be given the mark for knowing t
hat.

1.4.i Access Methods to Data


Computers can store large volumes of data. The difficulty is to be able to get i
t back. In order to be able to retrieve data it must be stored in some sort of o
rder. Imagine the phone book. It contains large volumes of data which can be use
d, fairly easily, to look up a particular telephone number because they are stor
ed 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 th
at 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.
Serial access.
Data is stored in the computer in the order in which it arrives. This is the sim
plest form of storage, but the data is effectively unstructured, so finding it a
gain can be very difficult. This sort of data storage is only used when it is un
likely 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 a
re 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 se
ction 1.4.l.
Sequential access.
In previous sections of this chapter we used the example of a set of students wh
ose 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 ha
s 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 st
art looking at the beginning of the file, but at the end, and consequently it sh
ould 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 l
ook up a particular name will still take a long time even though it is being hel
d 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 s
earched alphabetically in sequence. This type of data storage is called Index Se
quential.
Random access.
A file that stores data in no order is very useful because it makes adding new d
ata or taking data away very simple. In any form of sequential file an individua
l 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 so
me 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 c
an work out where that data is stored. In other words, the user asks for Jawad s r
ecord and the computer can go straight to it because the word Jawad tells it whe
re 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 p
ut into practice. There will not be a lot of detail, and some questions will rem
ain 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 re
cord 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, al
l the records that come after it have to be moved in order to make space for the
new one.
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 a
nd Khurram. To do this all the other records have to be moved down one place, st
arting 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 consequentl
y 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 i
nto 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 approximatel
y 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 t
he 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 wi
ll be 100 indexes at the second level.
Each of these indexes will have 100 options to point to, so there will be 10,00
0 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
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 arithm
etic because it doesn t make much sense) on the data that is being searched for.
E.g. imagine that you are searching for Jones data.
The rules that we shall use are that the alphabetic position of the first and la
st 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 mem
ory.

This algorithm is particularly simplistic, and does not give good results, as w
e 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 wor
k down sequentially until there is a free space. So the computer would inspect a
ddress 41, and if that was being used, 42, and so on until a blank space. The al
gorithm 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 a
lgorithm 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
Jaheed = 10, 01, 08, 05, 05, 04 giving an address 100108050504
The problem of clashes has been solved, but at the expense of using up vast amou
nts 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 obvi
ously not acceptable. The trick in producing a sensible hashing algorithm is to
come up with a compromise that minimizes redundancy without producing too many c
lashes.

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, the
re 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 othe
r), but there are two others that are useful. Currency data is, as the name sugg
ests, set up to deal with money. It automatically places two digits after the po
int and the currency symbol in. The other is date, this stores the date in eithe
r 6 or 8 bytes dependent on whether it is to use 2 or 4 digits for the year. Car
e should be taken with the date because different cultures write the three eleme
nts of a date in different orders, for example, Americans put the month first an
d 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-conte
ntious. E.g. Jobs are sent to a printer from a number of sources on a network. S
tate a suitable data structure for storing the jobs that are waiting to be print
ed giving a reason for your answer.
Answer: A queue, because the next one to be printed should be the one that has b
een 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 accoun
ts because the hard disk crashes, then the bank is out of business.
It makes sense to take precautions against a major disaster. The simplest soluti
on 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 co
py 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 righ
t answers, but there are wrong ones. It all depends on the application. An appli
cation that involves the file being altered on a regular basis will need to be b
acked up more often than one that is very rarely changed (what is the point of m
aking another copy if it hasn t changed since the previous copy was made?). A scho
ol 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 origi
nal file because the original file keeps changing. If a back up is made at 9.00a
m 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 sa
me, 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 l
og and it can be used to update the copy if the original is destroyed. This tran
saction 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 st
orage of the data and is the best example of a serial file if an examination que
stion 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 rea
sons 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 neede
d in the future should be copied onto long term storage medium and stored away i
n 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.

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

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 s
howing how the various parts of the processor are connected up and communicate w
ith each other do not appear in the syllabus until next year. The requirements o
f 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 instr
uctions are in a particular order in the program, and following them, and carryi
ng them out, will mean that the computer has accomplished whatever task it was m
eant 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. Thi
s 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 ne
eds 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 i
nstruction 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 arithme
tic).
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 pro
cessor 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 ne
eded 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 k
now, 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 pr
ocessor 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 proce
ssor 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 t
hat is advertised as being 128 Mbytes of RAM . This simply describes the capacity o
f the memory.
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 compute
r off will not effect the contents of the ROM. There is very little that needs t
o 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 sys
tem to replace the one in use, you can t because the computer can t delete the old o
ne. When the computer is turned on it would be there. For this reason the operat
ing system is stored on the hard drive of a computer along with all the other pr
ograms 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 pr
ogram is stored on ROM whose job it is to go and get the operating system from t
he hard drive so that the computer can work. This little program is called the b
ootstrap, 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 opera
ting system) and the data that is being used with those programs. When the compu
ter is switched off all this data is lost. RAM is said to be volatile memory bec
ause it is so easily changed, whereas ROM is non-volatile because it cannot chan
ge.

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 ha
ve no need to learn about any of them, in fact it is probably better not to unti
l 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 d
ata 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 i
s not in the course) is another problem. The BIOS itself includes user defined p
arameters 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 a
dvised 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 stor
es data that are in current use because the control unit does not have direct ac
cess 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 nee
ded is something that is less temporary in nature and that does not have the sam
e restrictions as far as size is concerned. This will be memory outside the proc
essor. It is called secondary storage.
There are a number of different types of secondary storage that can be categoris
ed according to
* Means by which the data is stored, optically or magnetically
* The technique used for storage of the data, sequential storage or direct acces
s 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 necess
ity, sequential which makes it largely unsuitable for most data handling applica
tions. However, large volumes of data can be held and the medium is freely trans
portable. These qualities make it valuable for producing back up copies of files
stored on a computer system.
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 micro
computers having a floppy disk drive. It is also convenient for storing those fi
les that are particularly confidential because the files cannot be broken into i
f they are being carried by the owner, or locked away in a safe. Despite being d
irect, access times are slow because of the limited speed of rotation possible a
nd 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 t
he 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 rotat
e faster, the heads can get closer to the surface meaning that the storage densi
ty can be greater, consequently that the amount that can be stored is greater an
d 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 stor
ed 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 C
D 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 mentio
n. 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 wo
rk on microcomputers. DVD is a relatively new technology that will probably repl
ace CDROM as it can store much larger quantities of data and allow access at hig
h speed. For the purposes of the syllabus, the original 4 types of secondary sto
rage 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 po
int of development so far reached. If the author were to quote a number, not onl
y would it be wrong as far as this work is concerned because there is such a wid
e range, but it would certainly be out of date by the time you read it. In gener
al terms the tape streamer is the slowest access because of the way that the dat
a is stored sequentially, then comes the floppy disk which suffers because of th
e 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 availabl
e, 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 stre
amers come in different sizes, but tend to be comparable in capacity with smalle
r hard drives. Of the different types of disk, a reasonable analogy is that a fl
oppy would store the text from a book, a CDROM would store a multi volume encycl
opaedia, while a hard drive could store a library.
Uses.
Obviously, no list of uses will be complete. However, there are some obvious use
s for each storage type which take into account the advantages and disadvantages
of each.
A Tape Streamer is used for making backups of files held on computer systems. Th
is makes use of the fact that it can store a large amount of data, but the disad
vantage of the access being slow does not matter because it is rare that a backu
p 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 driv
e 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 s
oftware 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 disadvantag
e 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 impor
t to a system and large reference files like encyclopaedias.

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 th
e 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. Sometime
s 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 di
rection 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 da
ta travelling freely in both directions.

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

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 o
r 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 trans
fer 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 t
o 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 t
hen get on with something else while the storage device takes its time in readin
g (or sending) the data. This small amount of memory between the two parts of th
e system is called a buffer.
Stage One: Filling the buffer from the processor

Stage Two: Emptying the buffer to 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 u
nit) 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 buffe
r up with more data. Because this message from the secondary device makes the pr
ocessor stop what it is doing it is called an interrupt. When the processor rece
ives 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 de
vice.
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, b
ut 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 complica
tions 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 p
rocessor 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 de
tail in section 1.6.b.
2. Storage devices.
These devices, which provide for secondary storage in a computer system, have be
en described in section 1.5.c.
3. Input devices.
There are too many different input devices to expect familiarity with all of the
m. 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 o
ther input devices with the following exceptions. There are some devices that ar
e so common that any candidate taking an exam in computing can be expected to ha
ve experience of using them, e.g. mouse, keyboard.

Additionally, candidates should be encouraged to learn about a variety of conte


mporary devices so that they can use them when answering questions that ask for
a hardware configuration for a specific application.
a) Keyboard. A standard keyboard uses keys that stand for the different characte
rs 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 character
s needed for specialist use machines are determined by the use to which the mach
ine 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. Fir
st, the arrangement of characters comes from the original typewriter whose keybo
ard was arranged to be the most difficult to use in order to slow typists down s
o 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 y
our arms comfortable while using it. The first problem is very difficult to solv
e 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 feasib
le. Various attempts have been made to address the second problem by arranging t
he keys in curves that fit the palm of the hand rather than in straight lines. T
hese 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 k
eyboard, 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 becaus
e rain will not damage them like a normal keyboard.
A type of keyboard not yet mentioned is a musical keyboard. Normally arranged li
ke 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 i
nstrument 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 t
he 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 (t
he mouse buttons). Variations have been developed which use the same basic princ
iples but are designed for particular applications. An example is the tracker ba
ll used in many laptop computers. This is like an upside down mouse where the us
er moves the ball directly rather than moving an object around a flat surface. T
his is necessary because when using a laptop there may not be a flat surface ava
ilable.
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 in
to 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 n
ot of importance to us in this section, except to say that barcodes can easily b
e misread by the system, so one of the digits in the number is used to check tha
t the rest of the code has been read properly.

This digit is called the check digit, and will be discussed in more detail late
r in the course. Barcodes are particularly useful because they do not rely on hu
man beings to input the data, although, if the barcode is damaged so that the la
ser scanner cannot read it properly, the digits represented by the code are prin
ted underneath so that they can be input by a user at a keyboard. Barcodes are u
sed where the data does not change, and so can be printed on original packaging.
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 ch
aracters are printed using magnetic ink. The value is that the characters are re
adable 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 ca
n distinguish between the different characters in a given character set. It work
s 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 inp
ut and works more effectively when it is restricted to having to recognise a sta
ndard 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 documen
ts for blind people, the contents of which can be output using a voice synthesiz
er.
f) OMR (optical mark reader). This device can recognise the presence of a mark o
n 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 cla
ss together with two columns of small rectangles, one for present and one for ab
sent. 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 pape
r. 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 document
s is as multi choice examination answer sheets.
The big advantage of both OCR and OMR is that data can be input to a computer sy
stem 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 pix
els (picture elements these are small squares that, when put together, form a pi
cture). The larger the number of pixels, or conversely the smaller each individu
al pixel, the better the definition of the final picture. There are different ty
pes of scanner, but all use the same principle to create the image. A typical us
e for a scanner would be to input a picture of a house so that it could be inclu
ded 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 outp
ut device.
h) Graphics Tablet. A graphics tablet is a flat surface on which a piece of pape
r 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. Agai
n, the same thing is true about output as is true about input, that it is import
ant to know about those devices stated in the syllabus and also a range of devic
es that will allow for sensible decisions about peripheral devices to be made fo
r a given scenario in a question.
a) Screens. Monitor screens are categorised according to the obvious colour/mono
chrome, 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 scr
een resolution. This is being typed using a very low resolution, monochrome scre
en. If you consider the contents, there is no reason for any further sophisticat
ion to be necessary. However, a computer system running a modern game program wi
ll need colour and many more pixels in order to produce a satisfactory 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 touchscreen, acts as both an input device
and an output device. Information is output by the system onto the screen and th
e user is invited to answer questions or make choices by pointing at a particula
r area of the screen. The device can sense where the user is pointing and can re
port the position to the processor. The processor can then deduce what the user s
reply was according to the position that was pointed to. Touchscreens are partic
ularly useful in areas where keyboards are not appropriate, e.g. where the devic
e may suffer from vandalism. They are also useful for users who would find diffi
culty 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 t
he 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 an
d the student should be aware of a number of them, their uses, advantages and di
sadvantages. 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 cop
ies by using carbon paper or self carbonating paper. A good example of this is t
he receipt that a shopper is presented with if buying something using a credit c
ard, there are two copies produced, back to back, one for the shop to keep and o
ne 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 u
se.
Laser printers can produce very high quality work at high speed. The cost is mor
e than with the other types but used where it is necessary to give a good impres
sion, 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 a
cross 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 import
ant 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, bu
t for suggesting sensible methods of input to the system.

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 & 1.6.i -Protocols
1.6.j Layering of interfaces
1.6.k Advantages and disadvantages of 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 sy
stems 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 woul
d need to store your files on secondary storage. It would be possible to store t
he files on a floppy disk and take them away with you, but the likelihood is tha
t the files will be stored on the hard disk. This means that the next time you w
ant to use those files you need to sit at the same computer. It would be much mo
re sensible to have a system that allowed access to the same files through any o
f the 20 computers. To allow this 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, n
ot because 20 is a small number, but because the communication is made easier be
cause 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 t
hree 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 centrall
y, 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 clas
sroom with 20 computers may only have 3 printers. Also those printers may be dif
ferent 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 t
he type of printer that happens to be connected to the computer on which the wor
k 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 thing
s 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 communica
te.
* 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 ha
s 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 t
o get complicated. There is a need for something to control the signals being tr
ansmitted. This job is carried out by a computer whose job is to control the net
work, 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 so
metimes known as the file server. Some networks have a number of different serve
rs controlling different parts of the system, for example, there may be a printe
r 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 contr
ol. 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.
A wide area network differs because the distances involved tend to be far greate
r than for a LAN. Consequently it is not possible to connect all the computers b
y a cable. Actually the cables already exist to do this, the telephone system. S
o 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 co
mputer signal down a telephone line it must be altered first. This is done by an
other piece of hardware called a modem. A similar modem must be present at the o
ther 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 toget
her. The shape of the network is known as its topology. We are interested in thr
ee different network topologies.
1. Bus network

In a bus network the hardware items all use the same, central, communication lin
e, known as a bus.
The advantage is that the installation of the system is comparatively easy becau
se there is only one communication line. However, the disadvantage is that a sin
gle 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

In a star network the individual pieces of hardware are connected to some centra
l 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 wir
ing 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 transmi
tted in the form of bits down the wire, so an 8 bit byte, that stands for a sing
le character, will be transmitted in 8 parts, one signal for each bit.

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 transm
ission 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 trans
mission is slow.
If the devices are connected by more than one wire, then more bits can be sent a
t 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.

This type of data transfer is called PARALLEL transmission. Parallel transmissio


n of data is obviously faster than serial because all the bits are travelling at
the same time, but because of the fine tolerances in the transmission, it is le
ss reliable as the bits can become muddled up.
Modes of Transmission.
If data is to be transmitted between devices , there are three different modes o
f transmission possible.
a) Simplex 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 telete
xt information which is passed to a television receiver, but there is no way to
send data in the other direction.

b) Duplex mode. When data can pass in both directions at the same time it is kno
wn 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.
c) Half duplex mode. When data can pass in both directions, but only in one dire
ction at a time, the transmission is called HALF DUPLEX. An example of half dupl
ex is a CB radio system in which each handset can either be set to receive mode
or send mode.

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 do
wn a telephone line to another computer. Remember that the more pixels that ther
e 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 transmitte
d 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 bec
ause it needs far fewer bits (1 byte per character) than other types of data. Wh
en data other than text is being transmitted, e.g. on the internet, it is import
ant to limit the amount of data that needs to be sent or the time it takes to do
wnload the data can be unreasonably long.
The data can be limited by such simple things as reducing the size of pictures s
o 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 t
he 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 sy
stem to another, it is transmitted as a series of binary digits. Any data that i
s transmitted is going to be made up of a very large number of bits. Consequentl
y, there are bound to be occasions when the data is not transmitted correctly. L
uckily there are only two possible mistakes that can occur, either a 1 is receiv
ed as a 0, or a 0 is received as a 1. Mistakes occur rarely, but when they do oc
cur they can be very serious, as the information is no longer correct. This make
s it very important that there should be methods for checking the data when it h
as been transmitted.
a) Echoing Back. The simplest way of checking the transfer of the data is to sen
d 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, th
us taking longer than necessary, and needing to be a duplex, or half duplex, sys
tem to allow data transfer in both directions.
b) Parity. All data is transmitted as bits (0s and 1s). The Number of 1s in a by
te must always be either an odd number or an even number. If two devices that ar
e 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 ru
le 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.
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 i
s not part of this course.
* Earlier in this course it was said that a byte was the number of bits necessar
y to hold a character code. Specifically, an ASCII character uses 8 bits in a by
te, giving 256 different characters. This is not true because one of the bits ha
s 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 character
s 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 devic
es.
* Parity is not only used during data transfer between devices, but also when da
ta 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 wi
thout any trouble, so another checking procedure is to add all the bytes togethe
r that are being sent in the block of data. The carry, out of the byte, is not t
aken into account, so the answer is an 8 bit number, just like the bytes. This a
nswer is calculated before the data is sent, and then calculated again when it i
s 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 wi
de 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 t
o another.
In the network shown, it would be easy to send a message from A to D or from A t
o 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 t
wo 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 pac
ket it is. These packets are sent along communication lines towards the destinat
ion. Each time a packet reaches a node on the network the node decides which dir
ection to send it on. So, one packet in the message from A reaches node D. The o
bvious route to take is the one directly to C, but it is already in use for anot
her 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 t
he 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 f
rom 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 becaus
e as many routes are in use at one time as possible, whereas circuit switching m
eans that the whole message is kept together so it does not need to be reassembl
ed at the destination.

1.6.h/1.6.i Protocols
When data is being transferred from one place to another in a computer system th
ere must be rules set up as to how the transfer is going to be done. Typical rul
es would be
* A rule about the wire connecting the two parts of the system. Errors would occ
ur 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 wha
t 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 car
ried out is known as a protocol. There are a number of protocols that you may ha
ve 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 r
ules 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 t
he 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 ca
rried out, how messages are routed from one place to another, how the flow of da
ta 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 ot
her way is to divide the interface into sections and do one bit at a time. For i
nstance, first set up the rules about how the devices are to be connected physic
ally, and later on worry about how to spot errors that have been made in the dat
a 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 da
ta. If two computers each have their own copy of a database then, unless no chan
ges can be made to it, one computer will always have a more up to date version t
han 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 o
nly needs to be one copy of the database, therefore any change made to the datab
ase will be used by both machines.
* The machines can be used to communicate, a good example being the use of e-mai
l 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, altho
ugh, 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 t
he 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 machi
ne means that keeping files secure is far more difficult. Methods like user ID a
nd password systems have to be employed to ensure that the correct users are giv
en 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.

Chapter 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
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 previ
ous 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 ha
ve 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 previou
s 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 d
esigned 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 pro
blem, or, indeed, whether such a solution is even possible. For this reason it i
s necessary for the organisation to employ a specialist who does understand comp
uters and computerised solutions to problems. This is the systems analyst. Unfor
tunately, it is probable that the systems analyst is not expert in the area of t
he problem.
The system analyst s job is to solve the problem by planning and overseeing the in
troduction of computer technologies. The owner of the problem will be happy if t
he analyst can introduce a computer solution. The problem arises when the analys
t, who doesn t know very much about the business, solves the problem that they thi
nk needs solving, while the owner of the problem expects a very different proble
m to be solved.
It seems obvious that if someone is doing something for someone else that they s
hould make sure that they know what is required. If you are asked to answer ques
tions 1 to 5 and you do 6 to 10 instead there is an obvious breakdown in communi
cation, 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 objec
tives 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 li
st 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 computer
ised solution. The organisation may be convinced that there is a problem to be s
olved, 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
.
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 qua
lity 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 finish
ed product, it would simply not be feasible.
* Is the solution economic to produce? Perhaps the robots exist that can be prog
rammed 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 fea
sible.
* 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 t
he 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 workforc
e out of work, then the employer may decide that the human cost is too great, ce
rtainly 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 necessar
y skills then the computerisation is not feasible.
* What effect will there be on the customer? If the customer is likely to be imp
ressed 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 blunt
ly, 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 compan
y, the next stage will be for the analyst to collect as much information about t
he 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 desi
gner of the system finds out as much as possible about the requirements of the s
ystem. We have already mentioned the importance of defining the problem but furt
her difficulties can arise. Imagine an organisation that commissions an analyst
to design a new payroll program. The analyst and the boss of the organisation ag
ree that the software needs to be able to communicate with the relevant banks, a
nd 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 produc
ed and is installed into the computer system ready to do the first monthly payro
ll. Unfortunately, many of the workforce are employed on a weekly basis. A simpl
e 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 requirement
s 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 m
uch information as possible. Obvious methods of collecting information are to as
k different types of people. It may not be feasible to ask everyone in the organ
isation for their views, but a representative sample of workers, management, cus
tomers should be given the chance to supply information. After all, the part tim
e 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 in
terviewee 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 who
se views can be sought.
2. By using questionnaires. Questionnaires make it possible to find out the view
s of a large number of people very quickly, but because the questions are pre-de
termined 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 di
scuss points and make their views known and yet cuts down on the amount of time
spent in interviews getting the same answers over and over again. The problem wi
th meetings is that one or two people tend to dominate, not allowing all the mem
bers 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 knowled
ge 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 informati
on is output.

1.7.e Requirements Specifications


The planning of any system design must start by deciding what the requirements a
re of the system. A system may need to store data for future reference or proces
sing. 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 dict
ate the form that the data will be stored in and the amount of storage space req
uired for each set of information.
* Calculations as to the number of sets of data that are going to be held have t
o be made because the volume of storage will make some storage devices more sens
ible than others. Also, the volume of storage can effect the structures that wil
l 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 co
mplete 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 struc
ture into which the data is to be put. This list is called a priority list and i
t forms the basis of the system design. Each of the tasks that are in the list s
hould then be considered separately to decide the important points about each on
e. An example would be that the file of information on stock being held in a bus
iness must allow
* for 1000 items (immediately putting a lower limit on the size of appropriate s
torage)
* 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 f
ile 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 constr
aints has already been placed on the design. This is known as the design specifi
cation and it should be agreed between the analyst and the organisation before t
he design is implemented.
Often, the inputs and outputs to a system and the storage and processing that go
es 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 be
ing 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 nex
t, 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 correct
ly, the result will be a solution to the original problem. Imagine a Jackson dia
gram as a method for showing the individual modules that go to make up a solutio
n to a problem and the relationships between them.

Original
Problem
Links

Individu
al modules

Final le
vel

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 wa
s 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 pr
esent or absent. It is necessary to print out the number of students who are pre
sent and the number absent.

*
repeat

Data flow diagrams:


These are diagrams that are used to describe systems. Boxes are used to stand fo
r input, processes, storage, and output. Arrows show the direction of communicat
ion around the system, and communications outside the system. As the name implie
s, 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 t
he logical train of thought that has been used to produce the diagram. Rectangul
ar 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.
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 dra
wing 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 characteristic
s that will need to be satisfied for the system to operate.

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 wit
h 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, abo
ve. It is not necessary to go into great detail about such diagrams, but student
s should be aware that they exist.
Output Design.
The results that are produced by the system must be presented in a way that is a
ppropriate for the application. If the system is designed to produce bank statem
ents for customers, then it would not be sensible to have an audio output. Simil
arly, a burglar alarm system would not serve the purpose for which it had been d
esigned 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 m
uch. In order for users to be able to understand the information presented vario
us tricks can be used.
* Information can be arranged on a monitor screen by always putting the same sor
t of information in the same place. The operator will then quickly become accust
omed 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 re
d and green, so choosing these colours to stand for information that is dangerou
sly near a limit or at a safe level, could be disastrously wrong. Similarly, col
our 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 effe
ctively. This is when the normal writing on the screen is black on a white backg
round, but the piece that needs to stand out is shown as white on a black backgr
ound.
* 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 info
rmation is preserved. Again, the fact that the information appears on that print
er means that it has a particular importance.
* Information can be made to flash, or can be printed in a different size, anyth
ing 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 stora
ge 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, we
re 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. Questi
ons 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 structure to
a given situation, though simple examples like modelling 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. Thi
s does not only apply to a computer system but any system. For example, a car mu
st 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 wo
uld recognise that this system is a car. However, some assumptions have been mad
e in just the four criteria mentioned here. A toy, radio controlled, car fits a
ll these criteria, but it was not the sort of system that we had in mind when de
signing 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 cr
iteria that gives a minimum size for the vehicle.
When systems are being designed, this list of criteria, that the finished syste
m must match, is of paramount importance. It must also be agreed between the des
igner 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 de
livered.
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 mean
t to? This question can only be answered if it is known what the system was mean
t 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 maintaine
d.
Documentation is created at different stages in the life of a system and for dif
ferent people to use. Some of the different types of documentation are met in th
is section and others will be encountered later in the course. Indeed, much of t
he 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 evalua
tion of the finished system that were discussed in section 1.7.f. It is usual fo
r the system analyst and the customer to sign the list of requirements so that t
here is no confusion when the work is finished.

Design specification
Taking the requirements specification and working out the stages necessary to pr
oduce the required end product is known as the design specification. This will i
nclude the different stages, often shown in diagrammatic form as mentioned earli
er in this chapter, and also the criteria for each stage of the solution. For ex
ample, 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 specifi
cation 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 o
f the parts of the problem. These algorithms may well be in the form of flow dia
grams or pseudo code. The language to be used, the data structures necessary, an
d details of any library routines to be used will also be in the program specifi
cation.
Technical documentation
The technical documentation will include the program specifications, the coded p
rogram itself, details of hardware configurations. Generally, anything that will
aid a technician in maintaining or updating a system. Indeed, technical documen
tation is otherwise known as maintenance documentation. This type of documentati
on 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 shoul
d. 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 sc
reen 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 sim
plest of systems because it simply is not possible to test every conceivable inp
ut to, or logical construction in, the system. This difficulty means that testin
g that is to be done must be carefully planned and that it should relate directl
y 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 perfor
ming 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 f
rom 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 n
ew systems are run side by side, both doing the same processing. This allows res
ults 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 obvi
ously very expensive because of the need to do everything twice. Parallel runnin
g is used in situations where the data is so valuable that there must be no poss
ibility of failure.
* Pilot running. Key parts of the new system are run alongside the old system un
til 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 repla
ces 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, an
d for staff training to take place, but also allows for a back-up position if th
e new version does not work as anticipated.
This topic is not fully expounded upon here, the candidate simply needing to und
erstand that there are different methods of implementation and be able to outlin
e some of the methods along the lines shown here. This topic will reappear for a
fuller treatment in section 3.8.e.

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 gove
rning 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 wo
uld 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 doc
umentation.
While the system is running it will need attention because of faults being disco
vered, this again needs a technician with a set of maintenance documentation.
Computing and computer applications is a subject that changes so regularly throu
gh improvements in technology, new ideas, different legal frameworks trying to k
eep 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 sho
uld be thought of as a circular process, continually returning to previous stage
s to fine tune them and take advantage of changing circumstances.

Chapter 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
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 immedia
tely available to buy. This type of software is called off-the-shelf software beca
use you can literally go into a computer shop and pick a copy off the shelf. The
re are a number of advantages in buying an off-the-shelf package:
* The software has already been written and so is immediately available rather t
han having to wait, sometimes a considerable time, for it to be written.
* The software will be used by many people or organisations, therefore they shar
e the development costs rather than one having to foot the whole bill. This impl
ies that the software will be considerably cheaper.
* Copies of the software have been in use for some time and will have been in us
e by a variety of users. This means that any bugs in the software should have be
en 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 compati
ble with other applications, allowing, for example, the import of data.
* Because the software will be in general use there are likely to be well establ
ished 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 prob
lem. Perhaps there is no freely available piece of software that will satisfy th
e needs of the company, A piece of custom software should mean that the organisa
tion 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 u
sed.
1.8.b Features of Common Applications
Stock control.
As the name implies, stock control systems are used to keep track of the stock b
eing held by an organisation. There are typically three areas that need to be h
andled by a stock control program. The first is to keep details of the individua
l items that the organisation holds in its stock. These details will differ depe
ndent 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 t
o have the colour of the towels stored, whereas the information stored about bul
ldozers 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 machi
nes, which obviously does not apply to the towels. The second is to store inform
ation related to the product though not directly about the product itself. Examp
les would be storing details of the supplier, or where the goods are being store
d in the shop/warehouse. The third is to do with the use of the goods. Who has h
ired 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 amo
unt of the goods that are in stock. If the quantity in stock falls below a pre-d
etermined limit then the system should automatically institute a reordering proc
ess. This would be done by using the details of the supplier and possibly includ
ing 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 tha
t when the invoice for the goods comes in it can be matched up with the order. W
hen the goods are delivered, the ordering system is informed so that the live or
der can be shown to have been fulfilled, and the accounts department are told th
at the order has arrived and that clearance has been given for payment to take p
lace.
If the organisation is the one that is filling the order then the operation is s
imilar, but in reverse.
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 reco
rd 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 proces
s requires no human intervention during the processing.
The traditional picture of the payroll application is that the master file of wo
rkers is held on a tape, as is the transaction file that holds the workers detail
s for that week. The two are arranged in the same order and then run together an
d 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 versi
ons are corrupted they can be reproduced using the old master and transaction fi
les. Nowadays, the file is likely to be held on a disk with an index to allow fa
st access to individual records, this would imply that the records are overwritt
en 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 pr
ocess. The computer receives information about the process from sensors which al
low it to make decisions. The results of these decisions are actions that are ca
rried out. The next set of input from the sensors not only tells the system abou
t 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 i
s to identify the goods being bought, the second is to carry out whatever proces
sing is required and to produce a satisfactory output, and finally to arrange fo
r payment.
The identification of the goods can be done in a number of ways, but the standar
d method is to read a code from a barcode. This code is then validated (see chap
ter 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), a
nd 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 acco
unt to the bank or credit card company from where payment will be made to the st
ore immediately.
Marketing.
When a product or service is developed it is important to make the potential cus
tomers aware of it. Marketing is the term given to this process. In computer ter
ms it would include the use of systems to produce advertising literature, the pr
omotion 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 h
ouse, or a carburettor to fit a particular engine, or it may be a new traffic fl
ow system around a town. The software can be used to do calculations, will the r
oof 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
manoeuvre 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 carburettor the pr
ices of the individual components can be used along with the known costs of prod
uction to calculate the cost of each unit. It can be used to make predictions, w
hat will happen if this street is made one way?
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 s
eamless process whereby the computer produces the design which is electronically
sent to another system where the design is produced by a computer controlled ro
bot.

1.8.c Generic Applications Software.


There is nothing frightening about this section. The intention is simply that st
udents should be able to suggest sensible software for given applications. The s
oftware automatically divides itself into specific uses. The student should be a
ble to isolate the important characteristics of an application from the descript
ion and then decide which of the generic software best fits the application char
acteristics.
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 softwar
e 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 ty
pes of software available. A spreadsheet is particularly useful because it can s
tore different types of data, including numerical data, and that it can perform
calculations on the areas (cells) where the numerical data is being stored. Spre
adsheets should be considered for any example where data is stored and calculati
ons need to be carried out on it. Examples would be profit and loss accounts, bu
dgeting, payrolls (although other, more specialised, payroll software would be u
sed in a large scale application), indeed any example that requires the manipula
tion 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 print
ed output that has been designed by using advanced layout techniques. The page m
ay well contain text, graphics, tables and many other types of output each one o
f 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 arrangi
ng these individual items on the page, the printout of which can be used directl
y as the starting point for a printing process. Typically DTP software is used f
or the production of leaflets, posters, proof copies of books and magazines. Man
y 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 gra
phics 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 p
ortable computer systems. If a salesman is to do a presentation to a group of pe
ople it is now possible for him to take a computer to the meeting with a previou
sly prepared presentation on it. The software allows for the preparation of a sh
ow which typically follows a storyboard of individual screens. The software allo
ws 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 a
dded 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 b
e watching. This would mean that a single monitor would be fine for some automat
ed display in a department store, but would require something more akin to a pro
jection screen for a larger audience. This could be accomplished using an over h
ead projector linked to the computer or an RGB projector.
Drawing packages.
This is a package that produces graphics output. Often such output is exported t
o a DTP for inclusion in some publication, or to a piece of presentation softwar
e 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 packag
e split into groups dependent on the way that the graphic is produced. The two m
ost common are bitmap graphics where each pixel is treated separately, and vecto
r 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 descr
ibing 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 th
e 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 partic
ular 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 specialise
d that the software will need to be written (or at least tailored) for that part
icular use. Uses that would require such specialist software are legion, but wou
ld include many uses of control software. Robots used on production lines tend t
o be one-off machines, designed for that particular purpose, consequently, the s
oftware that would drive them would, similarly, be one-off. A stock control syst
em in a warehouse would have standard modules, but would have other sections whi
ch would be for that warehousing system alone. The important consideration is ho
w different from the standard design is the system for which we want the softwar
e, 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 do
cuments are perceived to be unacceptable if they contain an error. If an error i
s spotted then it is corrected and the document is reprinted. The advent of elec
tronic machines was heralded as the start of the paperless office, whereas the f
acts are that the amount of paper consumed in office applications has multiplied
enormously. The use of computers running word processing programs was greeted w
ith 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 th
e operators can be made redundant. While this happened a little, the truth was f
ar from this, and there are now more computer operators than there ever were typ
ists. 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 diffic
ulty in changing their old practices, most had little problem and even learned n
ew skills making them better qualified, giving more job satisfaction and the cap
acity 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 spreadsh
eet is simply a data storage system. However, spreadsheets begin to take on adde
d significance when formulae are applied to the numeric data in the sheet to mak
e calculations, particularly calculations that make predictions about what would
happen if some value were to be changed. Spreadsheets can also be expected to h
ave presentation tools like graphing packages in order to produce the results in
easily understandable form. The addition of a language so that algorithms can b
e programmed makes a spreadsheet a very powerful software tool which goes beyond
simply juggling with figures necessary for doing a payroll or keeping the accou
nts and makes it possible to model situations in mathematics and the physical sc
iences.

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 p
arts of the system are let down, and the software needs to enable the user to co
mbine graphics images and textual images and manipulate them around the page bef
ore being printed out. This system compares with the system that used to be in o
peration of creating the page physically from cold type and attaching the page t
o 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 fewe
r than 200 magazine periodicals available in Britain because of the difficulty o
f setting up a new publication and the cost which could only be recuperated if t
here 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 fo
r 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. Ea
ch 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 thos
e who used it produced presentations that were out of the ordinary and consequen
tly it was seen as something to aspire to because of the novelty factor being ab
le to hold the attention of an audience. However, as the use of such presentatio
ns became more common, it became necessary to use more and more complex techniqu
es to maintain the novelty factor. This leads to presentations becoming overload
ed 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 pres
entation 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 gr
aphics using vector graphics as opposed to painting packages that use bitmaps. H
owever, in this context the syllabus is referring to the concept of the user bei
ng able to create graphics which can then be imported into other software packag
es to enhance the work that is being done. No longer does the school worksheet n
eed to be a simple text document, but diagrams, pictures, even photographs can b
e included.

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 Output According to Target Audience
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: a
utomatic 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 infor
mation about the physical environment. The data collection done by a sensor is c
ontinuous, but the reading of the data is within a fixed time period (the proce
ssor 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 measu
re 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 collec
ted 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 in
to 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 weathe
r 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. T
he 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 thr
ough 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 n
o human intervention by an optical mark reader (OMR).
An OMR reads information by translating the position of the mark on the paper i
nto 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 ra
ther unreliable, but is an attempt by the computer to understand human communica
tion, and by the use of magnetic stripes. These are seen on the back of credit c
ards 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 ar
e 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 i
nformation 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 cheq
ue 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 ty
pes 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 indiv
idual characters and input them without the data having to be transcribed, this
would count as automatic data collection (it is known as optical character readi
ng (OCR)).
Questions on this part of the syllabus will be suggesting suitable input methods
for particular situations, and offering advantages and disadvantages for partic
ular 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 r
eads the intensity of the reflected light. The surface of the document is divide
d 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 diff
erent sizes, typical is an A4 sized flat bed scanner where the document is place
d 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 t
ime, 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 ar
e 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 s
tall 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 i
nto 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 t
heir 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 correc
t. 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 en
try.
The first is that the data, while reasonable, is wrong. If your birthday is wri
tten down on a data capture form as 18th of November 1983, it will (except in ve
ry 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 dat
e, and will then be accepted as your date of birth despite the fact that it is w
rong. 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 er
ror 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.
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 printe
d off at regular intervals so that your parents can check to ensure that the sto
red information is still correct.
Verification.
Verification means checking the input data with the original data to make sure t
hat there have been no transcription errors. The standard way to do this is to i
nput the data twice to the computer system. The computer then checks the two set
s of data (which should be the same) and if there is a difference between the tw
o sets of data the computer knows that one of the inputs is wrong. It won t know w
hich on 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 secti
on 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 compute
r 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 wi
th a set of rules that the computer has been told the data must follow. If the d
ata 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 in
put 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 betwee
n 0 and 100 inclusive. Consequently, a mark of 101 would be rejected by this ch
eck as being outside the acceptable range.
2. Character check. A person s name will consist of letters of the alphabet and so
metimes a hyphen or apostrophe. This rule can be applied to input of a person s na
me so that dav2d will immediately be rejected as unacceptable.
3. Format check. A particular application is set up to accept a national insuran
ce 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 sin
gle letter. If the computer knows this rule then it knows what the format of a N
I number is and would reject ABC12345Z because it is in the wrong format, it bre
aks the rule.
4. Length check. A NI number has 9 characters, if more or fewer than 9 character
s 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 the
re 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 consist
s 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 sh
ould 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 a
t this point that the beeping sound would normally be heard if everything is alr
ight.

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 differe
nt characteristics, and when two variables need to be compared, a visual represe
ntation can be very useful. However the importance of the scales is paramount be
cause otherwise a very misleading picture can be given. Also, the specific value
s 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 advant
age of producing the actual figures according to the values specified by the use
r. However, the figures themselves may need skill to interpret their significanc
e 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 du
ring the run then there is some positive user involvement leading to an interact
ive 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 synthe
sis for reporting to blind people and an alarm system to protect property agains
t 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 pictur
es to produce the feel of continuous motion. Video is useful for demonstration o
f techniques where there is little value in pages of instruction if a simple vid
eo 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. An
imation is used so often that it can come across as being a boring technique tha
t 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 pa
tient who is being monitored by a computer, the outputs are available for a vari
ety of users. There is a nurse at a desk at one end of the ward. The nurse has o
ther duties, but is expected to make the rounds of the patients to check on thei
r progress at regular intervals. Doctors come round the ward twice a day to chec
k 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. Thi
s 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 patie
nts to make a visual check of their conditions it is not necessary to know exact
figures of heart rate or blood sugar, a quick glance at a screen showing a scro
lling graph of the state of the patient s vital signs over the last 20 minutes wil
l 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 v
ariable values for the last twenty four hours, particularly if there is somethin
g happening to the patient which is difficult to understand, such historical dat
a 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. O
nce 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 c
ollege computer system has been loaded with demonstration software showing an an
imation of the technique for artificial respiration.
When considering output always consider the importance of timeliness and relevan
ce. 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 goi
ng 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 chan
ge 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 s
tate and consequently should not be considered relevant to this example, althoug
h it may well be in other circumstances.

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
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 sec
tions.
1.10.a Importance of Good Interface Design
However complex the software, however expensive and powerful the hardware, the s
ystem is unusable if there is no intuitively simple to use interface with the hu
man being who is in control of the system or for whom the system is producing re
sults
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 des
ign for a pre school playgroup to learn about numbers is going to be very differ
ent 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 (perha
ps 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 wa
nting to see the flow of a chemical around the whole site. This would probably b
e in the form of a diagrammatic representation of the site.
The circumstances under which the interface is to operate are also important. I
n the last chapter mention was made of the nurse looking after a group of patien
ts. 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 a
nd 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 acc
ount.
* Who are the people that are going to use the application? Specifically, consid
eration 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 t
hey 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 devi
ces are to be used in the open air then the environment will dictate some restri
ctions which would not be necessary if the system was being used in a computer r
oom.
* The software that is being used. The software will dictate the type of input r
equired 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 t
he system with the characteristics of the available hardware devices, and be pre
pared to state why a particular choice has been made.
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 no
t 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 s
creen display is being constantly updated. Such data is part of the short term m
emory. 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 prese
nted 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 o
f font in the case of text.
Colour.
Colour is an important part of any HCI. The contrasting use of colours can highl
ight the more important information, or can be used to distinguish one type of i
nformation from another. The different levels of contrast between colours are ne
cessary 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 difficu
lt 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 infor
mation 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 corr
ect 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 b
egin 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 th
e same way.

1.10.d Styles of Interface


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

1.10.e Characteristics of a User Interface


This work has all been covered in previous sections. Particular sections referre
d 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 calc
ulations 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, b
ut are considerably slower than the processor, consequently there are also speed
mismatches on both communications concerning peripherals. If there are enough c
omputer systems this speed mismatch does not matter so much, but if there is a s
hortage of processing time, then a method needs to be found to keep the slowest
parts of the systems isolated from the processor. One way of doing this is to us
e 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 insertio
n 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 act
ion has been taken after the event. In this way the speed mismatch has been over
come by cutting out the slowest part of the system.

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

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 da
ta that is held within them, but the data is not altered. A simple example would
be an electronic encyclopaedia 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 acce
ssed by members of the teaching staff to find out where a student is at a partic
ular time of day, or to look up their telephone number in order to contact the p
arents. The database of information is a valuable resource but it is not possibl
e for an ordinary teacher to alter it.
Interactive information systems.
An interactive system is one that data can be entered for processing which may a
lter the contents of the database. An example would be the school secretary upda
ting the attendance record of a pupil in the pupil file. In commerce, a stock co
ntrol system in a supermarket is an interactive information system because it no
t 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 (inter
active) 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 co
mpany to access and analyse data.
The management within a company, or any other organisation, is usually working o
n two levels. These levels may be different levels of management or may be the s
ame 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, w
hat 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 reporte
d 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 ite
m be stocked, which areas of the business are doing well and which are not, whic
h workers are having to do a lot of overtime which may point to the need to incr
ease staff in that sector.
Such reports are termed Strategic level reports because they inform the executiv
es 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 i
mmediately. Other factors are that the application will tend to use a large amou
nt of data, that processing will tend to be of the same type for each set of dat
a and that human intervention is not necessary. In module 1 we saw that the perf
ect example of batch processing is the payroll system, and nothing has changed b
ecause we are in a different module.
Rapid response processing.
In module 1 this was referred to as real time processing. Real time processing c
an be thought of as being used in process control where the results of the proce
ss are used to inform the next input. A good example would be the control of a r
obotic machine on the production line. The other example is in information syste
ms 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 s
ystem. If a customer enquires whether there is a seat available on the flight, a
nd 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 si
tuation. 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 t
he concepts even if it was. Far more sensible is to learn to recognise the chara
cteristics of each of the types of processing in a given application.

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

1.12.a Changing Trends in Computer Use


The history of the computer has been remarkably short for a device that now perv
ades every aspect of our society and effects the lives of so many people in a se
rious 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 Eni
gma codes during the war.
Confusion over which computer was the first has been rife because of contrary cl
aims and a lack of definition of what constitutes a computer. Different centres
around the world fiercely put forward their claims to have invented the first co
mputer, 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 je
alous 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 compe
tent 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 com
puter use seem somewhat mystical. The results of this are still seen today in th
e attitudes of many middle aged and older people who believe that using a comput
er is beyond them. This is not their fault, but something with which they were b
rain washed when they were younger.
The use of computers was largely confined to this technical elite in universitie
s, and to larger businesses where information systems were needed to produce pay
rolls and other information hungry examples.
The revolution in computer use came in the late 1970s with the invention of a c
heap, 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 th
e ZX79, ZX80, and then the Sinclair Spectrum proved that there was a market. Unt
il these machines no one thought that ordinary people would want a computer, sud
denly many manufacturers jumped on the band wagon, and there was a plethora of m
achines. Each machine needed its own software and many started to go out of busi
ness.
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, t
he world s biggest computer manufacturer, decided that they would produce a small
machine. It was not successful, but many other, smaller, manufacturers decided t
o 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, t
he other companies went to the wall. It certainly helped that Microsoft operatin
g systems were installed in the cloned machines, not because they were the best
operating systems, but because it meant that these machines could communicate ea
sily and that files were compatible.
Nowadays, we have a society where, world wide, there is a higher number of comp
uters in homes than there are refrigerators or baths.
The effect of this has been enormous on society, and the effects are what are di
scussed in this chapter.
25 years ago the proportion of the world s population that had access to a compute
r system was tiny, nowadays it is very high, and increasing daily. However, ther
e 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 th
is 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 acc
ess to the information revolution.
Imagine two people who live in a village. The village has a grocer s shop and news
agent. 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 villa
gers had changed to running their account on the Internet. A person living in th
is village that has a computer connected to the Internet will be able to pay the
ir bills, order goods from the supermarket 20 miles away at a lower cost than bu
ying them from the grocer, will have a wider variety of choice from the supermar
ket than they could get locally.
They will be able to book rail tickets, at a discount, through the Internet, wh
ich 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 v
illage shop with much higher prices, and does not have the convenience of orderi
ng 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 s
cale of how much our lives are being effected by the use of new technology becom
es even more evident.
Note that many of the changes made to our life styles have been forced rather th
an being made by choice.
1.12.b Changes in Leisure and Work
Computer availability and acceptance has brought about large changes, not just i
n 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 par
ticularly 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, t
here 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 huma
n beings. A robot on a car production line can not only work more consistently t
han its human counterparts and do the jobs of many people, it does not need payi
ng. Many jobs have been lost to the human work force in this way. However, compa
nies 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, a
nd 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 i
t, 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 skill
ing up of the workforce. This change in working practices is another example of t
he technology creating two classes of people (Section 1.12.a), those able to lea
rn additional skills and those not.
* The use of technology allows people whose jobs require a desk and who can comm
unicate satisfactorily with their colleagues without needing to be in the same p
hysical 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 practic
es of the workers to their boss, and the lack of social contact which is so impo
rtant 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 s
ecurity and gives automatic prestige to even the most lowly of workers because o
f their seniority within the business bringing invaluable experience. This type
of work practice is becoming less and less common as modern technology changes p
roducts, manufacturing techniques and the life cycle of businesses.
* Electronic communications have changed the way that business is done. Communic
ation can be immediate, and the worker is never far from being contacted and con
sequently can be at work at all hours of the day. A good example is the world s st
ock markets. Twenty years ago, each country had its own stock market, the perfor
mance of which might effect others when they opened, but they tended to be fairl
y insular in their dealings. Nowadays, the stock markets of the world are all in
terconnected. 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 lon
ger 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 infor
mation being stored about individuals than ever before. The problem is that to g
et 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 anoth
er 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 infor
mation were going to use it for the right reasons and that the information was a
lways accurate, however these things cannot be guaranteed. Consequently it has b
ecome important to protect individuals from misuse of their information by legis
lation 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 boun
daries and some authorities are not as anxious to uphold the rights of the indiv
idual 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 init
ials it is possible to work out who has sold your details on and to whom they ha
ve 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 pr
otect citizens from something that by its very nature can be insidious because i
t is difficult to understand the consequences of unrestricted use of personal in
formation.
Legislation protecting personal information must not be confused with copyright
law. Copyright law protects intellectual property, in the case of a computer sys
tem it would protect the person who has written the software rather than the use
r 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 b
ecause 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 di
d 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 e
verything else in the world of computers, things change very quickly and that hu
man 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 agreemen
t when individual parliaments still have sovereignty.

1.12.e Controversial Information


The Internet was originally started by the American military (ARPANET) as a mean
s of communication in time of war. The principle was that if a communications sy
stem has a central control system (like a telephone exchange) then it is easy to
disable that communications network by destroying the central control. There ca
n be as many telephones as you like, without an exchange they are useless. ARPAN
ET 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 c
omplains about the fact that there is a page on the Internet that shows anyone h
ow to make a bomb and says something like, They should have that page removed. The
y are showing their lack of understanding of the net. There simply is no They , the
re is no one in charge.
There are some things that all sane people would condemn, the obvious example i
s 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 H
olland. If the control of the net was in Britain then the law would say that the
se things would not be allowed whereas if it were in Holland they would be allow
ed.
We would contend that the Internet is a useful tool in the fight against oppres
sion 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 t
he net for propaganda purposes? If we do then why should we get upset when value
s 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 wa
nt the net there is nothing they can do about it because how can they pull the p
lug 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 lo
ng periods of inactivity. The body is designed to move. The legs are designed t
o move us around, the arms to carry things and support weights, the eyes are des
igned for 3 dimensional vision. We are not designed to sit for long periods of t
ime, 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 t
erm 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, par
ticularly when such small movements are made. Joints in the fingers and the elbo
w and shoulder are made to perform movements that they normally would not do, an
d 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 (RS
I). 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 Keyboa
rd 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 perio
ds of time. The eyeball should, naturally, move about in the socket. This produc
es 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 focussed and regularly looking away from the s
creen 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 handl
e it better.
Much has been made in the past of the radiation that comes off the screen, and t
he possible damage that can be done because of the radiation. While these worrie
s have probably been exaggerated in the past, and the more modern screens are fa
r 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 impo
rtant 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 g
oing to be squeezed into. Are there enough plug sockets or are too many pieces o
f 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 ev
en 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 enco
urages 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 fi
rm who will probably be working under them.
This situation has changed for many people because of the use of computer techn
ology. Because of the need to keep up to date with the latest hardware and softw
are it is now the young people coming into the firm that are more experienced th
an 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 pra
ctice there are also problems brought about by the lack of social interaction th
at human beings get from a shared work environment.

Environmental Issues
Strictly, this is not part of the syllabus, however an understanding of the impl
ications of the use of computers would be incomplete without comment about our e
nvironment.
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 (s
ame company as the cakes!) Electronic Office. The idea was that paper would becom
e a thing of the past because messages would all be sent electronically. The envi
ronmental 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 tha
t they remained confidential, with an electronic office this was no longer neces
sary. There was one tiny problem
With the introduction of machines the amount of paper increased massively. The e
xplanation is simple. Consider a project that you are doing for one of your cour
ses. How many sheets of paper do you use? Not, how many do you hand in? , but how ma
ny do you use? The difference is that if you have made a mistake you correct it a
nd 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 sh
eet? Do you save it and put it back in the paper tray? How often does the printe
r 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 p
rinted 20 or 30 sheets of blank cells before anyone has noticed? The same sort o
f 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 bein
g able to work from home rather than having to commute. This has obvious advanta
ges in that the pollution is cut down because there are fewer vehicles on the ro
ad, but it is not all good news, because if 50 people don t go in to the office it
is 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 th
e office block because some workers have to go in to work and therefore the offi
ce block must be fully heated.
The computer systems themselves have to be produced. There is an environmental c
ost here on two fronts, the computer requires a certain amount of power to enabl
e the factory to make it, and then there are the raw materials that are needed i
n 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 part
s 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 t
he life of a system in business is about two years this adds up to an enormous w
aste of resources. When it is also realised that some of the contents of a syste
m are heavy metals and other toxic materials the environmental problems of repla
cing a system are great.

Page 1

You might also like