Documente Academic
Documente Profesional
Documente Cultură
INPUT
PROCESSOR
OUTPUT
STORAGE
An input device is any piece of hardware that allows data to be transmitted to the
computer processor. No computer, however powerful, is of value unless it is possible
to give it instructions and data to be used when those instructions are carried out.
An output device is any piece of hardware that allows the computer processor to
convey information or the results of its processing. There is no point in having a
computer system carrying out processing of any sort unless the results of that
processing can be either reported or used to effect future input to the system.
Storage is any piece of hardware which can store data outside the processor in a form
which is suitable for input back into the processor. This is necessary because data
must be saved for future use if the processor is switched off and for transfer from one
machine to another.
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.
Operating system
User
Programmer
Hardware
Applications
package
before the next shopper has their request dealt with otherwise the second person might be
sold the same item. Because the information on the system must be processed
immediately the O.S. needs to be ready to handle input as soon as it comes in. This means
that it cannot be using up some of its slack time doing other tasks while it is waiting to be
asked to do something. This implies that the computer will not be using its full potential
as far as processing is concerned. When this happens it is said to display a high rate of
redundancy. Real-time systems tend to display a high rate of redundancy.
Single User:
As the term implies, a single user O.S. is specifically one that is used to control a system
which has only one user, and their programs, at any one time. A perfect example of a
single user system is the one that you may have at home. Only one person uses it at a
time. Most single user systems are also
Multi-tasking:
This is a type of O.S. that allows several applications to be available simultaneously. On a
simple single user system you will probably be used to having a number of things
running at the same time. Perhaps one window shows a spreadsheet while another shows
a word processing application. You may decide to copy the sheet from the spreadsheet
software to the word-processed document. It appears that more than one task is running
simultaneously. They arent, they just appear to be. The O.S. that most of us use on our
own computer systems, Windows, is a multi-tasking O.S.
Multi-user:
Again, as the name implies, this type of O.S. services more than one user simultaneously.
There are two types of multi-user O.S.:
1. A network system comprises a number of computers linked together for the purposes
of communication and sharing of resources. Normally one of the machines is used to
control the rest of the system, this machine is called the server. Networks are important
because they allow hardware and software to be shared and also mean that a single copy
of the information on a system is needed, and so can be kept up to date relatively easily.
2. A time-sharing system has a single (normally powerful) computer which is connected
up to a number of terminals. These terminals are not computers as in the case of the
network system, but have a very limited amount of processing power. Again, such a
system allows communication between users on the system and also allows sharing of
hardware and software across the system.
At the moment it is difficult to tell the difference between the two types of multi-user
system, but we shall return to this in a later chapter.
Distributed:
A distributed system is one that allows software and data files to be distributed around a
system. An ordinary network will have a server controlling it and the access to the hard
drive, which is connected to the server. A distributed system might store the word
processing software on one computers hard drive, while the files of work are stored
somewhere else, and the spreadsheet software is stored on a third disk drive. This can
speed access to files because there is no single bottle neck which all the information must
pass through.
Graphical interfaces are called GUI (graphical user interface) or WIMP (windows, icons,
menus, pointer). The terms describe what the user sees on the screen. There are many
different types, but the user would expect to be able to view different applications or files
on the screen, this is done by putting each into its own boarded area known as a window.
The user will expect to be able to select options by use of menus of choices and by using
small pictures which represent the different options available. Choices are selected by the
user by using some sort of pointing device to indicate choice, typically this would be a
mouse.
Natural language
Sometimes referred to as a conversational interface, the computer will ask questions
which elicit a response which gives the user the impression that they are talking to the
computer. The trick is that the system restricts itself to questions to which the only
sensible answers are the ones that it knows. If the user leaves the expected responses, a
message is produced which makes clear that a further attempt is required.
Command line
Or command based interface is one where the user types a series of commands at the
keyboard which tell the computer what their intentions are. The user needs to know what
the possible commands are, and also needs to understand the way files are stored on the
system. The characteristics of a command based interface are
the user needs to know what commands are available
the user needs to understand the commands
the user needs to understand the way that material is stored in the computer system
Because of the above points there are two very important characteristics about a
command based interface. First, the system is very much more open than in the other
types of interface. Other interfaces restrict the options that the user has available to them.
This can be particularly important for the system manager because different users can
only be allowed to have access to specific parts of the system. The second characteristic
is that command based interfaces can only be used by computer literate people because
you not only have to understand the commands and their uses but you also need to
understand something about how the computer operates, particular how information is
stored.
There are many other points to be made about interfaces, especially the fact that the
second part of the interface consists of the hardware necessary to put the software
interface into operation. These points will be made when the appropriate stage is reached
in this course.
1.2.3 Utility Software
Utility programs are additional routines that can be added to an operating system or that
are available to the user within an operating system. An example that you may have on
your computer system would be a piece of back-up software that can be used to make
sure that you do not lose all your work when the computer fails. Others are disk
formatting, file handling, hardware drivers, file compression and virus checkers.
Example Questions.
1.
Explain the difference between hardware and software.
(2)
A. -Hardware comprises the physical parts of the computer system, while..
-software are the programs that make the machine produce useful results.
Notice that the answer suggested provides a link between the two terms. This was
expected because of the use of the words explain the difference in the question.
There are two marks available for the question so make sure that you have said two
distinct things. Make sure that the second point is not just the opposite of the first.
In this example there would be no mark for saying that software are the other parts
that are not physical.
2.
Give two reasons why a computer system would need to have some type of external
storage device.
(2)
A. -In order to store files when the power to the processor is switched off.
-In order to store files which are too large to be stored in the processor itself, until
they are needed.
-To allow for the transfer of data from one machine to another.
Notice that the question asks for reasons why the system needs to have storage,
NOT for what is stored. Be careful to answer the question asked. Note that there are
two indicators in the question that you should give two answers, the word in bold
and the number of marks. This question does not ask for a comparison or an
explanation, so dont give them. Notice that there are more than two acceptable
answers. If you can think of three then give them, the examiner will choose the two
best, but never give more than one extra answer because you then demonstrate that
you are not sure and the examiner will choose your first two answers, right or
wrong.
3.
(2)
A. -System software controls how the computer system works while
-application software allows the user to make the computer do something useful.
Again, this is a comparison type of question so the two parts of the answer should
be related.
4.
5.
*Notice that it is important to make a conscious decision about how the marks will
probably be awarded to stop you wasting time giving more thorough answers than
necessary. Also, there are certain standard answers that will always be right. Some
students decide to come up with something new in questions like this and, while initiative
is applauded, often don't explain their application well enough to get the mark. The
warning is always Dont throw marks away.*
6
confused by the language. The purpose of this examination is not to test your ability
with English, rather to test your knowledge of computing.
7.
Give two reasons why an operating system is likely to be stored on backing storage
rather than in the memory of the computer.
(2)
A. - A full operating system requires a large amount of storage space that is better
utilised in the computer memory for applications
- Storage of the operating system on backing storage allows for easy upgrading or
changing from one system to a different one.
Note that the temptation to call the operating system the O.S. has been resisted in
the answer. In general, do not use abbreviations in your answers. There are
exceptions, where the abbreviation is the accepted form, but your own versions may
be ambiguous or, even, not understood by the examiner. If you do need to use an
abbreviation, because the term is to be used a number of times, give the term in full
with the abbreviation that you want to use in brackets after it. For example, the first
time that you use the term operating system write operating system (OS)
you can then use OS as often as you like in the rest of your answer.
State what is meant by a distributed system, and give an advantage of this type of
multi-access system over a simple network of machines.(2)
A. - A distributed system is one which uses many storage locations on different
machines to store software and files.
- Access to files can be speeded up because more than one file command can be
carried out at a time.
When an advantage is asked for it is normal to state in the question, either explicitly
or implicitly, with what the comparison should be made. Be careful to give an
advantage using this comparison and not a more generalised one.
10
A computer operator takes phone calls from the public who ring up asking whether
a particular item in a catalogue is available. The operator needs to type in a series of
responses to questions put to the caller, so that the computer can check the file and
determine whether there are any of that item available. Design a screen interface
that would be suitable for the operator to use.
(4)
A. - Form type interface
- Catalogue number
- Space for the description of goods which will be filled in by the computer itself
- Spaces for computer to produce availability and price
- Laid out with spaces for input.
What is just as important here are the things that would not be on the screen. The
question makes it quite clear that there is no ordering going on, so spaces for name
and address, or method of payment, are not only going to score no marks, but will
probably be penalised because they demonstrate that the candidate has not
understood the question. In this type of question it is important to demonstrate that
you have taken the situation into account.
11
no electricity
no electricity
electricity
=0
ADD 1
=1
no electricity
no electricity
ADD 1
=2
Carry
electricity
electricity
electricity
no electricity
no electricity
electricity
ADD 1
=3
ADD 1
Carry
Carry
=4
The computer can continue like this for ever, just adding more wires when it gets bigger
numbers.
This system, where there are only two digits, 0 and 1, is known as the binary system.
Each wire, or digit, is known as a binary digit. This name is normally shortened to BIT.
So each digit, 0 or 1, is one bit. A single bit has very few uses so they are grouped
together. A group of bits is called a BYTE. Usually a byte has 8 bits in it.
One type of data that needs to be stored in computer systems is the letters of the alphabet.
These are stored as codes which look like binary numbers. For instance A could be stored
as 000, B as 001 and so on. Unfortunately, there are only 8 possible codes using 3 bits, so
we could store the letters A to H but not the rest, and what about the lower case letters
and punctuation and? The computer can store as many characters as necessary simply
by using more and more bits for the code. Some systems dont need to be able to
recognise a lot of characters so they only use a few bits for each character. The number of
bits needed to store one character is called a byte which is usually said to have 8 bits
because most systems use 8 bits to store the code for each character.
We now have enough codes, but another problem arises. If my computer stores A as
01000001 and your computer stores A as 01000010 then the computers cannot
communicate because they cannot understand each others codes. In the 1960s 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 computers memory as
01000001. However, you cant be certain because some systems use other codes. A less
common code is called EBCDIC, it was developed for use by larger scale computer
systems and differs in that the code for each character is different than that used in ASCII.
Notes: All the characters that a system can recognise are called its character set.
ASCII uses 8 bits so there are 256 different codes that can be used and hence 256
different characters. (This is not quite true, we will see why in chapter 1.6.)
A problem arises when the computer retrieves a piece of data from its memory. Imagine
that the data is 01000001. Is this the number 65, or is it A?
They are both stored in the same way, so how can it tell the difference?
The answer is that characters and numbers are stored in different parts of the memory, so
it knows which one it is by knowing whereabouts it was stored.
with these data types through their use in databases. Such data types are fundamentally
different from the others mentioned here because the others are characterised by the
operating system while these two are set up by applications software.
Characters
A character can be anything, which is represented in the character set of the computer by
a character code in a single byte.
1.3.2 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, doesnt matter to the user, except that to find each piece of data it has to be referred
to by a variable name.
e.g. If it is necessary to store the 20 names of students in a group then each location
would have to be given a different variable name. The first, Iram, might be stored in
location NAME, the second, Sahin, might be stored in FORENAME, the third, Rashid,
could be stored in CHRINAME, but Im now struggling, and certainly 20 different
variable names that made sense will be very taxing to come up with. Apart from anything
else, the variable names are all going to have to be remembered.
Far more sensible would be to force the computer to store them all together using the
variable name NAME. However, this doesnt let me identify individual names, so if I call
the first one NAME(1) and the second NAME(2) and so on, it is obvious that they are all
peoples names and that they are distinguishable by their position in the list. Lists like this
are called ARRAYS.
Because the computer is being forced to store all the data in an array together, it is
important to tell the computer about it before it does anything else so that it can reserve
that amount of space in its memory, otherwise there may not be enough space left when
you want to use it. This warning of the computer that an array is going to be used is
called INITIALISING the array. Initialising should be done before anything else so that
the computer knows what is coming.
Initialising consists of telling the computer
what sort of data is going to be stored in the array so that the computer knows what
part of memory it will have to be stored in
how many items of data are going to be stored, so that it knows how much space to
reserve
the name of the array so that it can find it again.
Different programming languages have different commands for doing this but they all do
the same sort of thing, a typical command would be
DIM NAME$(20)
DIM is a command telling the computer that an array is going to be used
NAME is the name of the array
$ tells the computer that the data is going to be characters
(20) tells it that there are going to be up to 20 pieces of data.
Notes: Just because the computer was told 20 does not mean that we have to fill the array,
the 20 simply tells the computer the maximum size at any one time.
The array that has been described so far is really only a list of single data items. It would
be far more useful if each student had a number of pieces of information about them,
perhaps their name, address, date of birth. The array would now have 20 students and
more than one thing about each, this is called a two dimensional array. Obviously
everything gets more complicated now, but dont worry as use of multi-dimensional
arrays is for later in the course.
We should now have a picture of a part of memory which has been reserved for the array
NAME$
NAME$
Iram
Sahin
Zaid
Name$(1)
Name$(2)
Name$(20)
To read data into the array simply tell the computer what the data is and tell it the position
to place it in e.g. NAME$(11) = Rashid will place Rashid in position 11 in the array
(incidentally, erasing any other data that happened to be in there first.
To read data from the array is equally simple, tell the computer which position in the
array and assign the data to another value
e.g. RESULT = NAME$(2) will place Sahin into a variable called RESULT.
Searching for a particular person in the array involves a simple loop and a question
e.g. search for Liu in the array NAME$
Answer:
Counter = 1
While Counter is less than 21, Do
If NAME$(Counter) = Liu Then Print Found and End.
Else Add 1 to Counter
Endwhile
Print Name not in array
Try to follow the logic of the steps above.
Start address
61
Address
60
61
62
63
85
86
-
Data
Rashid
Iram
Next address
75
86
Zaid
XX
Sahin
60
The diagram is intended to show a portion of memory. Each of the locations that can hold
data are given an address, and the address of the first data in the list is stored separately.
This tells the computer where the first piece of data is. If the first data item is not the one
that is wanted, the computer goes to the next piece of data by using the address that is
stored with the data. These addresses are called pointers, the last one of which has to be
one that cannot possibly exist so that the computer knows it has reached the end of the
list. Notice that the two problems associated with arrays no longer exist.
Linked lists are often drawn showing the data in boxes and the linking addresses as
pointers. This is the better method for describing a list, just dont lose sight of the fact
that the arrows are really address references.
Start
Iram
Sahin
Rashid
Zaid XX
Note: The jagged line signifies that there are a number of others which would fit in there,
but they are not shown.
To initialise a list, all that needs to be done is to create a new start pointer for this list and
add it to the index of start pointers for all the other lists.
To search through the list for a particular piece of data follow these rules
1. Find the correct list in the index of lists
2. Follow the pointer to the next item
3. If the item is the one being searched for, report that it is found and end.
4. If the pointer shows that the end of the list has been reached, report that the item is not
there and end.
5. Go to step 2.
To remove a value from a list, simply change the pointer that points to it into one that
points to the next value after it. E.g. to remove Sahin from the example
Start
Iram
Sahin
Rashid
Zaid XX
Note that Sahins data is still there, its just that there is no way of getting to it so it might
just as well not be.
EP
EP
EP
SP
Zaid
1.
SP
Iram
Zaid
2.
SP
Sahin
Iram
3.
Notes: The array is limited in size, and the effect of this seems to be that the contents of
the array are gradually moving up. Sooner or later the queue will reach the end of the
array. The queue does not have to be held in an array, it could be stored in a linked list.
This would solve the problem of running out of space for the queue, but does not feature
in this course until the second year.
Stacks.
Imagine a queue where the data was taken off the array at the same end that it was put on.
This would be a grossly unfair queue because the first one there would be the last one
dealt with. This type of unfair queue is called a stack.
A stack will only need one pointer because adding things to it and taking things off it are
only done at one end
1. Zaid and Iram are in the stack. Notice that the pointer is pointing to the next space.
2. A job has been taken off the stack. It is found by the computer at the space under the
pointer (Irams job), and the pointer moves down one.
3. Sahins job has been placed on the stack in the position signified by the pointer, the
pointer then moves up one. This seems to be wrong, but there are reasons for this being
appropriate in some circumstances which we will see later in the course.
Pointer
Pointer
Iram
Zaid
1.
Pointer
Zaid
2.
Sahin
Zaid
3.
In a queue, the Last one to come In is the Last one to come Out. This gives the acronym
LILO, or FIFO (First in is the first out).
In a stack, the Last one In is the First one Out. This gives the acronym LIFO, or FILO
(First in is the last out).
Random access.
A file that stores data in no order is very useful because it makes adding new data or
taking data away very simple. In any form of sequential file an individual item of data is
very dependent on other items of data. Jawad cannot be placed after Mahmood because
that is the wrong order. However, it is necessary to have some form of order because
otherwise the file cannot be read easily. What would be wonderful is if, by looking at the
data that is to be retrieved, the computer can work out where that data is stored. In other
words, the user asks for Jawads record and the computer can go straight to it because the
word Jawad tells it where it is being stored. How this can be done is explained in section
1.4.j.
If a new pupil arrives whose name is Hinna, space must be found between Hameed and
Khurram. To do this all the other records have to be moved down one place, starting with
Naghman, then Khwaja, and then Khurram.
Hameed, Ali, 21
Khurram, Saeed, 317.
Khwaja, Shaffi, 169 .
Naghman, Yasmin, 216..
This leaves a space into which Hinnas record can be inserted and the order of the records
in the file can be maintained.
Having to manipulate the file in this way is very time consuming and consequently this
type of file structure is only used on files that have a small number of records or files that
change very rarely.
Larger files might use this principle, but would be split up by using indexing into what
amounts to a number of smaller sequential files.
e.g. the account numbers for a banks customers are used as the key to access the
customer accounts. The accounts are held sequentially and there are approximately 1
million accounts. There are 7 digits in an account number.
Indexes could be set up which identify the first two digits in an account number.
Dependent on the result of this first index search, there is a new index for the next two
digits, which then points to all the account numbers, held in order, that have those first
four digits. There will be one index at the first level, but each entry in there will have its
own index at the second level, so there will be 100 indexes at the second level. Each of
these indexes will have 100 options to point to, so there will be 10,000 blocks of data
records. But each block of records will only have a maximum of 1000 records in it, so
adding a new record in the right place is now manageable which it would not have been if
the 1million records were all stored together.
00
01
02
99
00
01
02
...
99
One
First level index
(first two digits
in account number)
00
01
02
99
100
Second level indexes
(third and fourth digits
in account number)
0102000
0102001
0102002
0102003
.
0102999
DATA
10,000
Final index blocks
each containing up to
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 arithmetic because it
doesnt make much sense) on the data that is being searched for.
E.g. imagine that you are searching for Jawads data.
The rules that we shall use are that the alphabetic position of the first and last letters in
the name should be multiplied together, this will give the address of the students data.
So Jawad = 10 * 04 = 40. Therefore Jawads data is being held at address 40 in memory.
This algorithm is particularly simplistic, and does not give good results, as we shall soon
see, but it illustrates the principle. Any algorithm can be used as long as it remains the
same for all the data.
This type of algorithm is known as a HASHING algorithm.
The problem with this example can be seen if we try to find Jaheeds data.
Jaheed = 10 * 04 = 40. The data for Jaheed cannot be here because Jawads data is here.
This is called a CLASH. When a clash occurs, the simple solution is to work down
sequentially until there is a free space. So the computer would inspect address 41, and if
that was being used, 42, and so on until a blank space. The algorithm suggested here will
result in a lot of clashes which will slow access to the data. A simple change in the
algorithm will eliminate all clashes. If the algorithm is to write down the alphabetic
position of all the letters in the name as 2 digit numbers and then join them together there
could be no clashes unless two people had the same name.
e.g. Jawad = 10, 01, 23, 01, 04 giving an address 1001230104
Jaheem = 10, 01, 08, 05, 05, 13 giving an address 100108050513
The problem of clashes has been solved, but at the expense of using up vast amounts of
memory (in fact more memory than the computer will have at its disposal). This is known
as REDUNDANCY. Having so much redundancy in the algorithm is obviously not
acceptable. The trick in producing a sensible hashing algorithm is to come up with a
compromise that minimizes redundancy without producing too many clashes.
Example Questions
1. a) Express the number 113 (denary) in
(i) binary
(ii) in BCD
using an appropriate number of bytes in each case.
(4)
b) Using the answer obtained in part (a) show how 113 (denary) can be expressed in
(i) octal
(ii) hexadecimal.
(4)
A. a) (i)
128
64
32
16
8
4
2
1
0
1
1
1
0
0
0
1 =01110001.
(ii)
1 = 0001
1 = 0001
3 = 0011
Therefore 113 = 0000000100010011
b) (i) 113 = 001 110 001 in binary
= 1 6 1 in octal.
(ii) 113 = 0111 0001 in binary
= 7
1 in hexadecimal.
Notice: (i) and (ii) It was necessary to show a method of working out. Many
students have calculators that will automatically change from one number system to
another, so it is necessary to show that you know what you are doing, even if you
use a calculator to check the results. Also, the question stated that the appropriate
number of bytes be used, in part (i) this is obviously 8 bits and is an easy mark, but
in part (ii) it is necessary to add a set of zeros to the front of the answer to make it a
whole number of bytes.
(iii) and (iv) The question stated that the first answer had to be used, so one of the
two marks is going to be given for showing the relationship between binary and
each of these two representations. Notice that for the octal answer it was necessary
to add a 0 to the front of the binary number to give 9 bits (3 lots of 3).
2.
3.
Add together the binary equivalents of 34 and 83, using single byte arithmetic,
showing you working.
(3)
A.
34 = 0 0 1 0 0 0 1 0
83 = 0 1 0 1 0 0 1 1 +
0 1 1 1 0 1 0 1 = 117
1
Note that the question asked for the working. The part that shows that you are
capable of doing the arithmetic is the carry, dont miss it out. In a question like this
try to ask yourself what evidence the examiner is expecting for the mark. The other
marks are for using 8 bits for each value, and for the answer.
4.
Describe how characters are stored in a computer.
(3)
A. -Each character is given a code
-as a binary number
-Each character code occupies one byte of data
-Typically one byte is eight bits
-Most computers use a standard set of characters like the ASCII set.
There are lots of marks available here. The question has been left deliberately open
so that there are plenty of mark points available.
5.a) Explain the difference between integer and floating point data types. (2)
b) State what is meant by Boolean data.
(1)
A. a)-Integers are whole numbers
-Floating point numbers allow for the storage of fractions.
b)-Boolean data is data that can exist in two states, e.g. true or false.
Note that in part (a) there may be lots of other differences that you know, but they
are not really part of this syllabus. If your answer is valid though, it will be given
the marks. In part (b), this is another standard definition, dont try to elaborate too
much or you may wander too far from the answer.
6.
7.
A garden centre stores details of each of the types of plant that it has for sale on a
computer system. The details of the plants are stored in alphabetical order in a
linked list.
a)By drawing a diagram show how the plants are arranged in the list. You may use
the following plants to illustrate your answer
Pansy, Dahlia, Clematis, Sweet pea.
(4)
b)Describe how a new linked list, of plants that like shaded conditions, can be
created from the original one.
(4)
A. a)
Dahlia
Clematis
Sweet pea XX
Pansy
Mark points:
-Some start position for list
-List in alphabetic order
-Use of pointers
-Use of null pointer to finish list.
b)-Create new linked list by creating a new start point.
-Read values from old list in turn
-If plant in old linked list likes shade then
-add to new list and put in pointer.
-Repeat until null pointer (end of list)
-Place null pointer after last entry in new list
Note: The first part is fairly simple. Stick to the simple type of diagram and dont
forget how to start and end the list. The second part is more difficult because it
means a certain degree of analysis of the problem to be able to solve it. This is why
there are rather more mark points available. When dealing with linked lists, if you
draw a diagram and remember to start and finish it, you wont go far wrong.
8.
A stack is being held in an array. Items may be read from the stack or added to the
stack.
a) State a problem that may arise when
(i) adding a new value to the stack
(ii) reading a value from the stack.
(2)
b) Explain how the stack pointer can be used by the computer to recognise when
such problems may occur.
(2)
A. a)(i) The array may be full, consequently no new value can be entered.
(ii) The array may be empty, there is no value to be read.
b)(i) The stack pointer will be pointing outside the array.
(ii) The stack pointer will be pointing at the first location in the array.
Notes. When discussing stacks and queues it is important to have a picture in your
mind of what it looks like. The simplest picture is to imagine them being held in an
array. This is not the only way to store them and you may have been shown other
methods, but the array is perfectly adequate for this course.
9.
answer is highly unlikely to be the same as this, dont worry, the examiner will
mark your answer and not expect it to be the same as a model answer.
10.
a)Explain the difference between a serial file and a sequential file. (2)
b)Describe what is meant by a hashing algorithm and explain why such an
algorithm can lead to clashes.
(3)
A. a)-Serial file holds data in the order in which it was received.
-Sequential file holds the data according to some order defined on the data.
b)-A hashing algorithm is pseudo arithmetic
-carried out on the data
-in order to determine the location of the data in the memory.
-A clash occurs when the answer to the pseudo arithmetic is the same despite the
data used in the calculation being different.
Note: This is a question where it is very easy to try to answer too much. Restrict
yourself to what the question is asking. Many candidates faced with part (b) will go
into great detail about what to do after clashes have occurred, this is not required
and will earn no marks.
11.
A library keeps both a book file and a member file. The library does a stock take
twice a year and orders new books only once a year. Members can join or cancel
their membership at any time.
a) Describe how the library can implement a sensible system of backing up their
files.
(4)
b) Explain the part that would be played by archiving in the management of the
files.
(4)
A. a)-Book file needs to backed up twice (or three) times a year
-when the stock take or book purchasing has made the file alter.
-Member file needs backing up daily(at least weekly) because of constant
changes
-would also need to keep a transaction log for the member file.
-Back up copies would be stored away from the building with the computer system
in it to ensure that a copy of files survived in case of fire.
-Multiple copies of the book file would be made
-Member file copies and transaction logs may be kept for a number of back up
periods.
b)-When books are discovered to be missing, or if a book is replaced by a more upto-date edition, the old records should be kept
-but they are no longer live so are taken from the hard disk
-after a copy (archive) has been made.
-When members leave the library the data should be archived
-also when they have not taken a book out for a long period of time their record can
be considered to be dormant.
Notes: Backing up and archiving are topics which cause confusion among
candidates. There really is no need for such confusion if you remember that
archiving has nothing to do with recovery after a disk failure. Note that there are
plenty of mark points available in this question.
1.4 Hardware.
1.4.1 Control Unit, Memory Unit, and Arithmetic Logic Unit
The first thing to be said in this section, is what is not necessary. The three topics that are
listed in the heading would normally lead to the fetch- execute cycle, this does not come
into this module. Likewise, any complicated diagrams showing how the various parts of
the processor are connected up and communicate with each other do not appear in the
syllabus until next year. The requirements of this section are very simple, they are
restricted to a basic understanding of what these three parts of the processor are meant to
do.
Control Unit.
All computers follow instructions that are given to it in a program. These instructions are
in a particular order in the program, and following them, and carrying them out, will
mean that the computer has accomplished whatever task it was meant to do. Something,
in the computer, has to manage the instructions and make sure that all the other parts of
the processor do what they should be doing. This is the job of the control unit.
The control unit has three jobs
1. It has to decide which instruction to carry out next and then go and get it.
2. It has to decipher the instruction, in other words it has to work out what needs to be
done to carry the instruction out.
3. It has to tell other parts of the processor what they should do so that the instruction will
be carried out.
Arithmetic Logic Unit (ALU)
The ALU is where things are actually done in the processor.
1. The ALU contains circuitry that allows it to add numbers together (do arithmetic).
2. It allows for logic decisions to be made (If the value is negative then , the part of the
processor that makes the decision is the ALU).
3. The third task of the ALU is to act as the gateway between the processor and the other
parts of the computer system. All input and output to and from the processor goes into the
ALU and waits there while the control unit decides what to do with it.
Memory Unit
The third part of the processor is where everything that the processor is going to use is
stored. This includes all the program instructions and all the data needed to carry out
those instructions. One of the jobs of the control unit is to be able to find the information
stored there when it is to be used.
The parts of the operating system, which the computer is using at the time, also need to
be stored in memory.
systems can now be relied on to have a CD drive, and a CD is not alterable by the user.
For these reasons, manufacturers have tended to use CDs to produce software and large
data files like encyclopaedias. It is now possible to write to CDs by using a special
peripheral device called a CD writer and a special CD, but the above points are still true.
5.Others
There are many other types of secondary storage, two of which are worth a mention. Zip
drives are a more robust version of a floppy disk, having a faster access speed and a
greater capacity. They have become fairly popular for backing up work on
microcomputers. DVD is a relatively new technology that will probably replace CDROM
as it can store much larger quantities of data and allow access at high speed. For the
purposes of the syllabus, the original 4 types of secondary storage are quite enough at this
level.
Speed of access to data.
Notice that there are no figures quoted for access times. There is little point in doing this
because access times vary according to the manufacturer and the point of development so
far reached. If the author were to quote a number, not only would it be wrong as far as
this work is concerned because there is such a wide range, but it would certainly be out of
date by the time you read it. In general terms the tape streamer is the slowest access
because of the way that the data is stored sequentially, then comes the floppy disk which
suffers because of the nature of the medium. Access times from CDROM and hard drives
are faster than the other two, but because there is such a range of both types of drive
available, it is impossible to say that one is faster than the other.
Capacity.
Again, much depends on the type of drive or size of medium being used. Tape streamers
come in different sizes, but tend to be comparable in capacity with smaller hard drives.
Of the different types of disk, a reasonable analogy is that a floppy would store the text
from a book, a CDROM would store a multi volume encyclopaedia, while a hard drive
could store a library.
Uses.
Obviously, no list of uses will be complete. However, there are some obvious uses for
each storage type which take into account the advantages and disadvantages of each.
A Tape Streamer is used for making backups of files held on computer systems. This
makes use of the fact that it can store a large amount of data, but the disadvantage of the
access being slow does not matter because it is rare that a backup file would be used
anyway.
A floppy disk has the advantage that it can be written onto and taken away from the
computer. Because of this it can be used for storing confidential files. Add to this the fact
that all computers can be relied on to have a floppy disk drive and it becomes a sensible
way of transferring information from one machine to another.
A hard drive has the advantages of being fast to access and also stores massive amounts
of data. These advantages mean that it is going to be used for storing software and user
files. The disadvantage of being attached to one machine is not important if the same
users always use the same machines, some other method of sharing will have to be
devised if this is not true.
A CDROM cannot be altered (unless it is a special re-writable). This disadvantage can be
turned into an advantage if the owner does not want the contents of the storage to be
altered. Examples of files stored on CDROM are software for import to a system and
large reference files like encyclopaedias.
Primary
Memory
Secondary
Storage
Unfortunately, we know that things cant be that simple. We know that primary memory
is part of the processor, and that anything that goes in or out of the processor must go
through the ALU, so the diagram should look like this
Primary
Memory
ALU
Secondary
Storage
This causes a problem. The primary memory operates at great speed because it is part of
the processor, while the secondary storage is probably some sort of disk or tape which
(while it seems incredibly quick to us) is very slow at reading or writing the data, in
comparison. This means that the processor should be able to get on with something else
because the secondary storage is so slow. Unfortunately, it cant because it needs the
ALU that is being used for the transfer of the data. This problem is overcome by the use
of a buffer.
Buffers.
The problem is caused because the secondary storage device is so slow compared to the
processor, the solution is to put a small amount of fast memory in to the system between
the ALU and the secondary storage device.
This means that the processor can send data very quickly (or receive it), and then get on
with something else while the storage device takes its time in reading (or sending) the
data. This small amount of memory between the two parts of the system is called a buffer.
Stage One: Filling the buffer from the processor
Primary
Memory
ALU
Primary
Memory
ALU
Buffer
Secondary
Storage
Buffer
Secondary
Storage
Interrupts.
This system is fine if the buffer can hold all the data that needs to be sent to the storage
device. However, if there is more data than will fit in the buffer, the storage device has to
be able to tell the processor (actually the control unit) that it has used up all the data in
the buffer and that it is ready for the next lot. This forces the processor to stop what it is
doing and fill the buffer up with more data. Because this message from the secondary
device makes the processor stop what it is doing it is called an interrupt. When the
processor receives the interrupt, the whole procedure is repeated.
Notes:
A buffer is a small amount of fast memory outside the processor that allows the processor
to get on with other work instead of being held up by the secondary device.
An interrupt is the message which the secondary device can send to the processor which
tells the processor that all the data in the buffer has been used up and that it wants some
more.
The example used here was communication between primary and secondary storage, but
the same is true for any communication between the processor and a peripheral device,
e.g. a printer or a keyboard.
The system is not really quite as simple as suggested here, but further complications can
wait until the second year of the course.
printed documents and also for reading documents for blind people, the contents of which
can be output using a voice synthesizer.
f) OMR (optical mark reader). This device can recognise the presence of a mark on a
sheet of paper. The position of the mark conveys information to the machine. For
example a school register may consist of a list of names of pupils in a class together with
two columns of small rectangles, one for present and one for absent. The same action
(shading in a rectangle) stands for both being present and being absent. The difference is
the position that the mark occupies on the paper. Printing in the sensitive areas of the
sheet is done using a special type of ink which the optical scanner does not see, that is
why OMR documents tend to be printed in a light blue or pink colour. The other standard
use for OMR documents is as multi choice examination answer sheets.
The big advantage of both OCR and OMR is that data can be input to a computer system
without having to be transcribed first, thereby cutting down the number of errors on data
input.
g) Scanners. A scanner is a device that converts a document into a series of pixels (picture
elements these are small squares that, when put together, form a picture). The larger the
number of pixels, or conversely the smaller each individual pixel, the better the definition
of the final picture. There are different types of scanner, but all use the same principle to
create the image. A typical use for a scanner would be to input a picture of a house so that
it could be included with the details of a house that is for sale in an estate agents
publication.
A scanner is an input device, not to be confused with a plotter which is an output device.
h) Graphics Tablet. A graphics tablet is a flat surface on which a piece of paper is placed.
The user can then draw on the paper and the tablet will sense where the pencil is pointing
and transfer the line to the screen.
i) Microphones. Used to input sound to a computer system.
4. Output Devices
There are too many output devices to be able to write notes on all of them. Again, the
same thing is true about output as is true about input, that it is important to know about
those devices stated in the syllabus and also a range of devices that will allow for sensible
decisions about peripheral devices to be made for a given scenario in a question.
a) Screens. Monitor screens are categorised according to the obvious
colour/monochrome, also according to the number of pixels that there are on the screen.
The more pixels there are, the better the picture will be, this is known as the screen
resolution. This is being typed using a very low resolution, monochrome screen. If you
consider the contents, there is no reason for any further sophistication to be necessary.
However, a computer system running a modern game program will need colour and many
more pixels in order to produce a satisfactory 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 the user is invited
to answer questions or make choices by pointing at a particular area of the screen. The
device can sense where the user is pointing and can report the position to the processor.
The processor can then deduce what the users reply was according to the position that
was pointed to. Touchscreens are particularly useful in areas where keyboards are not
appropriate, e.g. where the device may suffer from vandalism. They are also useful for
users who would find difficulty using other input devices, e.g. very young children who
want to be able to draw on a screen.
b) Printers. A printer is a device which provides the user with an output from the system
which is permanent. This output is known as hard copy, so a printer is a device which
produces hard copy. There are many different types of printer and the student should be
aware of a number of them, their uses, advantages and disadvantages. However, there is
no need to understand how they work.
The first type is a dot matrix printer. These tend to be slow, and the output is particularly
poor quality. The big advantage is that the output is produced by using pins to strike at
the surface of the paper. Because of the physical nature of the way that the printout is
produced, it is possible to obtain multiple copies by using carbon paper or self
carbonating paper. A good example of this is the receipt that a shopper is presented with
if buying something using a credit card, there are two copies produced, back to back, one
for the shop to keep and one for the buyer to take away with them.
Ink jet printers, which produce output by spraying ink on to the paper could not produce
the two copies that the dot matrix can, but it can produce much better quality and in
colour, at low cost. This makes ink jet printers ideal for home use.
Laser printers can produce very high quality work at high speed. The cost is more than
with the other types but used where it is necessary to give a good impression, for instance
sending letters from a solicitors office to clients.
Plotters are a type of printer designed for drawing lines and geometric designs rather than
for producing characters. The image is created by pens being moved across a piece of
paper, under the command of the processor. Plotters tend to be used for drawing
blueprints, perhaps in an architects office to produce detailed drawings of buildings for
builders to follow.
c) Speakers. Used to output sound from a computer system.
There are many other peripheral devices and, as has been mentioned, a knowledge of
some others will not come amiss, however that is enough to be able to answer questions
in the exam. The questions will normally take the form of presenting a scenario and then
asking for a description of the hardware required. The important thing to remember is
how the marks will be awarded. There will not be a mark for every device mentioned, but
the candidate will be expected to give sensible suggestions for each of the four areas of
peripherals mentioned at the start of this section. In other words the mark will not be for a
keyboard or a mouse, but for suggesting sensible methods of input to the system.
Speed Mismatch
A typical computer system will consist of the processor to do the necessary calculations
or other processing, the peripheral devices to allow input, output and storage of
data/information, and the human being that is using the computer.
The processor can carry out its side of the task at great speed while the human being is
very slow both at providing input and making sense of the output. This difference in
speed is known as the speed mismatch between the operator and the processor. Peripheral
devices work at far greater speeds than the human being, but are considerably slower than
the processor, consequently there are also speed mismatches on both communications
concerning peripherals. If there are enough computer systems this speed mismatch does
not matter so much, but if there is a shortage of processing time, then a method needs to
be found to keep the slowest parts of the systems isolated from the processor. One way of
doing this is to use batch processing (see module 1).
The speed mismatch causes more problems if the decisions of the computer need to be
acted upon immediately. If a computer is being used to control the insertion of the
graphite rods into a nuclear reactor it may become important to ignore the human being
once the decision has been made and simply to report that an action has been taken after
the event. In this way the speed mismatch has been overcome by cutting out the slowest
part of the system.
Example Questions.
1.
2. a)
b)
A.
is more space in RAM, although that could be right if phrased a little more
carefully.
3.
4.
Describe how buffers and interrupts can assist in the transfer of data between
primary memory and a secondary storage device. (4)
For the purposes of this answer I will assume that data is being transferred from
the processor to the secondary storage.
-Buffer is an area of fast access storage..
-which can be filled by the processor and then emptied at slower speed by the
secondary storage device
-allowing the processor to continue with other tasks.
-When the secondary device has used the contents of the buffer
-it needs to tell the processor that it requires more data
-this is done by sending a message to the processor, called an interrupt.
Notice that the answer describes transfer of data from the processor to the
peripheral. Transfer in the other direction is equally valid and gives rise to a
similar answer. However, if the two answers are mixed together then it produces a
confused, and often, wrong, answer. This is why the first statement is important as
it has set the parameters by which the question will be answered. You dont have
to say this in your answer, but it makes clear what is being done.
Also, there are more mark points than there are marks available. Hopefully, you
are getting used to this because it is generally true in most questions. In this
question there are obviously two points for interrupts and two for buffers, but in
A.
order to get the marks you must make sure that the definition appears somewhere.
So, for the interrupt, you need to earn the last mark point, otherwise you havent
defined what an interrupt is.
5.
A.
6.
Explain why speed mismatch would mean that the computer should be in control of
the speed of the production line.
(3)
A. -Speed mismatch is the name given to the difference in reaction time of the operator
and the computer.
-The computer is able to take decisions very quickly, while the operator works very
slowly..
-The decision to change the speed of the line must be taken very quickly or product
will not go through all the manufacturing processes, so the computer controls it.
Notes: There is virtually no other question that can be asked about the speed
mismatch. It is simply the difference in reaction time and if the candidate can relate
that to the application, they must get the marks.
Network Topologies
There are a number of ways that the machines on a network can be connected together.
The shape of the network is known as its topology. We are interested in three different
network topologies.
1. Bus network
In a bus network the hardware items all use the same, central, communication line,
known as a bus. The advantage is that the installation of the system is comparatively easy
because there is only one communication line. However, the disadvantage is that a single
break in the cable will stop all communications in the network.
2. Ring network
In a ring network the two ends of the bus are joined up. This creates a loop so that data
can be sent in both directions along the cable. If there is a break in the cable, the network
will continue to operate because the messages can go in the other direction.
3. Star network
Network
server
In a star network the individual pieces of hardware are connected to some central point,
usually the network server. This means that the failure of a single piece of hardware or
the breaking of a connector can only effect that piece of hardware and none of the others.
The wiring up of the network can be very complex, though.
Device 2
0 1
The diagram shows the data byte 01101101 being transmitted. As there is only one wire,
only one bit can be transmitted at a time. This is known as SERIAL transmission of data.
Serial transmission has the advantages of being simple and reliable because the next bit is
not transmitted until the current one has arrived at its destination. However, because only
one bit can be transmitted at a time, the speed of transmission is slow.
If the devices are connected by more than one wire, then more bits can be sent at once. A
sensible number of wires would be 8, because then a whole byte can be sent at once
instead of having to send one bit at a time.
Device1
0
1
1
0
1
1
0
1
Device 2
This type of data transfer is called PARALLEL transmission. Parallel transmission 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 less reliable as the bits can become
muddled up.
Modes of Transmission.
If data is to be transmitted between devices , there are three different modes of
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 teletext information
which is passed to a television receiver, but there is no way to send data in the other
direction.
Transmitter
Receiver
b) Duplex mode. When data can pass in both directions at the same time it is known as
DUPLEX transmission of data. An example of duplex transmission would be a telephone
conversation as both users can speak and be heard at the same time.
Device 1
Device 2
c) Half duplex mode. When data can pass in both directions, but only in one direction at a
time, the transmission is called HALF DUPLEX. An example of half duplex is a CB
radio system in which each handset can either be set to receive mode or send mode.
Device 1
Device 2
Bit Rates
Information needs to be sent to devices in a computer system from other devices. For
example, a picture stored in the memory of the computer needs to be sent down a
telephone line to another computer. Remember that the more pixels that there are and the
more colours that can be represented, the better the picture will be. However there is a
limit to the amount of information that can be transmitted in a given time down the phone
line, so a decision needs to be made. One choice is to have as much detail as possible and
accept that it will take a long time to transmit it. The other is to limit the resolution of the
picture, meaning that there is less information to send so that the message will be sent
more quickly.
The number of bits that can be sent in one second is known as the BIT RATE. The units
used to measure the bit rate are BAUD. 1 baud = 1 bit per second.
Note that text can be sent much more quickly than other forms of information because it
needs far fewer bits (1 byte per character) than other types of data. When data other than
text is being transmitted, e.g. on the internet, it is important to limit the amount of data
that needs to be sent or the time it takes to download the data can be unreasonably long.
The data can be limited by such simple things as reducing the size of pictures so that they
only take up a small part of the screen, or that they are restricted to a few colours.
Speeding up the transmission of the information by reducing the amount of data that is
sent is known as compression. This will be studied in more detail in the second year of
the course.
an 8 bit number, just like the bytes. This answer is calculated before the data is sent, and
then calculated again when it is received, and if there are no errors in the transmission,
the two answers will match.
1.5.2 Switching
When a message is being sent from one machine to another, particularly over a wide area
network, the message may have to pass through other machines first. This may be forced
on the system because there is no direct route from one machine to another.
B
A
C
D
1.5.3 Protocols
When data is being transferred from one place to another in a computer system there
must be rules set up as to how the transfer is going to be done. Typical rules would be
A rule about the wire connecting the two parts of the system. Errors would occur if
one device had a serial connection and the other was expecting a parallel connection
If one device sent data at a particular bit rate and the other device read what it
received at a different rate, the message would never be received correctly.
If one device used even parity and the other device used odd then no correctly sent
byte of information would ever be accepted.
The set of rules that needs to be set up to allow the transfer of data to be carried out is
known as a protocol. There are a number of protocols that you may have heard of e.g.
http, tcp(ip) but dont worry about them, you do not need to know specific examples of
protocols, but you should be able to discuss some of the rules that go to make up a
particular protocol.
Example Questions
1.
Explain the difference between a wide area network (WAN) and a local area
network(LAN).
(2)
A. -In a WAN the computers on the network are remote from each other, while in a
LAN the computers are close to each other.
-The method of communication between nodes is likely to be different, with a LAN
typically being hard wired and a WAN being connected by using phone lines.
Notes: The use of the terms LAN and WAN are perfectly acceptable without
reference to what they stand for, as it has been stated in the question. Even if it
hadnt been stated in the question, these sets of initials are stated in the syllabus so
there is no problem in using them without explanation. However, be careful when
using acronyms like this as what might be obvious to you may not have been heard
of by the examiner, so a brief explanation on first mention is generally a good idea.
Two mark points available, note that they are not given for saying that the WAN is
remote while the LAN is confined to a small area. This is really the same thing said
the other way around. Be very careful about saying the same thing twice and
thinking you have both marks where you have really only said one thing. Another
example of this is when a question asks for advantages and disadvantages of two
things. The same thing given as an advantage of one will not be given a second
mark as the disadvantage of another.
2.
a) State three pieces of hardware that are needed to create a LAN from a set of stand
alone computers.
(3)
b) Explain why the communication over a WAN differs from that across a LAN and
state how the hardware necessary for communication would differ from that used in
part (a).
(3)
A.a)-Network cards in each of the computers
-Cable to carry the signals from one point to another on the network
-A network server to control access to peripheral devices and to files on the shared
hard drive.
b)-The distances between the computers are further than on a LAN
-The cable used to connect up a LAN will only transfer signals over limited
distances
-Other communication medium needed, e.g. modem and a telephone line.
3.
4.
5.
Explain why the bit rate is more important when sending a colour picture from one
device to another, than it is when sending a page of text.
(3)
A. -Colour picture requires more data because each pixel must be defined
-Page of text has less data because each character is defined by its own byte of data
-Bit rate is the speed at which a given amount of data can be transmitted which is
more important the more data that there is.
Notes: This answer is not quite right because it is possible to imagine a page of text
written in 2 point font which would use a large amount of data, while a colour
picture of alternating stripes of red and blue would not need a lot of data to describe
it. Also this answer does not take any account of compression algorithms that many
students may know something about. However, in principle this answer is true, and,
considering there are only three marks, any attempts to complicate the answer must
be counter productive.
6.
The following bytes of data are received by one device after being transmitted from
another.
01001101
10001000
10101011
00011011
An automatic checking technique is used to check that the data has been transmitted
without error.
a) State which byte has been received incorrectly, explaining how you arrived at your
answer.
(3)
b) Explain why it is possible that a byte of data could still be incorrect despite passing
the test that you used in part (a).
(1)
A.a)-10101011
-Bytes should pass a parity check
-Other bytes are of even parity while this is odd
b) -If two bits in the same byte are in error the effect of each will cancel out the other.
7.
8.
A computer is to use a printer to provide hardcopy output of jobs. In order for the
data to be transmitted and received properly a protocol must be set up between the
two pieces of hardware. State two parts of the protocol which would be essential in
this example, giving reasons why they are necessary.
(4)
A. -Baud rate
-necessary because if the computer transmits at a different speed to that which the
printer can receive the message will become jumbled.
-Parity type
-because if the computer transmits using odd parity and the printer checks using
even parity correct bytes will never be accepted.
Notes: There are many possible answers to this type of question. You may know
more than the ones stated in the text of this chapter, be warned, stay with the ones in
the text then there is no chance of misunderstanding. Some students, on sight of the
word protocol, desperately want to write down TCP(IP) or http. Be very careful. It
would be difficult to think of a question, at this level, which could possibly have
those as answers.
10.
A school computer department has decided to invest in new hardware in the two
rooms that it uses for computer lessons in the school.
The teacher in charge has to decide between a network of computers or a collection
of stand alone machines. The teacher has asked your advice about which hardware
to implement.
a) State four advantages in implementing the network solution.
(4)
b) State a disadvantage of using a network in this context and suggest a solution to the
problem.
(2)
A.a)-Hardware can be shared. There is no need for a printer for each machine.
-Software can be shared. Only one copy of each piece of software is required.
-Pupils can access their files from any machine on the network, they do not have to
use a particular machine.
-Communication can be carried out between machines in the two rooms.
-Files stored on the disk drive only need to be updated once, so all machines can
access the same information in common files.
b) -Files are less secure because of reliance on single drive
-regular back up copies of files should be taken.
-Privacy of files is more difficult to control because of common access to hardware
-Use of passwords to control access to files.
Jackson diagrams:
A Jackson diagram starts with the original problem as the highest level. The next, and
subsequent, levels show how the problems in the previous levels are split up to form
smaller, more manageable, problems. This continues until each of the blocks in the lowest
levels are self contained, easily solvable problems. These individual problems can then be
solved and combined according to the links that have been used. If the links between the
different blocks are then used correctly, the result will be a solution to the original
problem. Imagine a Jackson diagram as a method for showing the individual modules that
go to make up a solution to a problem and the relationships between them.
Original Problem
Links
Individual modules
Final level
The links between the modules can be conditional. For example if the result of a module
was a mark out of 100, then there could be two possible print routines, one for failure if
the mark was below a certain level, and one for pass if it was above the pass mark.
An example of a Jackson diagram to show the solution to a simple problem.
A register is taken of the 25 students in a class. Each student can be either present or
absent. It is necessary to print out the number of students who are present and the number
absent.
Register
Initialise
While count
<25
*
Count = 0
Cpresent = 0
Cabsent=0
Input
Present or
absent
Increment
Cpresent
*
repeat
Output
Output
Cpresent
Cabsent
Increment
Cabsent
System Evaluation
Any system must match certain criteria if it is to be considered successful. This does not
only apply to a computer system but any system. For example, a car must satisfy various
criteria before being able to be called a car
it must move under its own power
it must be possible to steer it
it must have 3 or 4 wheels
it must have seats.
There would be many other facts which would have to be true before most of us would
recognise that this system is a car. However, some assumptions have been made in just
the four criteria mentioned here. A toy, radio controlled, car fits all these criteria, but it
was not the sort of system that we had in mind when designing the criteria. Perhaps the
second bullet point should have specified that it has to be controlled from within the car
itself, or should there be a new criteria that gives a minimum size for the vehicle. When
systems are being designed, this list of criteria, that the finished system must match, is of
paramount importance. It must also be agreed between the designer of the system and the
commissioner of the design, so that there will be no unfortunate misunderstandings. We
can imagine a situation where the Ford motor company commission a new car design,
only to find that it is 30 cms long when delivered.
Note that these criteria are decided before the system is created. They are used to decide
how well the system works. In other words, does it do what it is meant to? This question
can only be answered if it is known what the system was meant to do in the first place.
Documentation
The documentation of a system consists of all the text and graphics that explain how the
system was produced, how it should be used, and how it can be maintained.
Documentation is created at different stages in the life of a system and for different
people to use. Some of the different types of documentation are met in this section and
others will be encountered later in the course. Indeed, much of the project work that is
done in module 4 consists of producing the documentation for a problem solution.
Requirements specification
This is a list of the requirements of the customer for whom the system is being designed.
It consists, largely, of the criteria that will be used for the evaluation of the finished
system that were discussed in section 1.7.f. It is usual for the system analyst and the
customer to sign the list of requirements so that there is no confusion when the work is
finished.
Design specification
Taking the requirements specification and working out the stages necessary to produce
the required end product is known as the design specification. This will include the
different stages, often shown in diagrammatic form as mentioned earlier in this chapter,
and also the criteria for each stage of the solution. For example, one part of a solution
may be the production of a file of data. The ways that this file of data relates to the other
parts of the system, and the specification of the file (what is the key field? How many
records will there be? What type of medium should it be stored on?) make up the design
specification.
Program specifications
These will include detailed algorithms showing the method of solution for some of the
parts of the problem. These algorithms may well be in the form of flow diagrams or
pseudo code. The language to be used, the data structures necessary, and details of any
library routines to be used will also be in the program specification.
Technical documentation
The technical documentation will include the program specifications, the coded program
itself, details of hardware configurations. Generally, anything that will aid a technician in
maintaining or updating a system. Indeed, technical documentation is otherwise known as
maintenance documentation. This type of documentation is not intended to be accessible
to the user of the system, who does not need any of these details to be able to use the
system correctly.
User documentation
This is the documentation for the person who will actually be using the system. It
contains those details that are needed to make the system operate as it should. Items
normally included in the user documentation will be
examples of output screens
examples of valid input
methods of input of data
error messages and what to do when they appear
How to install the system onto specific hardware
Some user documentation is part of the software and can be called up onto the screen
when it is needed. This type of documentation is called on-screen help.
and transaction files. Nowadays, the file is likely to be held on a disk with an index to
allow fast access to individual records, this would imply that the records are overwritten
and that there is no new version of the master file created.
Process control.
As the name implies, this is the use of a computer to automatically control a process. The
computer receives information about the process from sensors which allow it to make
decisions. The results of these decisions are actions that are carried out. The next set of
input from the sensors not only tells the system about the current state of the process but
also allows the computer to compare with the last set of inputs to decide whether the
actions that it took last time had any impact. This process is known as feedback.
Point of Sale systems.
A computer used at a point of sale needs to carry out three actions. The first is to identify
the goods being bought, the second is to carry out whatever processing is required and to
produce a satisfactory output, and finally to arrange for payment.
The identification of the goods can be done in a number of ways, but the standard method
is to read a code from a barcode. This code is then validated (see chapter 1.9) and then
sent to the processor. The processor uses this barcode as the key field when searching the
product file. When the record is found the contents of the record are used to produce a
printout for the customer (till receipt), and to accumulate the total value of all the goods
that have been bought. Finally, the payment can be made electronically by sending details
of the customer account to the bank or credit card company from where payment will be
made to the store immediately.
Marketing.
When a product or service is developed it is important to make the potential customers
aware of it. Marketing is the term given to this process. In computer terms it would
include the use of systems to produce advertising literature, the promotion of the product
on the world wide web and the use of techniques such as direct mailing by using
purchased files of people who may reasonably be expected to have some interest and then
mail merging to produce junk mail.
Computer Aided Design (CAD).
This is simply the use of a computer system to design a commodity. It may be a house, or
a carburettor to fit a particular engine, or it may be a new traffic flow system around a
town. The software can be used to do calculations, will the roof be well enough supported
by walls made from that particular product? It can be used to make decisions about the
manufacture, will the robot tool be able to 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 prices of the individual components can be used along with the known
costs of production to calculate the cost of each unit. It can be used to make predictions,
what will happen if this street is made one way?
There is nothing frightening about this section. The intention is simply that students
should be able to suggest sensible software for given applications. The software
automatically divides itself into specific uses. The student should be able to isolate the
important characteristics of an application from the description and then decide which of
the generic software best fits the application characteristics.
Word processing.
Used for applications that have the need to communicate with others using text. Writing
letters, mail merging, preparing text documents for use in other software packages, are all
typical uses of a word processing package.
Spreadsheets.
Spreadsheets are a type of software that allows data to be stored. If this were all that a
spreadsheet was to do then there would be other, more satisfactory types of software
available. A spreadsheet is particularly useful because it can store different types of data,
including numerical data, and that it can perform calculations on the areas (cells) where
the numerical data is being stored. Spreadsheets should be considered for any example
where data is stored and calculations need to be carried out on it. Examples would be
profit and loss accounts, budgeting, payrolls (although other, more specialised, payroll
software would be used in a large scale application), indeed any example that requires the
manipulation of figures to give accurate results or forecasts or predictions.
Desktop publishing (DTP).
This type of software is characterised by the ability to produce a page of printed output
that has been designed by using advanced layout techniques. The page may well contain
text, graphics, tables and many other types of output each one of which may be better
produced using a word processor or a drawing package or a spreadsheet. The value of the
DTP is that it contains powerful tools for arranging these individual items on the page,
the printout of which can be used directly as the starting point for a printing process.
Typically DTP software is used for the production of leaflets, posters, proof copies of
books and magazines. Many word processors now have features which previously would
only have been found in a DTP, for instance the ability to produce text in columns or to
surround graphics with text, and the distinction between a DTP package and a word
processor has become less clear cut.
Presentation software.
The growth of the use of presentation software has followed the development of portable
computer systems. If a salesman is to do a presentation to a group of people it is now
possible for him to take a computer to the meeting with a previously prepared
presentation on it. The software allows for the preparation of a show which typically
follows a storyboard of individual screens. The software allows morphing from one
screen to another and also allows animation and full use of text and graphics within
the 1970s there were fewer than 200 magazine periodicals available in Britain because of
the difficulty of setting up a new publication and the cost which could only be
recuperated if there were sufficient sales of the magazine. The cost of producing a
magazine has fallen so much that a small circulation title will still make a profit, and the
production is very simple, often a one person job. This has led to there being many
thousands of titles now available, although it has, perhaps, done little for the quality of
such titles.
Presentation Software.
Presentation software allows someone to prepare a series of inter related slides to
accompany a talk that is being given, or even to be a stand alone system. Each slide has
animations, colour and colour change, the ability to morph into the next slide and many
other features. When such software was first available those who used it produced
presentations that were out of the ordinary and consequently it was seen as something to
aspire to because of the novelty factor being able to hold the attention of an audience.
However, as the use of such presentations became more common, it became necessary to
use more and more complex techniques to maintain the novelty factor. This leads to
presentations becoming overloaded with tricks in order to make an impact. This distracts
from the message that is being attempted to be put across to the audience. There is no
doubt that presentation software can be used to make a message more accessible to the
audience, but it is also true that no amount of clever gimmickry can hide a poor message.
Drawing Packages.
Drawing packages are, strictly speaking, software that allows the creation of graphics
using vector graphics as opposed to painting packages that use bitmaps. However, in this
context the syllabus is referring to the concept of the user being able to create graphics
which can then be imported into other software packages to enhance the work that is
being done. No longer does the school worksheet need to be a simple text document, but
diagrams, pictures, even photographs can be included.
Example Questions.
1.
Discuss the reasons that a solicitors practice would have for choosing off-the shelf
software rather than custom written software if it was decided to change the word
processor currently being used because it was perceived to be out of date. (4)
A. The office manager would be keen to go ahead with the purchase as soon as
possible because all the decision making would have been done and the need has
already been established. When making the decision to change, current packages
available would have been evaluated so there is probably some confidence in what
is available. The office is likely to be a relatively small operation with few users,
hence the relative costs of buying custom software compared to off-the-shelf
software would be very high as would the costs of the staff training.
Notes: The difficult question first in this section. A question which starts with
Discuss is expecting a certain amount of analysis of the situation, not just hard
facts. Also expected is a linking of the question to the scenario given. Notice that
there is an indication in the number of marks for the question of the degree of depth
of the answer. There were plenty of other points that could have been made in
answer to this question but plenty have already been stated to get the four marks,
and four marks means four minutes to answer the question and with reading and
thinking time Ive certainly used that up.
2.
In the same scenario, State two reasons why custom made software might be more
appropriate than off-the-shelf software.
(2)
A. -This application may need more specialised routines than are available in off-the
shelf software
-Many of the routines in the off-the-shelf software will not be relevant
Notes: A far simpler question than the first one. It simply needs two statements of
fact, the standard answers in the text, with no need to describe or explain, though
notice that there is some relating to the scenario.
3.
4.
can use directly. Another form of data input used by banks is the magnetic ink characters
that are printed on the bottom of cheques before being sent to the account holder. The
magnetic ink is particularly easy for the computer to read and contains enough
information to identify the bank and the account at that bank. All of this can be done with
no further human intervention after the original printing of the cheque book. However,
the data that is written on the cheque by the customer (who it is made out to and for how
much) is not ready for input and hence requires some human intervention to make it
useable.
Manual data entry.
The most obvious is the form that has been designed to collect data, which needs to be
input to the computer. An operator reads the data on the form and then types it into the
computer via a keyboard. An extra stage has been added here, the data has had to be
typed in, in other words the original data was not in a form acceptable to the computer.
Computer systems are available that will read individual characters and input them
without the data having to be transcribed, this would count as automatic data collection
(it is known as optical character reading (OCR)).
Questions on this part of the syllabus will be suggesting suitable input methods for
particular situations, and offering advantages and disadvantages for particular forms of
data input in different situations.
1. Range check. A mathematics exam is out of 100. A simple validation rule that the
computer can apply to any data that is input is that the mark must be between 0 and 100
inclusive. Consequently, a mark of 101 would be rejected by this check as being outside
the acceptable range.
2. Character check. A persons name will consist of letters of the alphabet and sometimes
a hyphen or apostrophe. This rule can be applied to input of a persons name so that
dav2d will immediately be rejected as unacceptable.
3. Format check. A particular application is set up to accept a national insurance number.
Each person has a unique national insurance number, but they all have the same format of
characters, 2 letters followed by 6 digits followed by a single letter. If the computer
knows this rule then it knows what the format of a NI number is and would reject
ABC12345Z because it is in the wrong format, it breaks the rule.
4. Length check. A NI number has 9 characters, if more or fewer than 9 characters are
keyed in then the data cannot be accurate.
5. Existence check. A bar code is read at a supermarket check out till. The code is sent to
the main computer which will search for that code on the stock file. As the stock file
contains details of all items held in stock, if it is not there then the item cannot exist,
which it obviously does, therefore the code must have been wrongly read.
6. Check digit. When the code is read on the item at the supermarket, it consists of
numbers. One number is special, it is called the check digit. If the other numbers have
some arithmetic done to them using a simple algorithm the answer should be this special
digit. When the code is read at the check out till, if the arithmetic does not give the check
digit it must have been read wrongly, it is at this point that the beeping sound would
normally be heard if everything is alright.
forms of motion, unless the image being animated is complex. Animation is used so often
that it can come across as being a boring technique that has just been added for gloss.
Example Questions.
1. a) State two methods of data entry used by banks in their cheque system.
(2)
b) Explain why banks find the use of your two examples suitable for this application.
(4)
A. a)-Keying in of data, either to a disk for later entry, or directly onto the cheque in
machine readable form.
-MICR
b)-Keying in can be used to place the details of the payee onto the cheque together
with the amount,
-in machine readable form,
-or to store the data on a disk for future use.
-MICR is already in machine readable form
-placed on cheques at time of printing the cheque book
-means that complex figures like account number do not have to be keyed in which
would invite human error.
Notes: Although the answer is given as bullet points, the response expected would
be a prose explanation. Note that although MICR is not stated in the syllabus, the
examiner expects you to have a working knowledge of it and other input types not
stated. The syllabus actually says including, in other words any input device
may be alluded to in the question, although, in practice, the devices used in the
exam will be common and relevant to a simple situation.
2.
A small stall is to be opened, as part of a fairground, where the customer can have
their likeness printed on to the front of a sweatshirt. Describe two possible methods
of capturing the image to be printed.
(4)
A. -Digital camera
-connected to the computer which uses
-software to crop and present the image to the printer.
-Camcorder where the image is sent to..
-a video capture card which produces a still image on a screen in the same way as a
digital camera does.
3.
A mail order firm receives orders from customers on paper order forms. These are
keyed into the computer system by operators. The data that is to be keyed in
includes the 5 digit article number, the name of the customer and the date that the
order has been received.
a) Explain how the data input would be verified.
(3)
b) Describe three different validation routines that could be performed on the data. (6)
A. a)-Two operators would
-independently key in the data
-The two copies of the data are then compared..
-by the software..
-and errors are reported to the operators.
b)-Article number can have a length check carried out on it..
-if there are not 5 characters then the article number must be wrong.
-Name of customer can be checked with a character check..
-any characters other than letters or hyphen or apostrophe must mean that the check
has been failed.
-The date can be subject to a range check (actually a number of range checks)..
-the first two characters must be less than 32.
Notes: Do not use the verification technique of printing out the data so that the
customer can check it. This is a mail order company and hence this would be
impossible. There are many possible alternatives for part (b). Choose them carefully
so that there are three different ones and so that all three pieces of data are used.
Notice that there are two answers for each one, meaning that the examiner wants to
know what the type of check is, and also the rule that has to be followed by the data
to be treated as valid.
4.
5.
Explain what is meant by the timeliness and relevance of data.
(2)
A. -Timeliness is the concept that data changes over time and that data is only part of a
sensible solution for a short period before it becomes outdated.
-Relevance of data means that data has a bearing, or use, in that particular
application.
Note: These are simple definition answers. Having said that the answers here would
not be expected, any answer that has the essence of the correct answer would be
acceptable. Examiners are aware that students take these papers under a lot of
pressure and in a question like this will do their best to compensate as long as the
germ of the answer is there.
Example Questions
A company has a workforce of around 2000. Some work in the office using the
computer system for administrative tasks, while others use the computer system on
the production line for giving details of orders that need to be manufactured.
1.
Describe the factors that would have been important in the design of the software
interfaces to be used by the office workers and the shop floor workers.
(6)
A. -Ability of workers with computer systems..
-have they received training/are they used to computer use
-The environment in which the system would be used
-lighting conditions on the shop floor may be different to those in the office..
-colours will have to be different on the screen in order to maintain contrast.
-What output will be expected from the computer?..
-The office will probably use text while the..
-shop floor will probably need diagrammatic responses.
-The hardware that is going to be used to communicate in the HCI..
-will determine style of interface, e.g. touch screen input or keyboard.
Notes: Although the hardware has been mentioned briefly in passing, the answer
must be limited to software because of the question. These are standard answers
taken from the text. Each answer needs to be expanded a bit because of the word
describe in the question.
2.
Select appropriate peripheral hardware for these two application areas, giving
reasons for your choices.
(12)
A. Office:
-Keyboard/mouse for input because
-input is likely to be character based owing to typical office tasks.
-Monitor/laser printer for output because..
-output needs to be checked and then high quality printout for documents to be sent
outside firm.
-Hard drive for storage because..
-of need to store and retrieve documents out of sequence.
Factory:
-Touch screen for input because..
-dirty environment could damage other forms of input device.
-Plotter for output in order to..
-produce design quality drawings for use in manufacturing process.
-Hard drive for storage in order to..
-store number of high quality drawings.
Communication:
-Necessary for communication, either between machines or to some central
resource/LAN..
-requiring cabling/network cards.
Notes: The standard form of the hardware question requiring answers for
input/output/storage/ and communication where appropriate. In reality this is too
The office workers often have to key in the details of new members of the
workforce. The details of the worker are on a standard form which the new
employee fills in. Explain how a form based software interface would be useful to
the worker who has to key in the data.
(4)
A. -The interface will have specific areas to hold the answers to questions..
-these should match the positions of the answers on the paper form...
-making it difficult to put the details in the wrong place..
-or to miss any out.
-Validation routines will be set up on each data area..
-to check the data entry and reject anything not sensible.
-Some areas will not allow a non reply.
Notes: Again, standard answers which will gain full marks even if many of the
points are missing. There is an element of testing the candidates ability to analyse a
situation here, but the important point is to test whether the student understands the
concept of a form based interface.
4.
Explain the types of output that would be expected from the computer on the
factory production line, if it is used to control the speed of the production line as
well as being used as a tool for the workers.
(4)
A. -Menu type of interface on the screen so that
-a touch sensitive screen can be used for input.
-Hardcopy printout of the plans for products..
-produced by a plotter..
-so that they can be taken from the terminal and used at the point of manufacture.
-Sound so that..
-an alarm can be sounded if the line is travelling at the wrong speed.
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 accessed by members of the teaching
staff to find out where a student is at a particular time of day, or to look up their telephone
number in order to contact the parents. The database of information is a valuable resource
but it is not possible for an ordinary teacher to alter it.
Interactive information systems.
An interactive system is one that data can be entered for processing which may alter the
contents of the database. An example would be the school secretary updating the
attendance record of a pupil in the pupil file. In commerce, a stock control system in a
supermarket is an interactive information system because it not only gives information
like the price and the description of the goods for the till receipt (passive), but also
updates the number in stock immediately (interactive) so that when the next item is sold
the number in stock has already been altered.
Example Questions
1.
2.
communicate easily and that files were compatible. Nowadays, we have a society where,
world wide, there is a higher number of computers in homes than there are refrigerators
or baths.
The effect of this has been enormous on society, and the effects are what are discussed in
this chapter.
25 years ago the proportion of the worlds population that had access to a computer
system was tiny, nowadays it is very high, and increasing daily. However, there are still
large numbers of the population, even in a rich country like Britain, that do not have
access on a regular basis. There is a distinct danger that this will lead to another form of
class-divided society, not based on accident of birth, or based on wealth (or lack of it),
but based on whether a person has access to the information revolution.
Imagine two people who live in a village. The village has a grocers shop and newsagent.
The last bank in the village has closed because it was too costly for the bank to maintain
the branch which was losing money because so many of the villagers had changed to
running their account on the Internet. A person living in this village that has a computer
connected to the Internet will be able to pay their bills, order goods from the supermarket
20 miles away at a lower cost than buying them from the grocer, will have a wider variety
of choice from the supermarket than they could get locally. They will be able to book rail
tickets, at a discount, through the Internet, which will also allow them to pick up holiday
bargains. The second person does not have a computer, so has difficulty with having a
bank account, has to use the village shop with much higher prices, and does not have the
convenience of ordering on the Internet, if they want to book a holiday there is a 40 mile
round trip to find a travel agent in the nearest town. These two people are very different
in their life styles and the social changes that have occurred to, not just one of them,
because of the computer are immense.
When we add to this the fact that one of these people used to be employed by the bank to
run the branch in the village, but is now out of work, while the other has been told to go
on a training course to learn a new piece of software, the scale of how much our lives are
being effected by the use of new technology becomes even more evident.
Note that many of the changes made to our life styles have been forced rather than being
made by choice.
1.12.d Legislation
Most countries have now enacted legislation in attempts to overcome the problems that
were mentioned in section 1.12.c. The purpose of such legislation is to protect citizens
from something that by its very nature can be insidious because it is difficult to
understand the consequences of unrestricted use of personal information.
Legislation protecting personal information must not be confused with copyright law.
Copyright law protects intellectual property, in the case of a computer system it would
protect the person who has written the software rather than the user or the person whose
details are being stored. Each country will pass laws that are particular to that country,
but they largely follow the same model that is used in Britain.
Any personal data that is stored in a computer system must
be accurate and up to date.
be relevant to the task for which it is intended to be used and used for that original
purpose.
not be kept longer than is necessary.
be kept securely. Access to the data must be strictly controlled.
be available, on request, to the subject of the stored data.
Other measures that could be expected would be some control over the passing on of data
to other organisations, exemptions for reasons of national security or because it is thought
to be in the individuals interest.
In Britain the Data Protection Act that was passed in 1984 only applied to data that was
read magnetically, in other words was stored on a tape or a disk. It did not apply to data
stored on a CDROM because that is stored optically. This has now been changed by the
latest version of the act. This shows that, just like everything else in the world of
computers, things change very quickly and that human systems often find difficulty in
keeping up with the changes.
Attempts have been made to harmonise legislation across boundaries. The European
Union pass their own directives about data, but it is difficult to get agreement when
individual parliaments still have sovereignty.
the lighting suitable? If the lighting is the ordinary classroom lighting then it will make
the screens even more prone to glare. If the chairs are not comfortable then back
problems can occur. These can be lessened by using ergonomically designed seating
which encourages good posture.
Working with computers can cause stress, particularly among workers who were not
originally trained to use them. Historically, once a worker has attained middle age they
should be more experienced than the younger people coming in to the firm who will
probably be working under them. This situation has changed for many people because of
the use of computer technology. Because of the need to keep up to date with the latest
hardware and software it is now the young people coming into the firm that are more
experienced than those who have been there some time. This can lead to feelings of
inferiority and stress on the older workers.
In section 1.12.b it was mentioned that the new technology allows remote working in
many situations. While there are substantial benefits accruing from this practice there are
also problems brought about by the lack of social interaction that human beings get from
a shared work environment.
Environmental Issues
Strictly, this is not part of the syllabus, however an understanding of the implications of
the use of computers would be incomplete without comment about our environment.
Many years ago the use of computer systems in the office was hailed as the start of the
paperless revolution. In the 1950s LEO was invented. It was the Lyons (same company as
the cakes!) Electronic Office. The idea was that paper would become a thing of the past
because messages would all be sent electronically. The environmental implications of this
were tremendous. No more cutting down forests to provide paper, no more burning of the
documents that are no longer needed so that they remained confidential, with an
electronic office this was no longer necessary. There was one tiny problem. With the
introduction of machines the amount of paper increased massively. The explanation is
simple. Consider a project that you are doing for one of your courses. How many sheets
of paper do you use? Not, how many do you hand in?, but how many do you use? The
difference is that if you have made a mistake you correct it and get another printout, if
you were using a typewriter you wouldnt do that. When you send something for printing,
how often does the printer produce an extra sheet? Do you save it and put it back in the
paper tray? How often does the printer not print properly making another printout
necessary? How many people printing off a spreadsheet havent given the limits of the
sheet so that the printer has printed 20 or 30 sheets of blank cells before anyone has
noticed? The same sort of things happen in business, so what should have been good
news environmentally has tended to backfire.
As has been mentioned before in this chapter, there is an element of people being able to
work from home rather than having to commute. This has obvious advantages in that the
pollution is cut down because there are fewer vehicles on the road, but it is not all good
news, because if 50 people dont 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 the office block because some workers have to go in
to work and therefore the office block must be fully heated.
The computer systems themselves have to be produced. There is an environmental cost
here on two fronts, the computer requires a certain amount of power to enable the factory
to make it, and then there are the raw materials that are needed in the manufacture.
When computers are eventually finished with and need to be replaced, there is a large
amount of hardware that needs to be got rid of. Some is recyclable. Chips are heated in
order to recover the gold used in their manufacture, and some parts of the chassis can be
melted down and reused. However, much of the content of a system is not economically
viable to reuse and consequently is discarded. As the life of a system in business is about
two years this adds up to an enormous waste of resources. When it is also realised that
some of the contents of a system are heavy metals and other toxic materials the
environmental problems of replacing a system are great.
Example Questions
1.
Discuss the implications for customers of a travel agent closing down their agencies
and doing all their business on the Internet.
(6)
A. -Lower overheads for the business
-meaning that customers can expect to pay lower prices.
-Information will always be up to date because up dated centrally..
-but customer may find more difficulty in finding the information required because
there is no assistant to help.
-Customers who have the Internet will be able to access late bargains
-Customers without the Internet may find difficulty in booking any holiday.
-Customers with disabilities, particularly blindness may be more disadvantaged
than most
-Complaints, if things go wrong, will be harder to make.
Notes: There are other points to make but only 6 marks, so dont waste too much
time. When you think you have earned the marks, stop. The question is quite
specific about it being from the point of view of the customer, so dont start to talk
about workers losing their jobs. It may be true, but does not answer the question.
Although the mark scheme would be set out in this way, the question does use the
keyword discuss, so dont just write notes, the examiner is looking for a coherent
argument which contains six of the sensible points.
2.
Describe two ways in which a computer system in the home can alter the
interaction of the family with the outside world.
(4)
A. -Children play computer games
-stops them going out and consequently they are safer, but
-effects their social development.
-Parents may use the computer to work from home
-cuts down the time spent commuting to work and allows for more leisure time
-but may increase stress and worry about work because of reduced contact with
colleagues.
Notes: Sensible to use obviously different members of the family. Need to say at
least two things for each one because the question uses the keyword describe. If
you were thinking of saying that they could send emails rather than write letters it
may be worth a mark but is a little trivial for both marks.
3.
4.
5.
Describe the consequences of allowing upper school pupils to use the Internet to
find information for project work.
(4)
A. -There is a danger that those pupils who have access to the Internet outside school
will use it anyway, and
-therefore it is only right to allow access in school.
-Pupils may find inappropriate sites
-which means that the teacher has to censor the material in some way.
6.
Outline the health problems that may be experienced by telecall operators and state
how such problems could be overcome.
(6)
A. -RSI
-Use sensible keyboards and properly designed furniture to encourage good posture.
-Eye problems caused by staring at the screen
-Wear glasses and fit anti glare screens.
-Problems associated with radiation from the monitor
-Sit further away from the monitor screen.
7.
Describe two ways in which the use of computer systems in business has harmed
the environment.
(4)
A. -The use of large amounts of paper because
-everyone now expects that when a final copy of a document is produced it is
perfect, leading to many copies being produced.
-The high turn over of machines means that many new machines have to be
produced and
-the old ones must be disposed of. They contain toxic material which can harm the
environment.
End
The example shows the individual instructions in nice neat little boxes, this is certainly
not necessary, and also uses the normal rule of reading down a page. However, providing
the arrows are in the correct order then the instructions can be placed anywhere. This type
of representation of the algorithm is known as a flow diagram.
There are many other ways of defining the solutions to problems, some of which you will
meet later in this course.
One way of describing the modularisation of a problem is to use a diagram to show how
the parts fit together. Dont worry about such diagrams at the moment, we will meet them
again in module 3 and they will become important when we want to explain the solutions
of the major project in module 4 of this course.
If we imagine the same problem, and start with a control module, then realise that we
have to provide an input module, and so on the problem will still be solved, although
the approach is the opposite to the one that we have just considered. This type of
approach is known as a bottom up approach. Although the outcome is the same it is a far
more dangerous way to approach the problem because the final outcome has not been
considered and may not be arrived at by the most efficient algorithm.
Start
Program instructions
End
This type of combination of operations is known as a sequence. However, the real power
of computer programs becomes apparent when we change these rules. There are a
number of ways of breaking out of the simple sequence, we will look at two of them here.
1.
Selection
Selection is the process of making a choice. The simplest example is the command If
ThenElse 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
Condition
Met
Not met
Start
This example simply gives two options, the condition statement can have a number of
possible results, each giving a different route.
Note that, eventually, all these different routes must either come back together or must
have some suitable end point.
2.
Repetition
There are a number of ways of repeating the same instructions more than once. We will
have a look at three methods here. Each one of these methods have two things in
common. The first is some sort of pointer that sends control of an algorithm to some
point other than the next instruction in the sequence, and the second is some method of
controlling whether the pointer is followed or whether the normal sequence of
instructions is followed.
A repeating construct is often called a loop.
a) The first of these loops is one where the control of the loop is at the end of the loop. It
is called a REPEATUNTIL loop.
c) The third type of loop is called a FORNEXT loop. This loop is repeated a
predetermined number of times. A counter keeps check of the number of times the loop
has been done, and when it has done enough the loop is exited.
(LOOP)
Go back to the start of the loop
Note that with the For/Next loop the number of times around the loop is determined
before entry into the loop.
Start
Program instructions
End
If the program has been split into sections by modularising the algorithm, it is more likely
to look like this:
Start
Start of Module 1
Start of module 2
End of module 1
End of module 2
End
Each of the modules is called a procedure when it is in the form of a program of
instructions. The diagram shows a main program which, just under half way through,
runs a procedure to carry out a particular task, which itself runs another procedure. Note
two things about these procedures:
1. If they work something out, presumably they must pass the answers back to the main
program, otherwise they have been wasting their time.
2. When the procedure has been finished the next instruction is back where it came from
in the first place. This means that the computer must remember whereabouts it was when
it went to the procedure so that it can go back there.
We are not going to answer either of these questions now, but will return to them later.
A procedure could be used for putting a menu on the screen, and then another could be
used for reading the choice made and acting upon it. At some point a procedure could be
used to work out the square root of a number. This is slightly different because the result
at the end of the procedure is a value which, presumably, will be used in the main
program. A procedure which gives a value at the end is known as a function.
Program Translation
When a human being writes a computer program it is important for them that they can
use a language which is easy to understand. After all, the algorithm will probably be
difficult enough to follow without the language being difficult as well. Computer
languages like this, that the person finds easy to understand, but the computer cant, are
called high-level languages.
A computer can only understand 0s and 1s, in other words, binary numbers. So the
language which the computer uses is all in binary and very difficult for human beings to
use. Languages like this are called machine code languages. If the program is written in a
high level language and the computer can only run it in machine code, then it has to be
translated from one to the other, just as a letter in Chinese may need to be translated into
English if an English speaker is to be able to read it.
High-level
Language
Translator
Machine
code
A program which is written in a high level language is called the source code. After the
source code has been translated the program is called the object code (or executable
form).
Source
code
Translator
Object
code
The object code is normally much bigger than the source code because it takes lots of
machine code commands for each of the high level language commands.
There are two types of translator, one is called a compiler and the other is called an
interpreter. We do not need to know any more about these two translators yet.
Testing Methods
When a system is designed it is important that some consideration is given to making
sure that no mistakes have been made. A schedule should be drawn up which contains a
test for every type of input that could be made and methods of testing that the program
actually does what it was meant to do. This schedule is known as the test plan. Note that
it is produced before the system is produced.
There are a number of ways of testing a program.
1. Different values can be input for variables to determine whether the program can cope
with them. These values should include typical values, borderline values and values
which are not acceptable. For example, if a program is written which uses marks out of
100 from a maths examination as input, the test data would include typical data like 27,
73.., borderline data which would be 0 and 100, and unacceptable data like 34, 123,
16.345 This type of testing is called black box testing.
2. White box testing is testing the program to determine whether all the possible paths
through the program produce the desired results. As a large program can have a very
large number of routes, when you take into account the different condition statements and
loops, white box testing is rarely carried out exhaustively.
Think of black box as a test where you cannot see into the box (program) all you see is
what comes out at the end. White box testing means that you are able to see what is
happening as the data goes through the box because it is transparent.
3. Alpha and Beta testing. When you have written a program and you sit down to test it,
you have a certain advantage because you know what to expect. After all, you wrote the
program. This can be extended to the whole software company, as the employees are all
computer-minded people. Testing carried out by people like this is known as alpha
testing. Eventually, the company will want ordinary users to test the program because
they are likely to find errors that the software specialists did not find. Testing carried out
by the users of the program is called beta testing. If you continue the course next year, in
order to turn your AS grade into an A level, you will have to write a project. This involves
using a computer to solve a problem for someone. When you have finished your project
you will be expected to test whether or not it works, this is alpha testing. You will also get
marks if you persuade the person whose problem you are solving to test it for you, this is
the beta testing.
Debugging
Errors in computer solutions are called bugs. They create two problems. One is correcting
the error, this is normally fairly straightforward because most errors are caused by silly
mistakes. The second problem, however, is much more complicated, the errors have to be
found before they can be corrected. Finding where the error is, identifying it, can be very
difficult and there are a number of techniques available for solving such problems.
1. Translator diagnostics. In section 1.3.e we were introduced to the idea of a translator
program. Each of the commands that are in the original program are looked at separately
by the translator. Each command will have a special word which says what sort of
command it is. The translator looks at the special word in the command and then goes to
its dictionary to look it up. The dictionary tells the translator program what the rules are
for that particular special word. If the word has been typed in wrongly, the translator will
not be able to find it in the dictionary and will know that something is wrong. If the word
is there, but the rules governing how it should be used have not been followed properly,
the translator will know that there is something wrong. Either way, the translator program
knows that a mistake has been made, it knows where the mistake is and, often, it also
knows what mistake has been made. A message detailing all this can be sent to the
programmer to give hints as to what to do. These messages are called translator
diagnostics.
2. Sometimes the program looks alright to the translator, but it still doesnt work properly.
Debugging tools are part of the software which help the user to identify where the errors
are. The techniques available include:
a) Cross-referencing. This software checks the program that has been written and finds
places where particular variables have been used. This lets the programmer check to
make sure that the same variable has not been used twice for different things.
b) Traces. A trace is where the program is run and the values of all the relevant variables
are printed out, as are the individual instructions, as each instruction is executed. In this
way, the values can be checked to see where they suddenly change or take on an
unexpected value.
c) Variable dumps. At specified parts of the program, the values of all the variables are
displayed to enable the user to compare them with the expected results.
3. Desk checking is sometimes known as a dry run. The user works through the program
instructions manually, keeping track of the values of the variables. Most computer
programs require a very large number of instructions to be carried out, so it is usual to
only dry run small segments of code that the programmer suspects of harbouring an error.
4. In section 1.3.b we discussed the splitting up of a problem into smaller and smaller
parts, until each part was a manageable size. When the parts were combined they would
produce a solution to the original problem. Because we are starting with a big problem
and splitting it into smaller problems, this was called top-down design. When the
program is written, each small program is written separately, allowing the small programs
to be tested thoroughly before being combined. This is called bottom-up programming.
The technique is particularly useful for testing the finished program because it is far
easier to test a lot of small programs than it is to test one large one. One problem can
arise, because the small programs have to be joined together, these joints have to be
tested too to make sure that no silly mistakes have been made like using the same
variable name for two different things in two parts of the program (tested by cross
referencing).
5. Test strategies are important to establish before the start of testing to ensure that all the
elements of a solution are tested, and that unnecessary duplication of tests is avoided.
Annotation
Program writers need to be aware that the programs that they write will need to be
maintained long after they have gone on to other projects. For example, a program is
written to control the stock in a warehouse. The program has been fully tested and any
problems appear to have been solved. Some months later, a particular chain of events
occurs that means that the software does some instructions in an order that has never
arisen before, and an error occurs. Someone has to find the error in the program. Some
time later, the warehouse expands in order to deal with an increased supply of goods and
the computer system needs to be amended to allow enquiries from the Internet. This again
implies that the program will need to be altered to accommodate the new circumstances.
In both these cases it is highly unlikely that the original programmer will be the person
that has to do the adapting of the code.
The new programmer is going to be grateful for all the help they can get in understanding
the old program. Help given in the code itself is known as annotation, the purpose of
which is to make the code as simple as possible to follow.
One way to help demonstrate the structure of the program is to make parts of the
code stand out from the rest by indentation. If this is done without some thought
then it is meaningless, but if a procedure of a program is made to stand out in this
way then it is very easy to see whereabouts the procedure is.
If there is a loop structure, perhaps a WhileEndwhile loop inside the
procedure, then that can also be made to stand out by using a further
indent.
Many programming languages automatically indent some of the programming
constructs available in the language.
Another way is to write comments in the code of the program which are aimed at a
human being looking at the program, rather than at the computer that is running it. Most
programming languages have an instruction that can be used for this. It simply tells the
computer that anything that comes in this instruction is to be ignored.
A further technique is to use sensible variable names. If an input is required at some point
in the program, and the input is the number of marks that the student obtained in their
maths exam, the variable used to store the number could be many things. However, if the
variable name X was used, another programmer looking at the code would need extra
information to understand what X stood for. If the original programmer had used the
variable name MATHS_MARK, the name is self-explanatory and hence makes the
program easier to follow.
The other obvious way of making the program easier to follow is to adopt a top-down
design which enables the individual procedures to be easier to understand than one large
program.
Example Questions.
1.
A roll of wallpaper is 50cm wide. Each roll is 15m long. A room measures x metres
long by y metres wide and 2.5 metres high. Ignoring the door and any windows that
there may be, describe an algorithm for calculating the number of rolls of wallpaper
needed to paper the room.
(4)
A. -Add twice x to twice y/Work out total length of walls
-Divide by .5metres/work out the number of strips of paper needed
-Divide 15metres by 2.5metres/work out the number of strips in one roll of paper
-Divide number of strips needed by the number of strips in one roll
-Indication of the order required.
Note that the mark scheme is not presented in any particular algorithmic form. This
is because the syllabus does not specify that a particular form be used so it is
entirely up to the candidate, provided that the two points about stating the tasks to
be carried out and specifying an order are met. Also notice that the first three steps
of the algorithm are presented in two ways. One could be called mathematical while
the other is descriptive. Either is perfectly acceptable. One last point about the mark
scheme is that an algorithm implies that order is important, so it is highly likely that
in an exam, such a question would insist on an order as an essential feature of the
solution. In other words one mark would be reserved for providing a definite
statement of order.
2.
(4)
Give three advantages to using a top down approach when designing a solution to a
problem.
(3)
A. -Many people can be involved in the solution
-Individual skills can be used
-A module can be used from the software library
-Each module is far easier to understand than the whole program is.
-Fewer errors are likely to be made
-Any errors that are made will be easier to correct.
A standard question, whose answer jumps from the notes.
4.
A.
5.
a)
A.
b)
A.
These are not unique possibilities. There are plenty of other ways of achieving the
same results. The mark scheme is really one mark for correcting each of the output
errors in the original.
6.
a)
A.
b)
A.
7.
REPEAT
INPUT NUMBER
IF NUMBER <> 0 THEN TOTAL = TOTAL + NUMBER
COUNT = COUNT + 1
ELSE ZERO = ZERO + 1
UNTIL COUNT = 5
ANSWER = TOTAL/COUNT
PRINT ANSWER, ZERO
If the numbers 3,5,4,0,4,0,9,1 are used as data for this procedure, state what the
printout will be when the procedure is completed.
(2)
5 and 2. (1 mark each)
Identify the condition statement, and explain what it does.
(3)
-IFTHEN
ELSE
-Decides whether the number input is zero or not.
-A count is kept of all the zeros input, and the other numbers are used in the
calculation.
Note that the algorithm is provided. It would be hard to expect candidates to
produce algorithms of this type in an exam, to all but the most trivial of problems.
The description in part (b) can be in the broadest terms. The examiner is not looking
for a brilliant insight into the logic, simply for an indication that the student
understands the general principles.
8.
Describe the relationship between the source code and the object code.
(2)
A. -The source code is the original program while the object code is after translation.
- There is a one to many relationship between the two.
Note. This could have been a very complex answer. However, you dont know a lot
about translators and their effects yet, and a look at the number of marks available
tells you that the answer is strictly limited. The second mark point is rather
strangely put, it simply means that the object code is longer than the source code,
and if thats what you said you would get the mark.
9.
10.
A program is written that will allow the user to input a list of 5 numbers and will
print out the largest and the smallest of them.
The program is to be tested to see that it works under all conditions. The
programmer decides to use the test data 3,4,2,5,6,7 in order to test what will happen
if more than 5 numbers are input.
Give four other different sets of test data explaining the purpose of each.
(8)
A. - 1,3,-4,6,5
-To determine how it handles negative numbers.
- 1,3,4,-6,5
-To determine whether it chooses the largest number according to magnitude or
whether it takes the sign into consideration.
- 1.5,3,4,5,6
- To determine whether it can deal with fractions.
- 1,1,1,1,1
-To see what happens if the largest and the smallest are the same.
Note. There are many more sensible sets of test data that could be used. These are
just examples. Make sure that you read the question carefully and give different
sets of test data. Just changing the data doesnt make it different, it is the reason for
the choice of data that must be different.
11. Explain the difference between alpha testing and beta testing. (2)
A. -Alpha testing is done by the programmer or in the software house.
-Beta testing is done by the user.
12.
Explain how the translator program can issue error diagnostics and give an example
of an error that can be spotted by the translator.
(3)
A. - Translator compares reserved word/syntax (rules) in its dictionary
- If different to what is in the dictionary the user can be told what and where the
error is.
-eg PLINT is not in the dictionary of words that it knows, so there must be an error.
Note. The same example has been used again. I know this one is right, why risk
changing it?
13.
Bugs are common in computer programs. Describe two techniques that can be used
to help debug a program.
(4)
A. - Cross referencing of variables
- checks the program for occurences of the same variable being used more than
once.
- Trace table.
- As the program is run the values of the variables are printed out as the instructions
are executed, allowing the user to see where sudden, unexpected, changes have
occurred.
Note. There are lots of possible answers here, always choose the two answers that
you are absolutely sure of.
Output Design
Output is the primary purpose of any system.
These guidelines apply for the most part to both paper and screen
outputs. Output design is often discussed before other aspects of design
because, from the client's point of view, the output is the system.
Output Documents
Printed Reports
Input Design
question (e.g., "Do you really want to delete this file?") where the latter
requires that the user know what he or she wants to do next (e.g., MSDOS C:> prompt; VAX/VMS $ prompt; Unix shell prompt). GUI Interface
(Windows, Macintosh) provide Dialog Boxes to prompt user to input
required information/parameters.
o
o
Rules
o
o
o
o
o
o
o
o
o
o
o
o
control of the system, rather than that the system is in control of them.