LEADBETTER, BLACKFORD AND PIPER: COMPUTING (AS AND A LEVEL) CVR C M Y K
Coursebook
Chris Leadbetter, Roger Blackford and Tony Piper Based on the new Cambridge International Examinations AS and A Level Computing syllabus (9691), this coursebook is written by experienced authors. It follows the syllabus in a chronological fashion with four Modules to match the four Sections of the syllabus and each Module divided into chapters to match the syllabus subsections. Material that is not required for the exam is highlighted as ‘Extension’ material allowing students to investigate topics of particular interest in more depth, whilst reassuring other students that it is detail they can ignore if they want to. The coursebook contains: - narrative in plain English suitable for International students throughout the world - clear explanations of concepts using diagrams, screenshots and photos - self-assessment questions with hints at the end of each chapter, and answers at the back of the book, to give students the opportunity to assess their own development and/or revision needs - exam questions from real past papers at the end of each unit to give the students plenty of exam practice - Syllabus codes throughout the text to allow easy crossreferencing to the syllabus - Activity and Discussion boxes throughout the book that can be used for classroom work or independent investigation - a chapter devoted to exam preparation to help students get ready for the exam - a glossary to allow quick access to key and/or difficult terms. Completely Cambridge – Cambridge resources for Cambridge qualifications Cambridge University Press works closely with Cambridge International Examinations as parts of the University of Cambridge. We enable thousands of students to pass their Cambridge exams by providing comprehensive, high-quality, endorsed resources. To find out more about Cambridge International Examinations visit www.cie.org.uk Visit education.cambridge.org/cie for information on our full range of Cambridge International A Level titles including e-book versions and mobile apps.
Leadbetter, Blackford and Piper
9780521186629
Computing
Cambridge International AS and A Level Computing Coursebook
Cambridge International AS and A Level
Chris Leadbetter, Roger Blackford and Tony Piper
Cambridge International AS and A Level
Computing Coursebook
Chris Leadbetter, Roger Blackford and Tony Piper
Cambridge International
AS and A Level Computing Coursebook Completely Cambridge – Cambridge resources for Cambridge qualifications Cambridge University Press works closely with University of Cambridge International Examinations (CIE) as parts of the University of Cambridge. We enable thousands of students to pass their CIE Exams by providing comprehensive, high-quality, endorsed resources. To find out more about CIE visit www.cie.org.uk To find out more about Cambridge University Press visit www.cambridge.org/cie
cambridge university press Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo, Delhi, Mexico City Cambridge University Press The Edinburgh Building, Cambridge CB2 8RU, UK www.cambridge.org Information on this title: www.cambridge.org/9780521186629 © Cambridge University Press 2012 This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published 2012 2nd printing 2013 Printed in the United Kingdom by Latimer Trend
A catalogue record for this publication is available from the British Library ISBN 978-0-521-18662-9 Paperback Cover image: Gusto images/Science Photo Library Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party internet websites referred to in this publication, and does not guarantee that any content on such websites is, or will remain, accurate or appropriate. Information regarding prices, travel timetables and other factual information given in this work is correct at the time of first printing but Cambridge University Press does not guarantee the accuracy of such information thereafter.
Contents Inroduction
v
Acknowledgements
vi
1
Computer systems, communications and software
1
1.1
Components of a computer system and modes of use
2
1.2
System software
4
1.3
Data: Its representation, structure and management
15
1.4
Hardware
30
1.5
Data transmission and networking
44
1.6
Systems development life cycle
54
1.7
Choosing appropriate applications software
66
1.8
Handling of data in information systems
76
1.9
Designing the user interface
87
1.10
Logic gates
91
Module 1 Exam questions
98
2
Practical programming techniques
107
2.1
Designing solutions to problems
108
2.2
The structure of procedural programs
122
2.3
Data types and data structures
142
2.4
Common facilities of procedural languages
155
2.5
Writing maintainable programs
163
2.6
Testing and running a solution
171
Module 2 Exam questions
177
Contents
iii
3
Systems software mechanisms, machine architecture, database theory, programming paradigms and integrated information systems
181
3.1
The functions of operating systems
182
3.2
The functions and purposes of translators
195
3.3
Computer architectures and the fetch–execute cycle
206
3.4
Data representation, data structures and data manipulation
212
3.5
Programming paradigms
233
3.6
Databases
262
3.7
Simulation and real-time processing
274
3.8
Networking
281
Module 3 Exam questions
292
4
iv
Computing project
299
General description of the computing project
300
4.1
Quality of report
304
4.2
Definition, investigation and analysis
305
4.3
Design
310
4.4
Software development, programming, testing and installation
315
4.5
Documentation
319
4.6
Evaluation
322
Revision guidelines
324
Answers to Test yourself questions
329
Answers to Exam questions
360
Glossary
415
Index
430
Contents
Introduction This full-colour, highly-illustrated textbook has been written by experienced authors specifically for the University of Cambridge International Examinations AS and A Level Computing syllabus (9691). The four modules of the book follow the four sections of the syllabus, and there are syllabus codes throughout to provide an easy reference to the syllabus. This enables students and teachers alike to make sure they are on track to cover the complete course. The narrative provides clear explanations that are supported by diagrams, screenshots and photographs, bringing the topics to life. At the end of each chapter, there are self-assessment questions with answers at the back of the book. These relate to the material covered in the chapter, and offer an opportunity to revise concepts just learned, or to test understanding. Whilst these are not examination questions, each comes with a mark allocation to get the students into the practice of always thinking carefully about each point they make. The questions often include useful ‘Hints’ from the authors, particularly with respect to mark allocations. The answers also include ‘Comments’ from the authors in places where there are common pitfalls or typical errors.
Throughout each chapter there are ‘Activity’ and ‘Discussion’ boxes (see images below). These are questions or points for individual or class discussion. These allow students to explore the topics in more detail and really test their understanding.
Discussion
At the end of each Module, there are examination questions from real past papers. These will cover content from all the chapters in the Module in a random order. Each has the real mark allocations indicated and gives the students targeted exam practice for the given topics of that unit. The answers to these questions are provided at the back of the book, complete with ‘Comments’ from the authors in places where, in their experience, students have struggled in the examinations. There is also a chapter at the end of the book devoted to exam preparation that offers student general advice for coping with the examinations. However, learning is about more than passing an examination; it is about increasing knowledge. Therefore, there are numerous places where the book goes beyond the scope of the syllabus. This ‘Extension’ material (indicated by the boxes shown below) is there for those that want to carry out independent study or further research into the given topic. Please note that this material is not in the syllabus and therefore will not be in the examination.
Extension
Activity Finally, there is the glossary of key terms. Here, you should find an easily accessible means to remind yourselves of the important terms you have learned as you progress through the course. We hope you enjoy the textbook and the course. The author team.
Introduction
v
Acknowledgements We would like to thank the following for permission to reproduce images: Cover: Gustoimages/Science Photo Library 1.2.7 Reproduced with the permission of Winzip Computing; 1.4.3 Shutterstock / Joel Dietle; 1.4.5 Shutterstock/ Kostia; 1.4.6 Shutterstock / Stephen Coburn; 1.4.7 Shutterstock / Vixit; 1.4.8 Shutterstock / Iakov Filimonov; 1.4.9 Shutterstock / OtnaYdur; 1.4.10 Shutterstock / shutswis; 1.4.11a Shutterstock / Daboos; 1.4.11b Shutterstock/ 3d brained; 1.4.12 Doug Steley A / Alamy; 1.4.13a Ted Foxx / Alamy; 1.4.13b Shutterstock Dja65; 1.4.13c Shutterstock / Robert Milek; 1.4.14 Courtesy of mucad.com; 1.5.1 Shutterstock / Deymos; 1.7.1 Chris Fertnig / Alamy; 1.7.2 Shutterstock
vi
Acknowledgements
/ Yuri Arcurs; 1.7.3 Shutterstock / Chuck Rausin; 1.7.4 Shutterstock / SFC; 1.7.8 aberCPC / Alamy; 1.8.1 Courtesy of Tom Dalton, Assistive Technologies; 1.8.2 focus mankind / Alamy; 1.8.4 Shutterstock / Jiri Hera; 1.8.5 Len Holsborg / Alamy; 1.9.1 Reproduced with the permission of Articulate; 3.7.1 Reproduced with the permission of LEGO® MINDSTORMS®; 3.7.2a JHP Public Safety / Alamy; 3.7.2b Shutterstock / lenetstan; 3.7.2c Art Directors & TRIP / Alamy; 3.7.3 Shutterstock / John Kasawa; 3.7.4 Francisco Cruz / Superstock; 3.8.1a Wendy White / Alamy; 3.8.1b Sergey Galushko / Alamy; 3.8.1c: Hugh Threlfall / Alamy. Examination questions are reproduced by permission of University of Cambridge International Examinations.
1
Computer systems, communications and software
1.1
Components of a computer system and modes of use
A “computer system” is made up of hardware and
flow of data and information. The storage device is both
software. In this chapter we explain the terms relating
an input device and an output device.
to a computer system that will be used throughout the rest of the coursebook. 1.1 a, b
main memory (hard disk drive)
Definitions and purposes of hardware devices
input device
The hardware is the physical electronic and electrical T components that make up the computer system. For
processor (CPU)
output device
storage device
example, these include the motherboard, a keyboard and a monitor. In this section, we explain terms relating
Figure 1.1.1 Fi 1 1 1 The Th typical i lh hardware d off a computer system.
to hardware devices that we use throughout the rest of the text.
In Chapter 1.4, we look at various types of hardware
Peripheral devices are hardware devices that
in more detail.
are outside the central processing unit (CPU). They are normally connected to the computer by internal
1.1 a, c
Definitions and purposes of software types
wiring (buses), cables or wireless technology. A
Software is the set of instructions that make the
printer is obviously a peripheral as it is separate from
computer hardware usable. These sets of instructions
the computer. A hard disk drive is also a peripheral
are known as “programs”. So, a computer program is a
because it is not part of the CPU. This is less obvious
piece of software. It is important to distinguish between
because it is in the same box as the computer.
operating system software and generic applications
Most peripheral devices are one of three types: ●
the computer processor. A computer is only of
●
Operating system software is the set of instructions that make the hardware of the computer available for
value if it is possible to give it data and processing
use. It includes programs:
instructions.
●
An output device conveys the results of processing from the computer processor to the user.
●
software.
An input device transmits data from the user to
computer ●
A storage device can store data outside the processor. When a computer system is switched off, data in the processor are lost. Data that are needed for future use must be saved to a storage device
that allow the user to communicate with the that control the movement of data around the computer
●
that turn instructions that people can understand into instructions that a computer can recognise.
Applications software is a set of instructions designed
Figure 1.1.1 shows a typical set of hardware in a
to make the computer do something for the user. For
computer system. The arrows show the direction of
example, the user might want to write a letter, create a report or create a slide show presentation.
2
Module 1
Software that can be used for many tasks is
can process payroll data, print payslips and
called generic applications software or general purpose
generate BACS payments. It cannot process electricity
applications software. Microsoft Office is a suite of
billing data.
generic applications, including Microsoft Word (a
In Chapter 1.2, we discuss types of system software
word processing application), Microsoft Excel
in more detail. You will notice that applications
(a spreadsheet application) and Microsoft PowerPoint
software is covered throughout much of the rest
(a presentation application).
of the syllabus, which should give you an idea of
Other applications software carries out a specific sequence of tasks. For example, a payroll application
its importance. Chapter 1.7 looks specifically at applications software.
Summary ●
Hardware is the physical components that make up the computer system.
●
Software is the set of instructions (programs) that make the computer hardware usable.
●
An input device is a physical component that transmits data to the computer.
●
A storage device is a physical component that stores data for use by the computer.
●
An output device is a physical component displays data transmitted from the computer.
●
Operating system software comprises the programs that make the computer hardware available for use, often unseen by the user.
●
Generic/general purpose applications software comprises programs that can be used for many tasks, such as a word processor, spreadsheet software and database software.
Test yourself 1. Explain the difference between hardware and software.
[2]
Hint The question mentions two items (“hardware” and “software”) and two marks are available. Therefore, you should make two points. Make sure that the second point is not just the opposite of the first. The word “explain” indicates that the two points need to say how the items differ.
2. Give two reasons why a computer system would need to have some type of external storage device.
[2]
Hint Notice that the question asks for reasons why the system needs external storage. Do not say what is stored or what sort of device might be used. There are two indicators in the question that you should make two points: the word in bold and the marks awarded.
3. Describe the difference between system software and application software.
[2]
Hint This question is similar in style to Question 1. Remember that you need to state two distinct points that are related to each other.
1.1 Components of a computer system and modes of use
3
1.2 1.2 a
System software
The purpose of an operating system T
●
An operating system (OS) is the main item of system A
The OS provides a platform on which the applications software can run.
software used by a computer system. The OS is a set
●
of programs designed to run in the background on a
The OS hides the complexity of the hardware from the user.
computer system and provide an environment in which
●
application software can be executed.
The OS controls access to the computer system so that you can put passwords on your files to stop
Most operating systems comprise a large set
other people seeing them. It controls the access
of programs, only some of which are stored in the
rights of different users.
computer’s memory all the time. Many of the routines
Whether or not a certain feature is classified as
available in the OS are stored on the hard drive so that
part of the operating system or as a utility program
they can be accessed when required. This saves space
varies considerably across operating systems. We
in the computer’s main memory .
consider utility software in more detail at the end of
When you are using applications software, you
this chapter.
are not communicating directly with the computer hardware. Your applications software communicates
1.2 b
Types of operating system T
with OS program modules that communicate with the
Batch
computer hardware on its behalf. Without an operating
When computing was still a new science, there
system, a computer is useless no matter how many
were not enough machines to satisfy the demand
programs you have.
for processor time. There was a “speed mismatch”
There are many different types of operating system.
between the user sitting at the keyboard, who was very
Each type makes the computer behave differently
slow, and the processing by the computer, which was
and is appropriate to a given computer system and its
very fast. One solution to this problem is to buy more
applications. We look at some of the different types of OS
machines. Another solution is to make the machines
in this chapter and again in other parts of the syllabus.
work more effectively by taking away the slowest part
All operating systems have some common purposes:
of the system – the human being. Nowadays we might
The OS must manage the physical resources of the
well opt to buy more machines! When computers were
computer. Some resources are limited and must be
very expensive, an aim for efficiency improvements
managed to maximise the use of the computer system:
gave rise to batch processing.
●
− A simple system has only one processor.
for interaction between the user and the processor
− Some input/output devices (e.g. printers) are
during the execution of the program. Lots of programs
shared. ●
4
A batch processing operating system does not allow
− Secondary storage is of a fixed size.
(or lots of data to be run through the same program)
The OS provides a means of communication (the
are collected together (to form a batch). The batch
user interface) between the human user, or the
operating system then controls their passage through
outside world, and the computer.
the computer.
Module 1
on the floor. The processor makes decisions about
Nowadays, batch processing is used for applications
steering to keep the trolley on the black line. The
where: ●
there are large amounts of data to be processed
●
the data are very similar in nature and require similar processing
●
●
trolley would very soon lose its direction if it was not steering quickly enough. ●
A catalogue shop processes orders. The code for a
the computer system has identifiable times
product is input and the system compares it with
when it is not being used and so has available
information in its files. When it finds the correct
processor time
code, it can report to the user the quantity of that
the application does not require interaction by
product in stock. It is necessary to record a purchase
a user.
before the next shopper’s request is processed
Typical examples of applications which use batch
otherwise the second person might be sold the
processing include:
same item.
●
the processing of payroll information
●
the production of bank statements from customer files at periodic intervals; e.g. all accounts with surnames starting A–E could be processed on the fifth of each month, surnames F–J on the tenth of each month, and so on
●
the production of utility (gas, electricity and telephone) bills from customer records.
Real-time A real-time operating system can react quickly enough to affect the next input or process that needs
Single-user A single-user operating system controls a system which has only one user, and their programs, at any one time. A perfect example of a single-user system is the PC or laptop that you may have at home. Only one person uses the computer system at any one time. Note that it does not mean a system that only ever has one user! This means that security measures are important so that the system only allows access to files that belong to the appropriate user.
to be carried out. There is a continuous cycle of input– processing–output. Most real-time systems are based on the control of
Multi-user Again, as the name implies, this type of operating
some process in the real world (where the processing
system allows the computer to service more than one
takes place on a timescale of milliseconds). Some
user simultaneously. A multi-user operating system
information processing applications require the
has a single (normally powerful) computer which is
processing to be done within seconds; it still fits the
connected to a number of terminals. These terminals
description of the continuous cycle and is known as a
are not computers, although they may have a very
pseudo real-time operating system.
limited amount of processing power. They rely on the
The following examples of real-time applications show why immediate response can be vital: ●
The computer sends a message to each of the
A chemical plant has a reaction vessel in which
terminals in turn, asking if it wants any processing
the temperature is critical to the result of the
to be carried out. This process is called a time-share
process. The temperature is monitored by a
system or a round robin system. Each of the small
computer that accepts input from a sensor. The
amounts of processor time is called a “time slice”. The
computer uses the sensor data to make decisions
length of a time slice varies according to the system but
about adjusting the heating elements in the vessel.
is typically about a hundredth of a second.
A delay in the decision-making process might ●
main computer to carry out any processing.
A configuration in which a central computer
corrupt the reaction.
(a server) processes data from several terminals
A robot trolley is controlled by a processor that
(see Figure 1.2.1 on page 6) is called a “thin-client
takes input from a sensor following a black line
network”.
1.2 System software
5
terminal 1
terminal 2
terminal 3 server stores: - application programs - users’ data files
network cable server terminals do not have any processing capability
server processes each terminal’s application program
Figure 1.2.1 A multi-user computer system. Since terminals do no processing this is a thin client network.
There is a limit to the number of terminals that can
Network
be serviced. The system needs to be fast enough that
A network comprises a number of computers linked
a user at a terminal does not have to wait for too long
together for the purposes of communication and the
before being given processing time. The system can be
sharing of resources. Networks are important because
speeded up if the computer ignores terminals that are
they allow hardware and software to be shared. They
not active. Terminals can send a signal to the computer
require the computers to run a network operating
when they need processor time. Such a system is
system. Often, one of the machines is used to control
only satisfactory if the response time for all users is
the rest of the system; this machine is called the server.
acceptable; no user should have to wait for a long time
A network OS must carry out tasks such as:
for a program to respond.
Multi-tasking
●
control of access to the network
●
management of the filing system
●
management of all applications programs available
A multi-tasking operating system allows several
from the server
applications to be available simultaneously. On a
●
single-user system, you are probably used to having
A common misunderstanding is to confuse network
a number of processes loaded in main memory
systems with multi-user systems. A multi-user system
at the same time. One window may show a spreadsheet
has many users using one computer at the same time;
while another shows a word processing application;
a network system has many computers each using
you may also be connected to the Internet through an
shared hardware and software.
email client; and you may be playing music while you
management of all shared peripherals.
In Chapter 3.8, we consider networking in detail.
work. It appears that more than one task is running simultaneously but they aren’t, they just appear to be.
1.2 c
Application requirements for operating systems A
The OS can switch between tasks so quickly that it
IIn an examination, you will be asked to identify
seems to the user as if they are all being done at once.
applications that require batch processing and
The method used to do this is very similar to the multi-
applications that require real-time processing.
user OS. The tasks are allocated time slices and the
Applications that require batch processing include:
computer goes from one to the other servicing them.
payroll, the production of bills and the production
Microsoft Windows is a multi-tasking operating
of bank statements. Be very careful in choosing any
system. You can view a list of the running processes
other application – it must be clear that there are
in the Task Manager operating system utility
good reasons for using batch processing. For example,
(Figure 1.2.2). In Chapter 3.1, we further consider
simply to say that an ATM machine uses batch
multi-tasking in Windows.
processing is not enough. Requests for bank statements
6
Module 1
Figure 1.2.2 The Windows Task Manager utility.
are batched for later processing but the PIN for a
sensible to try to memorise a list of applications for
customer must be checked in real time. You must be
each type. You must learn to identify the characteristics
specific and justify your choice. For example, you could
of each of the types of processing for a given
write “Because statements must be sent out by post,
application.
they can be processed while the computer is not doing other things. It makes sense to process a large number of statements at the same time as a batch.”
1.2 d
Types of user interface T
Control applications, in which the results of a
The user interacts with a computer system through its T
process are used to inform the next input, use real-
user interface. The user gives input (e.g. the click of a
time processing. A good example would be the
mouse) and receives responses from the computer. A
control of a robotic machine on a production line.
user interface (also called a human–computer interface
Information systems also require real-time processing.
(HCI)) consists of both hardware and software.
It is necessary to update the file of information before
When a user types instructions into a computer and
the next enquiry is dealt with. The classic example is
the computer responds by displaying details on a screen,
the airline (or theatre) booking system. If a customer
then that is an interface. The keyboard and the screen
decides to buy a ticket for a flight, the number of tickets
are the hardware components; the software components
available must be updated before the next person
of the interface allow the computer to understand the
makes an enquiry, otherwise another person may be
typed instructions. In the early days of computing,
sold the same seat.
people could use a teleprinter instead of a monitor.
In general terms, an examination question will ask
The teleprinter was similar to a typewriter. As the user
you to decide which of these two types of processing
typed commands on it, the computer would print the
is most appropriate for a given application. It is not
commands and its response on paper. The hardware
1.2 System software
7
The interface:
and software components of the interface need to be appropriate to the use. For example, a keyboard and
●
screen are needed for an interface that enables the user to make enquiries about theatre tickets; a printer would
in turn ●
enable the user to print a booked ticket. There are many different types of interface. Their
prompts the operator to ask each of the questions makes the operator input the information in the correct order and ensures that nothing is missed out
●
features vary depending on the application, the
ensures that the information is input in the correct format
conditions in which it is to be used and the knowledge
●
and skills of the user. From the many types of HCI, you are
A form-based interface (see Figure 1.2.3) has a specific
expected to be able to describe the five software interfaces
area for each piece of data. For example, there may be:
discussed below and give a typical application for each
●
of them. In Chapter 1.9, we discuss the hardware that is
makes the checking of the information easier.
a drop-down list for restricted input (such as the person’s title or a date)
necessary to put the software interface into operation.
●
Form-based interface
●
boxes for textual information (such as the name or email address)
If the majority of the input to a system is standardised,
check boxes for yes–no information (such as a box to indicate acceptance of conditions).
a typical interface is an on-screen form to be filled in.
The form uses standard widget controls – text boxes,
This type of interface is used by an operator inputting
radio buttons, check boxes and drop-down lists.
information while talking to a customer over the
automatically to the next box to be filled in. Sometimes a
telephone.
Figure 1.2.3 Form-based interface.
8
When the user enters data, the cursor often moves
Module 1
box is highlighted to make it clear to the operator where
of types of accommodation (hotels, guest houses, etc.).
the data are to be inserted. Some of the data are more
The third screen may offer different price bands. Finally,
important than others and the cursor does not move on
the user may see a list of all the available properties
until data have been supplied. The interface checks that
that match the choices of type and price band. Such an
the input is sensible for that box before moving on.
information system often uses a touch screen because
When a person orders something from a supplier
other peripherals are less appropriate. For example, a
on the Internet, a form-based interface is used. The
mouse connected to an information system in a train
customer fills in a number of standard personal and
station might be vandalised or damaged by the weather.
payment details.
Graphical user interface Menu-based interface
A graphical user interface (GUI) uses windows, icons,
A menu-based interface is used in situations where
menus, and a pointer (giving rise to the acronym
the user does not know what options are available.
WIMP). The user of a GUI expects to be able to view
Examples of this are information systems for tourists
different applications or files on the screen at the
and the on-screen menus for digital television. A list
same time. This is done by putting each into its own
of choices is made available. When the user selects an
bordered area known as a window. The user can select
option, a further set of choices is displayed, and so on
a command by clicking on a small picture (an icon)
until the result is obtained.
that represents it. The user selects further options from
Imagine an information system at a train station in a popular holiday location. The first screen may ask for the general area of interest (accommodation,
menus. Icons and menu options are selected by using some sort of pointing device such as a mouse. In Figure 1.2.4, the main menu is displayed
trips, shopping or entertainment). If the user selects
horizontally as text options (File, Edit, etc.). Selecting
“accommodation”, the next screen may offer a choice
Shape from the menu opens a drop-down menu of
Figure 1.2.4 Graphical user interface.
1.2 System software
9
selections. Selecting Rotate or Flip gives access to a
simple responses which the computer can understand.
final menu from which the user can select the final
If the user does not give one of the expected responses,
command – Rotate Right. The user can save a file in one
a message is produced which makes it clear that the
step by clicking the “Save” icon (it represents a floppy
user must try again.
disk); in Figure 1.2.4 you can see this button directly under the “Edit” button. The whole principle of a GUI is to make using the
It is often assumed that a natural language interface is very close to a spoken language. This may be true but it is likely to be typed into the machine rather than actually
system as simple as possible by hiding all the complicated
being spoken. For example, some Internet search engines
bits! For example, when the user clicks an icon to bring
or large information systems can process natural language
a piece of software onto the screen, it involves only one
queries. This is the next step up from a simple keyword
action. In the background, the computer is executing a
search, where the software picks out the keywords and
complicated process involving a lot of instructions. When
then searches for matching documents or files.
the icon is chosen, the computer is simply told to run
Computerised telephone systems may use voice
those instructions so the software will appear. The icon
input to select menu choices. A true spoken interface
has hidden the complexity from the user.
might be used by a disabled person to communicate with a computer.
Natural language interface A natural language interface is sometimes referred to
Command line interface
as a “conversational interface”. The computer displays
In a command line interface, or “command-based
or speaks questions that give the user the impression
interface”, the user types a series of commands at
that the computer is talking to them. However, the
the keyboard and the computer displays appropriate
system restricts itself to questions that will provoke very
output (see Figure 1.2.5). The computer does not
Figure 1.2.5 Command line interface.
10
Module 1
prompt the user to enter any particular information. If
The disk surface is divided into a number of
the user enters a command incorrectly, the computer
tracks and each track is divided into smaller blocks
will give an error message.
called sectors.
To use a command line interface, the user needs:
The amount of information that can be stored is
●
to know what commands are available
enormous. One of the tracks is used as an index, to
●
to understand the commands
hold data about where the other data are stored. The
●
to understand how material is stored in the
formatting process removes all data from the disk so
computer system.
you should save the contents of a disk elsewhere before
A command line interface, has two very important
re-formatting it.
characteristics: ●
The computer system is very much more open than
Hardware drivers
in the other types of interface. Other interfaces
Any piece of hardware needs to be controlled and
restrict the options that the user has available to
set up for communication with the processor.
them. A command line interface allows anyone with
The hardware drivers are programs that control
a knowledge of the commands access to the entire
the communication between the device and the
operating system. Hence, they have access to the
operating system.
workings of the entire computer. ●
Command line interfaces can only be used by people who are computer literate. Users need to understand the commands and their uses. They also need to understand something about how the computer operates and how information is stored.
1.2 e
File handling Data stored on a computer system are organised as files. A set of utility programs is needed to handle the storage and use of these files. There are programs to store and retrieve the files and programs that allow files
Utility software
to be altered or deleted. Sometimes the contents of two
Programs that carry out tasks necessary to the operation P
files need to be combined (merged) or the contents of a
of the computer are known as utility software.
file may need to be put into a particular order (sorted).
Disk formatter When a disk is first produced the surface is blank. It cannot be used to store data until it has been formatted by disk formatter software. The formatting process divides the disk into smaller areas, each of which can be searched more easily (see Figure 1.2.6).
A file handling utility normally does all these tasks. If an examination question asks for two examples of utility software, you should not describe two file handling routines.
Automatic backup or archive Files on a computer system need to be protected from being damaged. A backup or archiving utility is a simple routine that copies the contents of files to
track
another location. If the original file is damaged, the copy can be used to replace the damaged file.
index track
If an examination question asks for an example of a utility, simply saying “backup” is not a satisfactory response. You can make a backup manually as a simple file copy process. A good example of a utility program
sector
would be one that automatically backs up the changes to files since the previous backup copy was made (incremental backups). Email client software encourages the user to
Figure 1.2.6 A formatted hard disk.
regularly archive files to reduce storage space.
1.2 System software
11
Anti-virus software
File compression software
A computer virus is a small program that can reproduce
Files containing sound and video information are
itself. If it “infects” a computer system, a virus can
usually large in size. File compression software
cause a range of damage including deleting files.
reduces the size of a file by cutting out much of the
An anti-virus software utility program continually
duplication of data in the file.
compares a dictionary of known viruses against the
If a file is to be sent electronically (e.g. as an
files accessed by the computer. It alerts the user if any
email attachment), you can use a utility (such as
of the files matches a virus “signature”. It is crucial that
WinZip, shown in Figure 1.2.7) to compress it. Files
the virus dictionary is kept up-to-date on a daily basis
may also be compressed to save space on a secondary
as new viruses are constantly appearing.
storage device.
Figure 1.2.7 WinZip file compression software.
Summary ●
An operating system: – controls the hardware – provides a platform for application software to run on – provides an HCI – manages the resources of the computer system.
●
A batch operating system controls the passage of jobs through the computer without user interaction.
●
A real-time operating system reacts quickly enough to affect the next input or process that needs to be carried out. It operates a continuous cycle of input–processing–output.
12
●
A single-user operating system enables only one user at a time to access the system.
●
A multi-user operating system enables more than one user to access the system at the same time.
Module 1
Summary continued … ●
A multi-tasking operating system gives the user the impression that they can carry out more than one task at the same time.
●
A network operating system links a number of computers together and enables them to share peripherals.
●
Applications that require batch processing include: – payroll – bank statements – utility bills
●
Applications that require a real-time response include: – industrial control systems – robots – ticket-booking systems.
●
A form-based user interface provides boxes into which the user can type data. It provides the user with help (on-screen prompts and validation) in completing the data.
●
A menu-based user interface provides the user with a set of options that restrict the available information. An information system for tourists and on-screen menus for digital television are easy for users to operate.
●
A graphical user interface (GUI) provides windows, icons, menus and a pointer to enable the user to interact with the computer in complex ways.
●
A natural language user interface enables the user to use a natural language (such as English) to interact with the computer. It may be spoken or typed input.
●
A command line user interface requires the user to type commands to give specific instructions to the computer. It enables a technician to get close to the workings of the computer.
●
Disk formatting software prepares a disk for use by the operating system.
●
File handling software enables the user to move, copy and delete files.
●
Hardware drivers enable successful communication between devices and the operating system.
●
File compression software allows data to be stored in a smaller amount of storage space.
●
Virus-checking software monitors input and stored data to ensure that it does not contain malicious software.
Test yourself There are some areas of the specification where the topic is so narrow that only one question can possibly be asked. It may look different from one exam paper to the next but really it is testing the same knowledge. Question 1 is from one of those sections. 1. State three purposes of an operating system as part of a computer system.
[3]
Hint There are many possible responses to this question. It asks for three purposes and awards three marks, one for each purpose. The word “state” indicates that you simply need to list the purposes.
1.2 System software
13
2. a. Distinguish between a multi-tasking and a multi-access operating system.
[2]
Hint When a question asks you to “distinguish” two things, you must choose facts that compare the things. b. State what is meant by a network system and give an advantage of this type of system over a set of stand-alone computers.
[2]
Hint When a question asks you to “give an advantage”, it usually tells you what to compare. In this instance, you must compare a network system with stand-alone computers. 3. A company payroll system uses a personnel file. a. Explain the difference between batch processing and real-time processing.
[2]
b. Explain how both batch processing and real-time processing can be used sensibly in the context of the payroll being calculated using the personnel file.
[4]
Hint Notice that you are not asked for separate uses of batch processing and real-time processing. You must consider how batch processing and real-time processing apply to the given application. 4. 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 that item is available. Suggest what type of interface is appropriate and its possible contents in terms of options presented to the user.
[4]
Hint Notice that four marks are available. You are asked to suggest an interface design and its contents. Assume that one mark will be allocated to the interface type and give three or four contents of the interface you suggest. The contents must be based on the scenario described in the question. 5. The technician responsible for maintaining the system in Question 4 uses a command line interface. a. Explain what is meant by a command line interface.
[2]
Hint Two marks are available, so you should make two points. b. Give two advantages and one disadvantage to the technician of using a command line interface rather than a menu-based interface. 6. a. Explain the need to have driver software installed for a printer.
[3] [2]
b. Give three different utility programs which would be part of a single-user operating system and state what each program would be used for.
14
Module 1
[6]