Log On To IT - 111820
Log On To IT - 111820
For example, if you collect the temperature of your classroom each day for a
month, you have collected data. When you instruct a computer to arrange
(sort) this data, you could get information such as the following:
• The highest temperature over the period
• The lowest temperature over the period
• The mean (average) temperature over the period.
Figure 1.1
•
The parts of a personal computer
Stages of processing ,•
Tb accomplish its tasks a computer has to process data. Processing data to
get information involves three stages: input, processing and output.
Control unit
The control unit is the main part of the CPU. It directs and co-ordinates all
the activities within the CPU. The control unit determines the sequence in
which instructions are executed. It does not execute the instructions itself;
instead it sends the data and instructions to the ALU for processing. The
CPU is primarily responsible for movement of data and instructions from
•
5••
•
itself to the main memory and ALU and bac The CU executes an
instruction by performing the following steps:
1 Fetching the instruction from memory
2 Decoding the instruction
3 Fetching the data required by the instruction from memory
4 Sending the data and instruction to the ALU for processing
5 Sending the data to the memory unit after processing
The control unit contains a number of registers. A registc r is a temporary
storage location that holds a single instruction or data item. Registers are
used to store data and instructions that are needed immediately and
frequently. Two examples of registers found in the control unit are.the
program counter (PC) and the instruction register (IR). The program
counter holds the address of the current instruction (the instruction being
processed) and the instruction register holds the instruction itself.
For example, using the 'equal to' logic function, the ALU compares two
values to determine if they are equal.
Other logical operations performed by the ALU are AND, OR and NOT. You
will learn more about these in Chapter 8.
Figure 1.3
The components of a basic
computer system
Laptops
A laptop computer is a portable version of a PC, equipped with a flat liquid
crystal display (LCD) screen and weighing about one to four kilograms. The
two principal types of laptop computers are notebooks and sub-notebooks.
A notebook computer is a portable computer that weighs two to four
kilograms and is roughly the size of a large thick notebook, around
35 x 25 x 4 centimetres. They have a fairly large LCD colour screen
(about 30 cm across) and a fairly large keyboard, usually with a small
touch-sensitive pad which serves as a mouse. Notebook PCs can easily be
tucked into a briefcase or backpack, or simply under your arm, and can use
power from an electrical outlet or rechargeable batteries. Notebooks are
usually just as powerful as a desktop PC but cost more than their equivalent
desktop PC.
A sub-notebook computer weighs about half a kilogram and can fit in a large
jacket pocket. It has a small screen, sometimes in colour, and a small
keyboard without the mouse function. It can perform many of the functions
of notebooks, but not to the same degree of complexity.
Figure 1.5
A notebook computer
•
7 ^•
•
Minicomputers
Minicomputers have become outdated and are rarely used today. They were
very popular in the 1960s. Their cost, storage and processing capabilities
were somewhere between those ofa PC and a mainframe computer. They
were mainly used in small manufacturing plants, research labs and
businesses. Mini systems were usually designed to handle simultaneously
the processing needs of multiple users. They allowed many users to share
access to central hardware through stations called terminals. Minis can
support dozens of terminals. A typical terminal has a keyboard, a display
screen and a wire that connects the terminal to the computer system.
Mainframes
Mainframes are very powerful
computers and are therefore very
expensive. Mainframes are systems that
offer faster processing speeds and
greater storage capacity than a typical
mini. A mainframe can handle more
than a thousand users at a time. They
are found in large organisations such as
banks, government agencies, insurance
companies and corporations where they
perform tasks that require a lot of
computational power: typically, bulk
data processing such as censuses,
industry/consumer statistics and bank
transaction processing. The IBM zSeries
990 Model D32 is currently one of the
most powerful mainframe computers
available.
Figure 1.6
A mainframe computer Supercomputers ('monsters')
Supercomputers such as NEC's Earth Simulator and California Digital
Corporation's Intel Itanium2 Tiger4 were two of the largest, fastest and most
powerful computers in the the year 2004. They are typically used for
'number crunching' in scientific simulations, scientific research and
developments in areas such as energy, space exploration,
medicine and industry. Supercomputers are designed
to process complex scientific applications.
These systems are the most expensive
computers in the world, often
costing millions of dollars.
Tablet PC
A tablet PC is a computer that
looks like a notebook computer
except that data can be entered
through the use of a keyboard, touch
screen or a digitising tablet. Data can be
entered through the digitising tablet with the
use of a special pen called a stylus.
Figure 1.7
:^^ A tablet PC
ers and palmtop computers
;se are so-called because they fit in the palm of
iur hand and are therefore less powerful than
otebooks and sub-notebooks. They can fit into a
hirt pocket and weigh perhaps 300 grams on
verage. They might have a very small keyboard,
)r a palm-sized screen (sometimes in colour)
which can be written on with a special pen.
Electronic organisers are mainly used to store
appointments, addresses, phone numbers and
'to do' lists.
Embedded computers
An embedded computer is a special-purpose computer used inside a device
and is usually dedicated to specific functions. It is housed on a single
microprocessor board with the programs stored in ROM. It is connected to
sensors - devices which detect changes in the environment such as light,
temperature or pressure - and actuators, hardware output devices that
convert an electrical control signal into a physical action. They are
commonly used in items such as washing machines, cameras, cars, motors,
sewing machines, clocks and microwaves.
Generations of computers
Computers can be broadly classified into five generations. These
generations are based mainly on the basic electronic component that was
used to build the computer.
1st ,•
capabilities were between those of a PC and a
Summary mainframe. They were mainly used in small
1 A computer system consists of both hardware and manufacturing plants, research labs and
software. businesses.
2 Hardware is all the parts of the computer system 18 Mainframes are very powerful computers and are
you can see and touch, e.g. printers, keyboards, very expensive. They offer faster processing
mouse, system unit. speeds and greater storage capacity than a typical
3 Software is a set of instructions (program) that a mini. A mainframe can handle more than a
computer needs to carry out its tasks. thousand users at a time. They are found in large
4 Data is all the raw facts and figures that a organisations such as banks, government agencies
computer processes by following a set of and insurance companies where they perform
instructions (called a program) to produce tasks that require a lot of computational power -
information. typically bulk data processing such as censuses
and bank transaction processing.
5 Input, processing and output are the three stages
of processing. 19 Supercomputers are the largest, fastest and most
powerful computers at present. They are typically
6 Input devices are used to get data and instructions
used for 'number crunching' in scientific
into the computer for processing.
simulations, scientific research and development
The Central Processing Unit is the 'brain' of the in areas such as energy, space exploration,
computer. It consists of two smaller units known medicine and industry.
as the Control Unit (CU) and the Arithmetic and
20 Laptops, notebooks and sub-notebooks are all
Logic Unit (ALU).
portable computers with flat LCD screens.
The control unit is the main part of the CPU. It
21 A tablet PC is a computer that looks like a
directs and co-ordinates all the activities within
notebook computer except that data is entered
the CPU.
through the use of a digitising tablet or touch
9 A register is a temporary storage location that screen.
holds a single instruction or data item.
22 Electronic organisers are mainly used to store
10 The program counter (PC) holds the address of the appointments, addresses, phone numbers and 'to
current instruction (the instruction being do' lists. Palmtop computers are more powerful
processed) and the instruction register (IR) holds than electronic organisers, and can even run some
the instruction itself. of the same software as sub-notebooks and
ii The Arithmetic and Logic Unit (ALU) performs all notebooks.
the arithmetic and logic functions in a computer. 23 An embedded computer is a special purpose
12 The main memory holds data and instructions computer that is used inside a device and is
that the computer is processing at the time. usually dedicated to specific functions.
13 Output devices translate information processed by 24 The vacuum tube or valve was the main electronic
the computer into a form which the user can component of first generation computers.
understand. 25 Transistors were invented in 1948 and formed the
14 Computers are used because of their great speed, basis for second generation computers. Computers
accuracy, large storage capacity and ability to became smaller, faster, more reliable and more
work continuously in solving a variety of energy-efficient than their predecessors.
problems that would otherwise require many 26 The integrated circuit (IC) or chip formed the
human hours of work. basis for third generation computers. The use of
15 Computer systems maybe classified as embedded high level languages, which used English words
computers, personal computers (PCs), and the base ten number system to program the
minicomputers, mainframe computers and computer, was a feature of this third generation.
supercomputers ('monsters'). 27 Fourth generation computers are based on the
16 Personal computers (PCs), also called desktop or chip but with many more components packed
microcomputers, are the most common inside. Ultra large scale integration (ULSI)
computers. PCs are designed to be used by one increased that number to millions of components.
person at a time and can usually fit on an office 28 Fifth generation computers will be able to mimic
desk. A PC consists of a system unit, a keyboard, a many of the things so far only achievable by
mouse and a display screen, and has all the human beings (artificial intelligence). These
functional elements found in any larger system. computers will be able to accept spoken word
17 Minicomputers have become outdated and are instruction (voice recognition) and assist doctors
rarely used today. They were very popular in the in making diagnoses (expert systems). 11 ^•
1960s. Their cost, storage and processing •
A
8 The main component that formed the basis for 10 Discuss with your classmates how a portable
second generation computers was: computer could assist these professionals with
(a) Vacuum tubes their work:
(b) Registers (a) A teacher
(c) Integrated circuits (b) A police officer
(d) Transistors (c) A newspaper reporter
9 Third generation computers were used during the (d) A sales representative
period:
(a) 1933-1945
(b) 1945-1956 Crossword
(c) 1956-1963
(d) 1964-1970
10 Which generation of computers used ultra large
scale integration (ULSI)?
(a) First generation
(b) Second generation
(c) Third generation
(d) Fourth generation
15 •
•
0111 £9ra ►ifK=
Data collection
Data capture
Data capture is the first stage of getting data into a computer. It is at this
point that the various input devices are used to import data that the
computer will process and/or store.
There are two main ways of inputting data:
• Manual data input: Data is entered directly into the computer one
transaction at a time by hand. Keyboard, mouse, touch screen, light pen,
graphics tablet and voice input devices are some of the devices used.
• Automatic data input/data capture: Data is entered directly into the
computer from source documents. Source documents are documents
on which data is first recorded before it is entered into the computer.
Data entered from these documents is transferred directly from the
document into the computer's memory. Data is captured at the source,
for example directly from barcodes on supermarket items into the
computer or directly from national lottery slips into the computer.
•
14 %
•
Typical input devices '
typical input devices include the following peripherals. In this next section,
we will look at each of these in turn.
Keyboard
The most common input device is the keyboard. A digital code is sent to the
computer when each key is pressed. For example, the code 01100001 is
produced when the 'A' key is pressed. Keyboards play a pivotal role in the
input of data into the computer. Their design is of critical importance for
comfort and usability, since users may spend long periods of time entering
data. Many keyboards are therefore designed with ergonomics in mind.
There are two types of keyboard: the alphanumeric keyboard and special-
function keyboards. The alphanumeric keyboard contains letters, numbers
and symbols in particular layouts. This keyboard is modelled on the
typewriter keyboard, also known as a QWERTY keyboard (based on the
sequence of letters at the top left). Keyboards maybe attached to the
computer by wires or they maybe wireless.
Special-function keyboards are invented for a particular purpose. For
example:
a The Braille keyboard has its keys marked with raised dots to aid the blind.
a The concept keyboard contains a flatbed of contact switches covered by a
flexible membrane. Over each contact switch whole words, pictures or
symbols are superimposed. The computer is then programmed to
respond appropriately to these. These keyboards are used in education as
an early-learning aid, in restaurants so the operator can visually add up
the cost of standard menu items, and in messy places where a normal
keyboard would be at risk.
• The left-handed keyboard is designed for the left-handed individual.
• A virtual/projection keyboard is projected onto any surface and touched.
The keyboard can register your finger movement and hence translate
that movement into a keystroke. An example is the touch-screen
keyboard of the automatic teller machines (ATM) found in front of
banks, etc.
Poir tg devices
Pointing devices are used by graphical operating systems such as Windows
to show the motion of a pointer or cursor, and enable the control and
selection of objects on the display.
15
•
•
Mouse
The movement of the mouse over a flat surface is mirrored by a pointer on
the monitor screen. Under the mouse is a ball which rolls and turns two
shafts, one for each direction - left/right and up/down (Figure 2.1). Buttons
F1 on the mouse allow you to make selections from menus, move objects
around the screen and paint or draw.
Rollers The ball can get dirty and transfer the dirt to the shafts. This can cause the
mouse pointer to move erratically. The mouse therefore needs to be cleaned
regularly.
Besides the regular mouse, there are other kinds of mouse: some designed
for comfort and others a matter of preference:
• The optical mouse can slide over most surfaces since it does not have a
ball. It emits a small beam of red light which bounces off the surface into
Figure 2.1 a sensor. The sensor sends co-ordinates to the computer which in turn
Illustration of the moves the cursor or pointer on the monitor screen, according to these co-
mechanics inside a mouse ordinates. The advantage of this type of mouse is that you do not need to
worry about dirt and cleaning, and it is very easy to manipulate. Since
there are no moving parts the mouse is less likely to fail because there is
less wear and tear. The disadvantage is perhaps that this type of mouse is
more expensive than an ordinary mouse. A mouse can come with or
Did you know? i;. without a wire attachment, hence we have the wireless mouse.
• The trackball mouse has a large ball on top rather than underneath. You
Did you know that the
can roll the ball with the palm of your hand or fingers. These are found
measurement for the
mainly on laptop computers. Buttons placed close by allow you to select
speed and movement
features on the screen.
direction of a computer
• The pointing stick mouse found on laptop computers looks like a pencil
mouse is called a mickey?
eraser. It protrudes from the keyboard between the B, G and H keys.
One mickey is approximately
Pushing on the pointing stick with your finger will move the pointer
of an inch.
around the screen. Once again, buttons placed close by allow for
selection of features on the screen.
Figure 2.2
An optical mouse Joystick
Ajoystick is a device which lets you control the movement of an object on
•• the screen by operating a small lever. It is used mainly for computer games
16 • such as flight simulators.
•
Digitising tablet (graphics tablet)
Tb digitise data means to conve rt it from an analogue form (like a picture) to
a digital form (binary numbers - see Chapter 5). A digitising tablet is a
board which can detect the position of a pointing device such as a stylus or a
puck on its surface. A stylus is a pen-like pointing device for a
graphics/digitising tablet. A puck is a mouse-like device which is moved
over the surface of the tablet. It has cross-hairs to position it accurately and a
number of bu ttons for different actions. Drawings and sketches can be easily
entered onto the computer using the digitising tablet.
Figure 2.3 A light pen
Touch-sensitive screen
This pointing device lets you interact with the computer
by touching the screen. The pointer is the human finger.
There are three forms of touch screen: pressure-
sensitive, capacitive surface and light beam. These
screens are used in bank ATM machines, for example.
They allow you to perform actions on your bank account
by following instructions and options on-screen, using
your finger to choose the option you wish.
Light pen
This is shaped like a pen (Figure 2.3) and is connected to
a VDU/monitor. It allows you to point and make
selections more accurately on a screen. The tip of the
light pen contains a light-sensitive element which, when
placed against the screen, detects the light from the
screen and enables the computer to identify the location
of the pen on the screen. Making selections with a light
pen is far more accurate than using your finger to make
selections on a touch sensitive screen. Light pens also
allow the user to draw dir ctly on the screen. However,
they are not as accurate as a igitising tablet and drawing
can become uncomfortable.
•
1 What is the most common 3 A device that enables the 5 Which type of ^•
input device? user to control the movement keyboard would most ^•
(a) Mouse of objects on the screen by likely be used by a
operating a small lever is a physically challenged
(b) P ri nter
(a) Thuch-sensitive screen person?
(c) Monitor
(b) Joystick (a) Concept keyboard
(d) Keyboard
(c) Puck (b) Alphanumeric keyboard
2 Which of the following is not
(d) Light pen (c) Virtual keyboard
a pointing device?
4 Which of these has a ball (d) Left-handed keyboard
(a) Joystick
positioned at the top?
(b) MICR
(a) Optical mouse
(c) Light pen
(b) Pointing stick mouse
(d) Mouse
(c) Touchpad mouse
(d) 'I7ackball mouse
•
17
S•
•
Scanning devices
Scanners
Scanners were originally designed to scan pictures (image scanners) but now
their use is extended, for example to scan text into a word processing program.
There are many types of scanners:
• Flat-bed scanner: The picture is placed on a fl at scanning surface and the
image is captured, similarly to how a photocopying machine works.
Household versions are inexpensive, costing less than 100 US dollars.
• Hand-held scanner: The scanner reads in the picture while the user drags the
scanner over it. The quality of the image provided by this scanner is poor,
but it is useful for quick data capture.
Figure 2.4 • Drum scanner: These are normally used in the publishing indust ry
A flat-bed scanner (magazines, books) to capture images with high detail. These scanners tend
to be expensive, costing perhaps thousands of US dollars.
• Sheet fed scanner: The sheet that contains the image is fed through rollers
and the picture is scanned as the paper passes through.
0
n 002S640 6250- 1357 , : 00023456789 0
Figure 2.5
Photo of a bank cheque Optical Mark Reader (OMR)
OMR detects the position of black marks on white paper. The documents to be
read have empty boxes pre-printed on them. The user makes pencil or ink
marks in the approp ri ate boxes. The intensity of the reflected light from these
marks on the form is detected by the OMR. This is sometimes called mark
• sensing. The computer records the position of the marks and analyses it to
determine the meaning of the data. OMRs are used mainly in assessing
.• multiple-choice examinations or questionnaires given out by market researchers.
Optical Character Recognition (OCR)
Optical character recognition is used for reading characters from paper,
using special OCR readers. The reader includes an optical scanner for
reading the text. The shapes of different characters are detected by shining
light on them from a photo-electric device and sensing the patterns of
reflected light. The reader looks at each pattern (say, a letter, like 'R')
individually. Sophisticated software allows each pattern to be compared
with a set of stored patterns until the closest match is found. This match is
translated into electronic text in the computer, so it can be m'arfipulated by
the user.
Advantages
• OCR is great for converting large volumes of printed data into a form that
can then be manipulated on the computer, for example in a word
processing program. It can therefore be used to create computer archives
of old printed books and documents, preserving these in a searchable
electronic form for the future.
Disadvantages
• OCR has difficulty understanding handwritten text if the letters in that
text are not formed properly. OCR also has difficulty recognising certain
unusual fonts.
Figure 2.6
- Barcode readers A scanner being used
to 'read'a barcode
A barcode is a set of vertical lines of differing thickness with a string of
numbers printed at the bottom. The barcode is read by a scanner in which a
laser beam scans the barcode and the light is reflected back into the scanner.
The information received by the scanner is sent to a computer for
processing. The system gives fast and error-free data entry into the
computer. Barcodes provide a quick method of recording the sale of items.
You can see barcodes on items in supermarkets, books in libraries and on
such things as magazines.
Barcodes
Barcodes must be passed over a reader to be read. REID tags can be read once the items are within range
of a reader.
Barcode labels can be ripped, soiled or removed RFID can be tagged on the surface or embedded in the
making it difficult or impossible to read them. object. Since radio waves can travel through non-
metallic material, the RFID chip can be encased in
plastic for further durability.
Barcodes do not identify single unique examples RFID can distinguish between two identical cartons
of a single product-type. For example, they from one manufacturer with different expiry dates.
distinguish between milk made by two different
manufacturers, but cannot distinguish between
two identical cartons with two different expiry
dates from the same manufacturer.
Barcodes are much cheaper than RFID and More expensive than barcodes but more effective for
effective for certain tasks. certain tasks.
Barcode tags cannot be reused RFID tags can be reused again and again.
Across Down ^•
3 Has difficulty translating
hand written text to
electronic text (3)
1As
ve
va
)ne es of
ickness
4 Scanning device found in (7)
the publishing industry, 2 Us scanner
to capture images of high ov e (2
detail (4) wo
6 Scanned image must be 5 Us d
fed through device ch )
containing rollers (2
words) (8)
7 Type of scanner where
the image is placed on a
level surface (2 words) (7)
Sound capture
All modern computers contain a built-in microphone for sound capture.
This means that you can record your voice, for example, to make comments
that are embedded in a word processing document. A sound card on your
computer is required for recording voice or music. The sound card digitises
the information into a form that the computer can understand.
MIDI instruments
Electronic musical instruments can have a MIDI port (Musical Instrument
Digital Interface) for input into the computer. The sounds are digitised and
stored as a file, can be displayed on screen, edited and played back, using
appropriate software.
Digital cameras
Digital cameras capture an image and store it in memory within the camera.
These cameras have a sensor that converts the light into electrical charges.
The processor in the camera converts this information into digital data and
stores it on a small diskette, fl ash memo ry or flash RAM card. The digital
images can then be uploaded from the camera to a computer where they
can be displayed, manipulated or printed. The memory can be erased so
that more images can be captured. Unlike normal RAM memory
(sometimes called tempora ry memo ry or volatile memory) where the
information is lost when the computer is switched off, flash RAM is non-
volatile. That is, the images are not lost when the camera is switched off.
The resolution of the camera is measured in pixels. The larger the number
of pixels the camera has, the clearer the image and the greater the detail
Figure 2.8
captured.
Digital camera
Advantages
• Photos can be shown on a small screen on the
• ^^ camera, and resized and erased as you go along, so
+^ o •® p that you only store on the camera the images that
you really want.
Disadvantages
• The sharpness and colour balance of a digital
z camera may not always be as good as with a
,o traditional film-based camera.
• It is relatively easy to lose or erase a digital camera's
^ ^ ^1^ memory cards by, for example, accidentally passing
SET MENU DISP. FUNC. ;^ ►'J_ J^ the camera through an airport X-ray machine.
22 .- r. \ /^lT
Digital video camera
The digital video camera (also called a digital video camcorder or DVD
camcorder) works in much the same way as a film camera, where light is
focused onto a film treated with chemicals. The chemical reaction of the
film to the light intensity forms the image on the film. Similarly, in a digital
camera, light is focused onto an image sensor called a charge-coupled device
which contains thousands of light-sensitive diodes called photosites. These
detect the light intensity and record an image. The digital video
camera/camcorder detects not only light intensity but also levels of colour
to reproduce a coloured image. The camera takes many pictures per second
to give an impression of movement.
•
Other input devices::.
Biometric systems
Biomet ri cs refers to the science of identifying an individual through their
body characte ri stics such as face geomet ry and hand geometry (e.g.
fingerp ri nts), iris or retinal scans, vein and voice patterns. All these forms of
identifying an individual can be input into a computer system set up for
secu ri ty purposes. In the near future they may become common, for
allowing access to buildings and bank accounts, for example.
Retinal scans use a ray of light directed into the eye to identify the distinct
network of blood vessels at the back of the eye. Fingerprint readers scan the
imp ri nt made by the pattern of ridges on the finger and compare it to a set
of patte rn s stored in memory. Fingerprints are considered unique, as no two
individuals have the same fingerprint.
Remote control
A remote control emits a beam of infra-red light that carries data signals.
Commonly used for input to televisions, stereo systems, VCRs and DVD
players, they are now being used by computers as a wireless means of
communication.
Sensors
Chemical or physical Input
changes in humans Analogue Digital Computer software
connections
and their Sensor the
processes the
signal interface to signal
environment can be information
computer
conve rt ed to
electrical signals
using sensors that
Figure 2.9
pass information to a computer, where it is analysed, stored and
How a sensor system works
manipulated by specialist software. These sensors are useful in the fields of
medicine, environmental planning and preservation, weather reporting,
and so on. A variety of sensors can be used to measure such things as heat,
light, sound, pressure, strain, acidity (pH), oxygen concentration, humidity,
pulse, water level, water flow, speed, tilt or even something like a door or a
valve opening or closing.
•
23 ^•
•
Summary 14 Biometrics refers to the science of identifying an
individual through their body characteristics such
1 Input devices are pieces of equipment that are as face geometry, fingerprint, hand geometry, iris,
used to put data into a computer. retina, vein and voice patterns.
2 Data capture is the first stage of getting the data 15 Sensors can be used to measure heat, light, sound,
into the computer. The two main data input pressure, strain, acidity (pH) and other changes in
means are manual and automatic data input (or the environment.
data capture).
3 Data verification is checking for accurate
transcription, whilst data validation is the
computer checking to see that the entered data
obeys the rules already set up within the Questions
computer.
4 The most common input device is the keyboard of Matching descriptions
which there are two types: alphanumeric and
Match each item in the first list to a description in the
special-function keyboards.
second list.
5 Pointing devices are used to move a pointer or
(1) MICR
cursor on the computer screen, and enable the
control and selection of objects on the display. (2) Braille keyboard
These devices include the mouse, digitising tablet, (3) Joystick
touch-sensitive screen, light pen and others. (4) Barcode reader
6 Scanning devices use laser beams and reflected (5) OMR
light to interpret and convert images, pictures and
(6) OCR
text into digital form.
(7) Smart card
7 Magnetic Ink Character Recognition (MICR) is
used mainly to read cheques whose data is
encoded with magnetic ink. (a) Found on items in the supermarket
8 Optical mark readers (OMR) detect the position of (b) For playing games
black marks on white paper. They are used mainly (c) A card containing a tiny memory chip
in multiple-choice exam marking, and assessing (d) Used to assess multiple choice exams
market research questionnaires.
(e) Used by visually impaired persons
9 Optical character recognition (OCR) senses the
(f) Used to read bank cheques
patterns of reflected light off scanned text via a
photo-electric device and compares it to the (g) Translates text on paper into electronic text on the
patterns in memory. The text is converted and computer
stored in the computer, and can be manipulated
by the user, e.g. in a word processing program. True or False?
10 A barcode is a set of vertical lines of differing 1 RFID must be passed over a scanner. Tq Fq
thickness with a string of numbers printed at the
2 A smart card contains a microchip
bottom; it holds information about a product or
embedded in the card. Tq Fq
item.
3 Digital cameras do not require film. Tq Fq
11 Radio frequency identification (RFID) is the use of
embedded chips and radio waves to identify 4 Biometric devices are less accurate than
individual unique examples of animals, persons passwords. Tq Fq
and objects. 5 Remote controls are now used by
12 Voice recognition system recognises certain computers as a wireless input
patterns of speech and accepts it for processing by communication device. Tq Fq
the computer. 6 OMR is used to read cheques. Tq Fq
13 Video input devices capture images and stores
them in memory.
•
24.•
•
rig=
Multiple choice Short answer questions
1 Checking for accurate copying of data is known as: 1 You have been asked to select input devices that
(a) Validation would be used by physically disabled persons in
an organisation. List at least FOUR devices and
(b) Verification
explain the kind of person that would be able to
(c) Source document use the device and why.
(d) Data capture 2 State TWO advantages and TWO disadvantages of
2 Which one of the following is not an advantage of the smart card over the magnetic strip card.
magnetic strip codes? 3 A pharmaceutical research company has decided
(a) They are easy and cheap to produce. to introduce biometric systems for security
(b) The st ri p can store enough information for reasons. Consider TWO alternatives and discuss
simple transactions. the advantages of using biometric systems over
those systems.
(c) The data can be changed, altered, forged or
erased by magnetic fields. 4 List TWO advantages and TWO disadvantages of
voice data entry systems.
(d) Cuts down on paperwork that would
otherwise be involved in a transaction. 5 Explain the difference between voice data entry
and voice recognition systems.
Which of the following is not true about barcodes?
6 List FOUR features of digital cameras that give
(a) They are cheaper than RFID.
them an advantage over regular cameras.
(b) They can be reused again and again.
7 State TWO disadvantages of a digital camera or a
(c) They can become difficult to read if they are digital video camera.
ripped, soiled or removed.
8 Explain how sensors work and list FOUR types of
(d) They must be passed over a reader. sensors.
Sensors can be used to measure all of the 9 What is RFID and how does it work?
following except:
10 List at least FOUR applications of RFID.
(a) Pulse
(b) Temperature
(c) Sound
(d) OMR
OCR:
(a) Detects marks on paper
(b) Detects the unique ridges in a fingerprint
(c) Understands and easily converts handwritten 10
text
•
25 ^•
•
torage refers to the media and devices used by a computer to keep data
and instructions available for immediate or later use. Storage can be
S grouped into two categories: primary storage and secondary storage.
Primary storage, also called main memory or immediate access store (IMAS)
is a group of chips that resides in the motherboard (main circuit board) of
the computer. The distance the electrical signals have to travel from the
CPU to primary storage or vice versa is much shorter than the distance
i
between the CPU and secondary storage devices, which are connected to the
motherboard via cables. This shorter distance, along with the design of the
chips, allows for faster interchange of data and instructions. This speedy
access is necessary since the CPU can only act on data and instructions held
in primary storage. So for the computer to work fast, the primary storage
must be as quickly accessible as possible.
Primary Storage
Primary storage consists of two types of memory chips: Random Access
Memory (RAM) and Read Only Memory (ROM) chips. A memory chip
is an integrated circuit (IC) made up of millions of transistors and
capacitors.
• Cache memory
26 % Currently, processors can operate at speeds much greater than memory can
supply the necessary data. In an effort to speed up processing, most
microcomputers have cache memory (pronounced cash). Cache memory
is very fast memory that the processor can access much more quickly than
main memory or RAM. Usually there are two levels of cache, called Ll and
L2. Newer computers have also included a third level called L3 cache. Ll
cache is on the same chip as the microprocessor, while L2 cache is usually
separate. When the microprocessor and motherboard both have L2 caches,
the motherboard cache is designated L3, since it is further away. Cache is
made of high-speed static RAM (SRAM) instead of the slower and cheaper
dynamic RAM (DRAM) chip that is used for main memory.
Generally most programs access the same data or instruction over and over.
By keeping as much of this information as possible in SRAM, the processor
avoids accessing the slower DRAM. Cache memory works by attempting to
predict which memory the processor is going to need next, loading that
memory before the processor needs it, and saving the results after the
processor is done with it. This speeds up processing.
exabyte EB 260 1018 1 152 921 504 606 846 976 1024 PB
zettabyte ZB 270 1021 1 180 591 620 717 411 303 424 1024 EB
yottabyte YB 280 1024 1 208 925 819 614 629 174 706 176 1024 ZB
x
Table I Larger units of storage
Magnetic disks
Magnetic disks are one of the most widely used secondary storage media for
computers. All magnetic disks provide direct access to data stored. This
means that you can go directly to a specific piece of data without having to
access any other data either before or after the data you want. The capacity
and access speeds of magnetic disks vary with each device or medium.
Magnetic disks include floppy disks (diskettes) and hard disks.
CD-R
CD-R stands for Compact Disc-Recordable. This disk allows you to write
data onto the disk once only using a CD recorder (burner). The disk then
becomes CD-ROM as the contents cannot be changed. It is ideal for storing
large volumes of data that does not need to change. A typical use is to create
music CDs. The storage capacity of CD-R, like all CDs, is around 750 to 800
MB maximum.
CD-RW
CD-RW (Compact Disc-Re-Writable) is now a very common choice for
backup storage. The data layer of these disks uses a phase-changing metal
alloy film. By using a higher intensity laser light the film can be melted to
level out the marks made by the laser burner when the data was stored,
effectively erasing previously stored data. New data can then be recorded
using a lower intensity laser light to burn the new data. In theory you can
erase and write on these disks as many as 1000 times. It therefore makes it
32 % an ideal backup storage device for storing large volumes of data that change
•• frequently.
DVD disks
DVD stands for Digital Versatile Disk. The main types are DVD-ROM (read Summary characteristics
only), DVD-R (recordable) and DVD-RW (rewritable). They look similar to a of optical disks
CD-R disk but are capable of holding much more information. This is • Much sturdier and more
possible because: durable than tapes or
• The tracks on a DVD are placed closer together as compared to a CD, floppy disks
thus allowing more tracks. • Not usually sensitive to
• The pits in which data is stored are much smaller in a DVD than a CD. being casually touched,
This means many more pits will fit on the disk, allowing more though they too can get
information to be stored. dirty or scratched. Despite
• Some DVDs are double-sided. This allows data to be stored on both sides this they can be cleaned
and therefore dramatically increases the disk's capacity. easily with a soft cloth
A typical DVD disk can hold between 4.7 GB and 17 GB of information. They • Unaffected by magnetic
are used mainly for storing movies. The quality of sound and video output is fields
much superior to video tapes. • Hold much more data than
floppy disks
Care of optical disks • Provide direct access to
data stored
CDs and DVDs are not indestructible, as they were made out to be when
they first became popular. Although they are more reliable than diskettes,
CDs must be handled with care otherwise data maybe lost. Data loss results
from: Did you know?
• Physical damage (breaking, melting, scratching, etc.) Did you know that many
• Blocking of laser light by dirt, paint, ink and glue computers have a single
• Corrosion of the reflecting layer. drive to read and write
The following are some guidelines for the proper handling of CDs and
to CD-R, CD-RW, DVD-R
and DVD-RW?
DVDs.
1 CDs and DVDs should be stored in their cases when not in use to
prevent them from being scratched or getting dirty.
2 Avoid soiling the surface of a CD - hold it by the edge or centre hole.
3 Keep your CDs clean by gently wiping both sides with a clean damp
cloth from the centre to the outer edge, not by wiping around the
disk. Wiping in a circle can create a curved scratch, which can
confuse the laser. For stubborn dirt, use isopropyl alcohol or
methanol, or CD/DVD cleaning detergent.
4 Do not write on the top side of the CD with a ballpoint pen or other
hard object as this can damage the data layer on the other side. Use a
CD marker instead.
5 Don't write on the top side with a fine-point marker or with any
solvent-based marker. (Solvent may dissolve the protective layer.)
6 Do not expose a CD to high temperature or humidity for an
extended period of time, as the CD may warp.
Flash memory
Flash memory technology is based on EEPROM (Electrically Erasable 0
Programmable Read Only Memory) technology. Like EEPROM, flash 33.E
0
memory is non-volatile. However, reading from and writing to flash memory
is a lot faster than with EEPROM. This is because data in flash memory can
Summary characteristics
be erased a block at a time instead of only a single byte at a time as is the
of flash memory case with EEPROM. Flash memory got its name because a block of memory
• Physically very small
cells is erased in a single action or'flash'.
• Highly portable
• High data capacity, The compact nature of flash memory enables it to be incorporated into very
ranging from 16 MB to 2 small solid state (no moving parts) devices that are available in all shapes
GB, and even more and forms. These devices are rapidly becoming an integral part of modern
• High data transfer speed to living. Flash memory is particularly well known today because of the
the device they are part of popular flash memory cards used in digital still cameras. These include
or attached to (camera, PC, CompactFlash (CF), SmartMedia (SM), MultiMediaCard (MMC), Secure
etc) Digital (SD), Memory Stick (MS) and xD Picture cards.
• Large storage capacity
compared to diskettes
Figure 3.8
Different types of flash
memory cards
For example, the Sony Memory Stick is an extremely versatile storage card
for digital images, music MP3 and more. This type of flash memory comes
in the form of a card shaped like a stick of chewing gum, with dimensions of
21.5 X 50 X 2.8 mm and a storage capacity up to 2 GB. The Memory Stick
weighs just 4 g and has a data-protection tag feature on the reverse which
enables users to protect data written on the flash memory.
Flash memory is also used in many electronic devices including PCs, cell
phones, PDAs, cable TV set-top boxes and video game consoles.
USB drive
Summary characteristics This new type of flash memory storage device does not yet have a generally
of USB drives accepted name. Each company calls it something different, including flash
• Easy to use drive, flash pen, thumb drive, key drive and mini-USB drive. They often
• Convenient (small size - double as MP3 players, i.e. you can download music to them from your PC,
can be placed in a pocket plug in some headphones and listen to your favourite songs.
or on a key chain)
• Large storage capacity
compared to diskettes
• Highly compatible -'plug
and play' (no software
needed)
• Fast access
• Password protection
• Disk write protection
switch (prevents data from
being accidentally written
over)
0
Figure 3.9
34 ^0 USB drive
•
All are small, about the size of your thumb or a large car key, and plug into a
USB po rt on the computer. No additional software is needed for Windows XP,
2000 or ME. Plug it in and the computer notices that a new hard drive has
been added, and will show it on your desktop.
These small flash dri ves can have storage capacities from 8 MB to 1 GB or
more! Some flash drives include a password protection facili ty an d the
ability to run software directly off the USB drive.
Magnetic Usually • Easy to transpo rt and store • Provides sequential access to data stored
tape 2-8 GB • Cheap • Limited shelf-life (2 years)
• Mostly used for backups or • Must be stored in a suitable environment
archives (smoke, dust, temperature and humidi ty
must be carefully controlled)
• Difficult to update files (cannot make
changes to a record without writing over
the entire tape)
Magnetic 1.44 MB • Provides direct access to data • Small storage capacity (unsuitable for
disk stored storing files containing graphics)
• Small and ve ry portable • Limited shelf-life (2 years)
• Easy to store • Slow read/write speeds
• Suitable for backing up
small files
• Data security (e.g. you can store
small files that you don't want
other computer users to see)
Fixed hard 40-120 GB • - Direct access • Not portable
disks •/^ Fast data transfer speeds
• Vast storage capaci ty
•
••
Questions 8 Magnetic tape is used to:
(a) Hold data necessary for starting up the
computer
Multiple choice
(b) Back up large amounts of data
Choose the most appropriate answer for each (c) Hold data that the computer is processing at
question. the time
1 The acronym ROM stands for: (d) None of the above
(a) Random Only Memory
(b) Read Only Memory True or False ?
(c) Read Optical Module 1 A 3.5-inch diskette is capable of holding
(d) Random Organising Memory a large amount of graphical data. Tq Fq
2 Which device holds data and instructions when it 2 Primary storage consists of RAM and
is not in use? ROM chips. Tq Fq
39 ^0
•
r)iitnhit nlpvwi
utput devices are pieces of equipment that are used to get information
or any other response out of a computer. If the output can be read by
O human beings it is said to be human readable. If the output cannot be
understood by humans it is said to be machine readable.
There are two types of output. Soft copy output or temporary output refers
to information displayed on a screen or in audio or voice form through
speakers. This kind of output disappears when the computer is switched off.
When the computer is off neither the screen nor the speakers work, because
they are always linked to and driven by the computer. Then there is hard
copy output or permanent output - this refers to output printed onto paper.
The main output devices you are likely to come across are:
Figure 4.1
i close-up view of
p
er showing pixels
Soft copy
output device, 0
Monitor/visual display unit (VDU)
The visual display unit (VDU) or monitor (also called simply 'the screen') can
output still or moving pictures. The screen is similar in appearance to that of
a television and helps the user to interface visually with the computer.
I mages and text are formed by many tiny dots of coloured light called pixels
(short for picture element). A pixel is the smallest unit on the screen. It can
be turned on or off or coloured in different shades. Pixels are so numerous
that when placed together in certain patterns they appear to form a smooth
image on the screen, be it a character in a word, a diagram or a photograph.
•
40 .• There are two types of monitors: cathode ray tube (CRT) and flat panel
display.
CRT
The most common type of display is the Al
same as that of the standard television set.
The inside of the screen is coated with
phosphorescent material. An electron beam
(a beam of charged particles) strikes this
surface, exciting the phosphors and causing
them to glow. A colour display has three
different types of particles coating the inner
surface of the screen. Each particle
produces different colours: red, green and
blue (RGB). These colours light the pixels on
the screen. When viewed from a little
distance away, the colours appear to blend,
forming the full range of colours as
required.
Figure 4.2
Flat panel display Cathode ray tube (on the left) and a flat panel monitor
There are two types:
• LCD (liquid crystal display): This display, as the name suggests, uses
Did you know?
liquid crystals which change their appearance when an electric current
is passed through them. It is small, light and flat with no moving parts, Did you know that the CRT
and uses much less power than the CRT display. It is therefore was invented in 1897 by
extensively used on laptop computers. the German scientist
• Plasma display: In this display light is created by a plasma discharge Karl Braun? It was first
from phosphors between two flat panels of glass. used in the cathode ray
oscilloscope, a scientific
instrument used to display data
Characteristics of monitors
about electric currents. Later, it
A monitor's full capabilities depend on several factors: became the basis of television.
1 The graphics/video card or adaptor being used The first successful
transmission of moving
The monitor's size
television images took place in
Its resolution 1925, by the Scottish inventor,
4 Its 'image aspect ratio' John Logie Baird.
5 Its 'refresh rate'
Let us look at these:
• Graphics/video card or adaptor: This is an electronic link between the
computer's processor and the monitor - it is a circuit board that connects
the processor to the monitor. It determines the display resolution, the
number of colours available and the refresh rate of the monitor. Both the
type of monitor and the graphics card determine the resolution. The
adaptor contains VRAM (video RAM memory) that will support a certain
resolution. You cannot set a resolution higher than the adaptor can
support. The more powerful the card is, the more capable the monitor
will be in all these aspects.
• Size: This is the diagonal dimension of the screen. Common sizes
include 15-inch, 17-inch and 19-inch monitors.
• Resolution: Resolution determines the clarity and sharpness of an
image when displayed on the screen. The more pixels there are on a
screen, the higher the resolution, and the greater the level of detail that
can be shown in an image. Some common resolutions are:
- VGA (Video Graphics Array) = 640 X 480 pixels
- SVGA (Super Video Graphics Array) = 800 X 600 pixels
- XGA/XVGA (Extended Graphics Array/Extended Video Graphics
•
Array) = 1024 X 768 pixels
- SXGA (Super Extended Graphics Array) = 1280 X 1024 pixels 41 %
- UXGA (Ultra Extended Graphics Array) = 1600 X 1200 pixels 40
• Image aspect ratio: This refers to the ratio of width to height of an
image on the screen. Most monitors have a 4:3 width to height ratio.
Notice that all the pixel dimensions shown above can be reduced to this
ratio mathematically.
• Refresh rate: This is the number of times the image is repainted or
refreshed on the screen per second. We get the impression that, for
example, a drawing on our screen is still, but in fact it is being repainted
continuously. If this process is slow, the screen may appear to flicker.
• The refresh rate is measured in hertz (cycles per second), e.g. 150
hertz (Hz) means the screen is refreshed 150 times a second.
- • The faster the refresh rate the less noticeable the flickering on the
screen.
• The higher the resolution the more lines need to be scanned across
the screen, or repainted per second.
Multimedia projector
This device is used to create and deliver dynamic multimedia
presentations (presentations in which sound, photos, video, text and other
moving graphics may be combined to interesting effect). There are two
types of multimedia projectors: LCD projector and LCD panel.
The LCI) projector has its own built-in lenses and light source and
connects directly to computer, television, video/DVD player and video
camcorder. Images from these devices are projected through the LCD
projector onto a screen or wall. Versions of the LCD projector now come
with a digital video camera on an arm extension attached to it. This video
camera allows real-time videos and pictures to be instantly projected
through the LCD projector onto a screen. For example, the camera can be
directed at a page in a book or at someone performing a demonstration; the
video camera image is projected through the LCD projector onto a screen or
wall.
The LCD panel is used with a normal overhead projector (OHP). This panel
is the size of a notebook and is placed directly on the surface of the OHP.
Like the LCD projector, the panel can be connected to devices such as
computer, television, video/DVD player and video camcorder. The image
displayed on the panel is projected onto a screen when the light of the OHP
shines through it.
Sound output
Sound output is another form of soft copy' output: it isn't permanent, as
printing would be. Some of the devices involved are as follows:
Speakers
A simple speaker will make a range of sounds available to the computer
user. Computer-generated sound, music output, computer-synthesised voice
and the normal speaking voice are now conventional output using a
speaker. Sound cards need to be installed in microcomputers to obtain good
sound quality for music or games.
42 %
•
Voice response systems
The voice response system selects from a set of digitised prerecorded words,
phrases, music, alarms or other sounds stored on disk. The system
combines these prerecorded words into responses based on selections made
by the user. For example, many phone banking systems use voice response
systems. Based on the information given to them when a caller selects
1 you knr
options on their telephone keypad, the bank computer outputs voice
information to the caller. The sounds must be converted from digital format Did you know that
back to analogue before being output to the speaker. speech synthesis can
now be demonstrated
on the Internet?
Speech synthesis
Connectto the World Wide Web
This system converts written text into computer generated speech ('text to and see what speech synthesis
speech'). It is used for computer-aided conversations by hearing- and web sites you can find.
speech-impaired persons, or for converting conversations/text from one
language into another.
The modem
A modern (short for modulator/demodulator) is a communication device
that sends and receives data. Therefore it is both an input and an output
device. It is used to convert digital data from the computer into analogue
data that can be transmitted over the telephone line. When the data gets to
the other end, another modem converts the analogue data back into digital
data so that the computer at that end can process it. A modem is an
extremely common device, often built into the computer. For example, it is
used to read data from, and transmit data to, the Internet.
1 Copy and fill in the blanks using A to E below. 2 Copy and fill in the • •
(1) = resolution blanks:
The print quality will vary depending on the type of printer, and also the
instructions you send to the printer as to the quality you require. For
example, in a standard household or office printer, there is letter quality,
near letter quality (NLQ), draft quality printing and photo quality.
I mpact printers
The print head of an impact printer contains a number of metal hammers
which strike an inked ribbon placed between the print head and the paper.
These hammers may contain complete characters; alternatively, they may
0 contain dots' that are used to build up a character. The main types of impact
printer are:
• Dot matrix printer
• Daisy wheel printer
• Drum, chain or band printer.
This printer is not used much any more: it is becoming obsolete, as laser
printers are able to produce the same quality print as the daisy wheel
printers and are much more versatile.
4,
arl L
Figure 4.5
Laser printer
Figure 4.6
Inkjet printer
One other type of printer worth mentioning is the Braille printer. This is an
• impact printer which converts text into the Braille code, producing patterns
46 of raised dots on paper for use by the blind.
•••
a
Plotters
A plotter is a peripheral used to draw
high quality, high resolution graphics,
charts, graphs, maps and vectors or co-
ordinate graphics on large sheets of
paper.
• Plotters are slow, but can draw
continuous lines often in a variety of
Li
colours.
• They are useful for producing
architectural drawings, building
plans, maps and CAD (computer
aided design) drawings, where
precision is required.
• The paper is sometimes laid on a flat
bed (flat-bed plotter) or on a rotating
drum (drum plotter).
There are three main types of plotters:
pen plotters, inkjet plotters and
electrostatic plotters.
• Pen plotters use a mechanical arm or
rail that holds a pen which can be
moved across the page.
• Inkjet plotters work in the same way
as inkjet printers by spraying ink onto
the paper.
• Electrostatic plotters work in the
same way as laser printers.
•
47:•
•
Summary Questions
1 Output devices are pieces of equipment that are
used to get information or any other response out Crossword
of a computer.
2 Output can be human readable or machine
readable.
3 Soft copy or temporary output disappears when
the computer is switched off.
4 Hard copy or permanent output refers to output
printed onto paper, microfiche or microfilm.
5 Monitors or VDUs are soft copy output devices.
Types include CRT, LCD and plasma.
6 A pixel is the smallest unit on the screen that can
be turned on or off or coloured in different shades.
7 A monitor's performance depends on the
graphics/video card or adaptor, its size, resolution,
image aspect ratio and refresh rate.
8 Sound is soft copy output. Computer-synthesised
voice, computer-generated sound, music output
and the speaking voice are output using a speaker.
9 Modems are both input and output devices, and
are used to communicate information over a
telephone line, e.g. to and from the Internet.
10 Printers are hard copy output devices and can be Across
classified as character, line and page printers. 3 Sound output (7)
11 Printers can be divided into two broad categories: 5 The print head of this printer strikes the paper (6)
impact printers and non-impact printers.
7 Clarity of an image (10)
12 I mpact printers include dot matrix, daisy wheel
and drum/chain/band printers. Down
13 Non-impact printers include thermal, laser and
1 Sprays ink onto paper in a dot matrix pattern (6)
inkjet printers.
2 Permanent output (2 words) (8)
14 A plotter is used, e.g. in CAD, to draw high quality
graphics, charts, graphs, maps and vectors or co- 4 Specialised output device used to produce
architectural drawings (7)
ordinate graphics on large sheets of paper.
15 Computer output on microfilm/microfiche (COM) 6 Smallest unit on the screen (5)
is hard copy output used to store computer
documents by vastly reducing them in size to fit
on photographic prints.
•
.•
48
•
Multiple choice 7 Describe how a robotic arm can be used in an
assembly line.
A monitor's capabilities depend on all except:
8 You are a consultant to a small business that types
(a) Resolution
documents and creates presentations for
(b) Size individuals. Select a suitable printer and explain to
(c) Refresh rate your client why you have chosen that printer for
(d) Print quality their business.
2 NQL refers to: 9 List TWO attributes of a monitor that affect its
display and explain how the monitor is affected.
(a) Refresh rate
10 There are two types of flat screen monitors, LCD
(b) The number of characters per second
and plasma. Explain the difference between the
(c) Print quality two.
(d) Type of monitor 11 State what you would use to print the following
3 All the following are non-impact printers except: documents: printer or plotter.
(a) Chain (a) A resume
(b) Thermal (b) A prenuptial agreement contract
(c) Inkjet (c) A design for a new gown
(d) Laser (d) A recipe
4 Which is not a characteristic ofJaser printers? (e) The redesign of a bathroom
(a) They are quiet (f) A map to get from the centre of the town to
(b) They have high print speeds your home
•
49 •
•
s you may recall, data is all the raw facts and figures that a computer
processes by following a set of instructions called a program. The way
A in which data is stored and represented depends on the medium
storing it and the type of data. Generally there are two types of data -
discrete and continuous. Discrete data is data that can be counted; for
example, the number of cars in a car park or the number of people that
responded 'yes' or'no' to a question. It has no value in between; for example,
you cannot say two and a half students are present. On the other hand
continuous data is data that can be measured and can be recorded at many
different points. For example, the temperature of a liquid can be recorded as
35 degrees Celsius (°C). However, based on the accuracy of the instrument,
the temperature maybe recorded to greater levels of accuracy, such as 32.5
°C or 32.53 °C or 32.534 °C, and so on. Other examples of continuous data
are length, temperature and volume (such as the volume of water or air).
Discrete data is processed by digital computers while continuous data is
processed by analogue computers.
These four values can represent four different symbols or characters. For
example, the numbers 0, 1, 2, 3 could be assigned to the four bit patterns:
00 0 10 2
01 1 11 3
With three bits we can have 8 (2 3 ) bit patterns. This means we can now
represent eight different characters (0 to 7):
000 0 100
001 1 101
010 2 110
011 3 111
With four bits we can represent 16 (2 4 ) characters, with eight bits we can
represent 256 (2 8 ) characters, and so on. Therefore with 'ii'bits we will be
able to represent 2" characters.
•
50 %.
••
e
Number systems0;• Did you know?
The number system that you are most familiar with is the decimal (base 10) Did you know that the
number system. This is the system that is used in everyday mathematical Voyagers pace probe
operations. However, since computers can only perform binary operations, has binary messages for
you need to know how to perform calculations using the binary number any intelligent life form
system. The next section deals with converting numbers from binary (base it may encounter on its journey
2) to decimal (base 10), and vice versa. through space? Launched in
1977, Voyager 1 and its twin,
Converting a binary number (base 2) to decimal Voyager2, were the first space
(base 10) probes to explore the outer
planets of our solar system.
Before converting a binary number to decimal we need to revise some basic Voyager 1's primary mission
concepts of the decimal number system. This system consists of ten digits ended in 1980 when it completed
(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) and for this reason it is also referred to as the base its observations of Saturn. Since
10 number system. The base of any number maybe indicated as a subscript then, it has been heading into
on the extreme right of the number (e.g. 455 10 means '455 to the base 10'). deep space. Voyager 1 and 2
These digits and their combinations are used to represent numbers in the both carry a so-called 'golden
decimal number system. record'—a 12-inch gold-plated
Each digit in the decimal number system has a value that depends on its copper disk. The disk carries
1
position or place in the number. The place values start at 10 for the digit of greetings and an overview of
smallest value on the right. You know from your mathematics lessons that our culture for extraterrestrials
0 0
10 = 1, since any number raised to the power of 0 is 1. So 10 is the 'ones who may one day stumble
1
place' or 'ones column'. Similarly, 10 is the 'tens place'. The value of each across one of these man-made
place increases by a factor of 10 for each consecutive digit moving right to left, craft. The record includes
until the digit of greatest value is reached: the digit on the far left. Again, samples of music; natural
you will recall this from your mathematics lessons. sounds such as thunder, waves
crashing, bird song; and
Let us look at the number 325. This number is made up of the sum greetings in multiple languages.
(addition) of each digit multiplied by its place value. Table 1 shows the value
of each digit in the number.
H T 0
2 1
(10 ) (10 ) (101)
1. 0 2 2. 0 2 3. 12 Therefore 01 2 + 10 2 = 112
+ 0 2 + 1 2 + 02
Example 6
Add together 011 2 and 0102.
0 2 12 12
(MSB) (LSB)
011
4. 1 2 5. 12
+ 010
+ 1 2 + 12
Step 1: Starting from the rightmost column (LSB) add
+ 12 the digits: 1 + 0 = 1. Write the 1 in the same column.
102 011
112 + 010
1
'Ib understand how the above calculations work, you
can think of them as follows:
Step 2: Add the digits in the second column: 1 + 1 =
10. Write the 0 in the same column and carry the 1 to
1. 0 2 + 0 2 = 0 2 . This is the same as: the next column.
(20x0)+(2°X0)=(1X0)+(1x0)=0x0 (carry) 1
= 0.
011
0 10 in base 2 is 0 2 , hence the answer shown.
+010
Similarly:
01
5. 1 2 +1 2 +l 2 is the same as:
Step 3: Add the digits in the third column: 1 (the
(2°X1)+(2°X1)+(2°X1)=1+1+1 carried bit)+0+0 = 1
= 3.
3 10 in binary is the same as We now have:
1 011
(2 X 1) + (2° X 1) = 112
+ 010
You also need to remember always that when adding
101
binary numbers 1 + 1 # 2, because the digit 2 is not
used in binary; similarly 1 + 1 + 1 # 3. Therefore 011 2 + 010 2 = 1012
•
Using four bits we can have 16 different combinations. From Table 4 we can see that there are two ways to
Using the convention 0 sign bit for positive and 1 sign represent the number 0, these are 0000 2 and 10002.
bit for negative, Table 4 shows the range of numbers Because of this drawback and a few others, computer
that can be represented. scientists have developed other methods of
representing numbers in the computer.
0000 0 1000 0
0001 +1 1001 -1 One's complement
0010 +2 1010 -2
0011 +3 1011 -3 In one's complement notation, positive numbers are
0100 +4 1100 -4 represented as usual in unsigned binary. However,
0101 +5 1101 -5 negative numbers are represented by simply flipping
0110 +6 1110 -6 all the digits. This means replacing all the zeroes by
0111 +7 1111 -7 ones and all the ones by zeroes. For example, positive
three (+3) in this system is written as 0011 2 . To get
negative three (-3) we replace the zeroes by ones and
Table 4 the ones by zeroes, so that it becomes 11002.
The range of numbers that can be represented using When converting a number to its one's complement
four bits is -7 to + 7. From the table we can see that the number of bits must be stated. It is therefore
when the 0 sign bit of any number is replaced by a 1 wrong to say, for example, 'find the one's complement
sign bit (except for the numbers representing 0) we get
of 100 2 '. You need to say, 'find the four-bit one's
the negative of the number. Example 8 describes how complement of 1002'.
a signed integer may be represented using sign and
magnitude representation. This numeric representation system is not used very
much today. It was common in older mainframe
Example 8 computers; the PDP-1 and UNIVAC 1100/2200 among
many others.
Give the eight-bit representation of -35 using sign and
magnitude representation. Example 9
First, find the binary representation of 35. What is the seven-bit one's complement of 0110?
- 35 R 1 Add three zeroes in front of the leftmost bit (MSB).
2 17 1
This gives 0000110.
2 Flip the bits. This gives 1111001.
2 8 1
The seven bit one's complement of 0110 is therefore
2 4 0
1111001. (The results do not need any further
2 2 0 explanation. Students would not be required to discuss
the decimal value of a one's complement number.)
2 1 0
0 1 Example 10
This gives 1000112 Using four bits give the one's complement representation
of-6.
Notice the answer consists of only six bits. To make it
an eight-bit number, we need add two zeroes to the 1 Find the binary representation of 6, following the
left, which gives 00100011 Note that adding the two process in Example 3. This gives 110 2 , i.e. (2 2 X
2•
zeroes to the left does not change the value of the 1)+(2 1 X 1)+(2 0 X 0)
binary string. 2 Add zero in front of the leftmost bit (MSB) to make
it a four-bit number. This gives 01102.
+35 =/001000112
3 Flip the bits. This gives 10012.
2 Add 1 to the one's complement. This gives 10102. Therefore the BCD representation of -256 would be
3 Now add 1001 2 and 10102: 1011 0010 0101 0110
1001
2 5 6
+ 1010
Example 15
10011
What is the BCD representation of -325?
1 Find the four-bit representation of each digit.
(Discard the extra bit) 2 0011 0010 0101
Since we are using only four bits we discard the V^ V
extra (leftmost) bit. The answer is therefore 0011. 3 2 5
Table 7 contains some examples of different binary 3 Place the BCD code for negative (1011) to the left of
representations of different decimal numbers: all the other bits.
1011 0011 0010 0101
BINARY REPRESENTATION OF THE NUMBER
Decimal One's 3 2 5
Two's Sign and
number complement complement magnitude The BCD representation is therefore 1011 0011 0010
representation representation representation
0101.
1 00000001 00000001 00000001
All the characters that a computer can store and process are called the
character set of that computer. Different types of computers may have
slightly different character sets, depending on their operating system. Each
character is represented by a code consisting of either seven or eight bits,
called the character code.
'Itvo of the most common codes used are Extended Bina ry Coded Decimal
Interchange Code (EBCDIC pronounced'Eb-see-dic') and the American
Standard Code for Information Interchange (ASCII pronounced 'As-key').
EBCDIC uses eight bits to represent each character and is therefore able to
represent 256 different characters (again, see page 50). ASCII on the other
hand uses seven bits to represent each character plus an extra bit called a
parity bit which is added to help ensure data integrity.
The standard ASCII code defines 128 character codes (from 0 to 127) of
which the first 32 are deliberately defined aS control codes. A control code is
a non-printable code that is used to tell the computer to carry out a
command such as 'skip a line' or 'start on a new page'. This is done by
.•
assigning one of the control codes to a command. Method 1
Whenever the computer encounters the code it carries
Since G is near the start of the alphabet, we can add 1
out the command. Control codes give programmers
to the codes of the consecutive letters until we reach
the opportunity to assign commands to actions that
G.
they may want to personalise in a particular computer.
In many cases there are many unused control codes. The code for A is 100001; to get B we add 1 to the code
of A, this gives 1000010; to get C we add 1 to the code
The remaining 96 character codes are representable
for B, this gives 1000011: and so on. If we continue
(printable) characters (Table 8). ASCII code is mostly
adding we will find that G is therefore 1000111.
used in mini and PC computers while EBCDIC is
mainly used on large IBM computing systems. A 1000001 C 1000011 E 1000101 G 1000111
B 1000010 D 1000100 F 1000110
From Table 8 we can see that the codes increase by
adding 1 2 bit to the previous code. For example, the
code for the letter A is 1000001 2 . Tb get the code for the Method 2
letter B we add 1 to 1000001 2 , which gives 10000102. Here is another method which maybe more efficient.
This pattern is repeated for the entire character set. 1 Convert the binary code for A (1000001) to its
From this pattern we can determine the codes of other decimal equivalent.
characters if we are given the code of any character in
1000001 = 65
the set.
2 Find the decimal equivalent of the letter G. We
Example 16 know that A is represented by 65, B will be 66, C
will be 67 and G will therefore be 71.
The ASCII code for the letter A is 1000001. Determine the
Convert 71 to its binary equivalent.
seven-bit ASCII code for the letter G.
71 = 1000111
Let us look at two methods to solve this problem.
3 The ASCII code for G is therefore 1000111.
A computer only uses one of the two types. So, if a Second bit after Z
2 /4 .25
computer is using even parity, a 1 or a 0 is added to the the point .01
bit string to ensure that the number of ones in the bit
Third bit .001 2-3 1/8 .125
string is always even. In an eight-bit byte the leftmost
-4
bit would be changed to 0 or I to ensure that the Fourth bit .0001 2 '/16 .0625
number of ones is even. Fifth bit .00001 2 -5 1/32 .03125
For example, given the binary string 1100010, a one
needs to be added to ensure that the number of ones is Table 10
even. Therefore adding the parity bit would make this
Using the weighting for each digit in a binary fraction
binary string 11100010. If the device receiving the data
we can find the decimal equivalent. Let us look at an
detects a string with odd parity, the data is rejected
example.
and an error is reported.
The process is similar for odd parity, but done in the Example 17
opposite way.
Convert the binary frac ti on 11.101 2 to decimal.
Starting from the left of the binary fraction, we record
Fixed point the digits down the table:
Example 19
Convert .65 10 to binary.
0.65 X 2 = 1.30, so the first bit is 1, remainder 0.30
0.30 X 2 = 0.60, so the second bit is 0; but we are still not finished, we need
to multiply this remainder
0.60 X 2 = 1.20, so the third bit is 1, remainder 0.20
The discussion pertaining to
0.20 X 2 = 0.40, so the fourth bit is 0, remainder 0.40 rounding and truncating is very
0.40 X 2 = 0.80, so the fifth bit is 0, remainder 0.80 complex. Afurther explanation
will complicate matters and is
0.80 X 2 = 1.60, so the sixth bit is 1, remainder 0.60 not required at this level. The
0.60 X 2 = 1.20, so the seventh bit is 1, remainder 0.20 purpose of mentioning the
rounding and truncating was to
Carry on for a while, and you will soon notice that the pattern is now show that whenever we use a
repeating itself, resulting in a very long string of numbers after the binary small number of bits to represent
point. Depending on how many bits we want to store, we therefore truncate a number the accuracy of the
or round the result. Let us use five bits to store the value. If we truncate, the numbers decreases.
value would be 0.10100. If we round off we get 0.10101. The rounded version
gives 0.65625 and the truncated version gives 0.625. We see that both
versions are not very accurate ways to store real numbers.
In fact really large and really small numbers are hard to represent unless
you're prepared to allocate very many bits of storage.
1 Find the decimal
Example 20 equivalent of the
following binary
Convert 26.625 io to binary.
bina fractional numbers.
lb convert 26.625 10 to binary, we deal with the integer and fractional parts (a) 0.1011
separately. (b) 0.1110
(c) 0.0001
First, as we did earlier, we repeatedly divide by 2 to obtain 26 10 = 110102. (d) 1.0010
'Ib convert 0.625 10 to binary, repeatedly multiply by 2. (e) 11.11
(f) 101.111
0.625 X 2 = 1.25, so 1 remainder 0.25
2 Find the binary
0.25 X 2 = 0.50, so 0 remainder 0.50 equivalent of the
0.50 X 2 = 1.00, so 1 following decimal
numbers.
Since the fractional part is now 0, we stop. Starting from the top we record (a) 0.25
the digits. (b) 0.75
0.625 10 = 1012 (c) 0.375
(d) 5.435
Therefore 26.625 i o = 11010.1012 (e) 9.875
Floating point numbers, • Consider the decimal number 5.64367 X 104.
• The number is positive (sign).
In many scientific and engineering applications very
• The fractional part (5.64367) is called the
small or very large numbers have to be represented,
mantissa.
from the sizes of atomic particles to intergalactic
• The base is 10
distances. Tb be able to accomplish this, many
• The power to which the base is raised is called the
computers store numbers using the floating point
exponent (i.e. 4).
format. This method is similar to the method of
representing numbers in base 10 known as standard The number 5.64367 X 10 4 can therefore be
form. For example: represented as:
The number 58 000 000 The number 0.00000025 Sign Exponent Mantissa
could be represented as: could be represented as:
positive 4 5.64367
5 800 000 X 10 0.000 0025 X 10 -1
Binary fractions can be stored using a similar format
580 000 X 102 0.000 025 X 10-2 of sign, exponent and mantissa (SEM). Computers use
different amount of bits to store floating point
58 000 X 103 0.000 25 X 10 -3
numbers. Most computers use the IEEE standard
5800 X 104 0.0025 X 10 -4 which allocates 32 bits for single precision and 64 bits
for double precision. This is more complicated than
580 X 105 0.025 X 10 -5
we need for our purposes at present, so in our
58 X 106 0.25 X 10-6 examples we will use eight bits to represent a number
using the following convention:
5.8 X 107 2.5 X i0 -
Sign Exponent Mantissa
In each of the numbers represented above the decimal
points have been moved (or floated) along the digits. 1 bit 3 bits 4 bits
However, it is only the last representation of both
Consider the binary number 11.112.
numbers that is considered as standard form. This is
where the decimal point is placed between the first This could be written as .1111 X 2 2 . The process of
and second non-zero most significant digits. There are shifting the binary point and multiplying by a power
four components to a standard form (floating point) of two is called normalisation. This is similar to
representation. writing a base 10 number in standard form. Generally
when we shift a floating point number we shift the
binary point so that it is immediately to the left of the
leading I (e.g. 11.11 becomes .1111 X 2 2 ) unless the
number stored is zero. This is done to ensure the
maximum utilisation of the available memory space.
We will also use the following convention for the sign
bit: 0 for positive and 1 for negative. 'Ib represent
positive and negative exponents, the exponent will
be represented using sign and magnitude
representation.
r
Example 21
Store 11.11 2 using the SEM format.
Step 1: Normalise the mantissa. This gives .1111 X 22
Step 2: The exponent is 2, which is 010 in binary (using three bits to store the
exponent)
Example 22
Represent 5.5 10 using sign, exponent and mantissa.
We can represent 5 10 as 1012
.5 can be represented as .1 in binary fraction format, as you have already
learned.
So 5.5 10 = 101.12
Using our convention the sign bit will be 0 because the number is positive.
The exponent is 3. Using sign and magnitude notation this will be 011.
63 ^0
•
Summary 13 Tb ensure that data transmitted from one part of a
computer to another and from one computer to
1 Data can be classified into two types: discrete and another is accurate a parity bit is used. There are
continuous. Discrete data is data that can be two types df parity: odd and even parity. In an odd
counted while continuous data is data that can be parity system, if the numbers of is in the original
measured and can be recorded at many different bit string (the bit string being sent) is even, then
points. the parity bit is set to 1 to ensure that the total
2 A decimal (base 10) number can be converted to number of is is odd. The opposite applies for even
binary by dividing the decimal number by 2 and parity.
recording the remainder until the quotient is zero 14 'lb convert decimal fractions to binary fractions
and then writing out the remainders starting from you have to repeatedly multiply the fractional part
the last remainder to the first. by 2 until the fractional part becomes zero, or
3 A binary number can be converted to decimal by until the pattern starts to repeat itself. Then
multiplying each digit by its place value starting starting from the top of the series of calculations,
from the least significant bit (LSB) on the right to record the binary digits before the point to get the
the most significant bit (MSB) and summing the binary fraction.
results. The place value is a factor of 2 starting 15 'lb convert a binary fraction to decimal, multiply
from 2 0 for the LSB and increasing by a factor of 2 each digit by its weighting starting from 2 -1 for the
for each consecutive bit. first digit after the binary point and then by 2 -2,
4 Binary addition can be easily done by 2 -3 and so on for each successive digit. The totals
remembering the following rules: are then added together.
0 2 +0 2 = 02, °2 + 1 2 = 1 2 , 1 2 +0 2 = 12, 16 Floating point numbers are stored using the sign,
1 2 + 1 2 = 10 2 and 1 2 +1 2 + 1 2 = 112 exponent and mantissa format. All floating point
5 There are four main ways of representing numbers must be normalised before they can be
negation inside the computer: sign and stored.
magnitude, one's complement, two's complement 17 Normalisation means shifting the binary point in a
and binary coded decimal. In sign and magnitude, floating point number so that it is immediately to
one's complement and two's complement, the left of the leading 1.
positive integers (whole numbers) are represented
the same way as for unsigned binary numbers.
6 In sign and magnitude representation, the
leftmost bit (MSB) is used to indicate the sign (+
or -) of a binary number. Usually '1' represents
negative (-) and '0' represents positive (+). The
remaining bits give the magnitude of the number.
7 Finding the one's complement of a number
81 involves flipping the bits. This means changing
the is to Os and Os to is.
8 Two's complement is found by adding l to the
one's complement of the number.
9 The BCD system converts each digit of a decimal
number into its four-bit binary code. Negative (-)
is represented by 1011 and positive (+) is
represented by 1010.
10 The character set of a computer consists of all the
characters that a computer can store and process.
11 Characters (numbers, alphabetic characters,
special characters and control characters) are
represented by a code called the character code.
12 TWo of the most common codes used to represent
characters are the seven-bit American Standard
Code for Information Interchange (ASCII) and the
eight-bit Extended Binary Coded Decimal
• Interchange Code (EBCDIC).
64 S
•
Questions
1 An 8-bit register stores integers using two's
complement.
(a) What is the 8-bit representa ti on of 65 and -65?
(b) Using binary addition find the value of -1-65.
(c) What is the decimal equivalent of 111.111?
2 (a) Store the following bit st ri ngs using sign,
exponent and mantissa format (SEM).
1 bit - sign, 3 bits - exponent,
4 bits - mantissa.
(i) 11.01 (ii) 01.11
(b) Represent the following decimal numbers
using SEM format.
(i) 2.5 (ii) 3.75
3 (a) Using examples, explain what is meant by
'normalising' the mantissa.
(b) Normalise the mantissa in the following:
(1) 1.1101 (ii)111.001
4 An eight-bit register is used to hold a floating-point
number. The number is stored as follows:
1 bit for the sign
3 bits for the exponent
4 bits for the mantissa
The exponent is stored using two's complement.
(a) State the bit pattern of the largest and smallest
numbers that can be represented.
(b) State the equivalent decimal value of the
smallest and largest numbers that can be
represented.
5 (a) What is the decimal equivalent of 101011?
(b) The SX computer uses nine bits for storing a
floating point number, one bit is used for the
sign, three bits for the exponent (a power of 2,
stored using two's complement) and five bits
for the mantissa.
(i) Give the range of exponents (in decimal)
which can be stored.
(ii) What is the largest decimal number that
can be represented?
(iii) What decimal number is represented by
the following bit patterns?
011011100
101110101
65 ^0
•
oftware is the general name given to all the programs (set of
instructions) that computers use to perform different tasks. Software
S can be classified into two major types: application software and
system software.
Application software
These are programs developed to carry out specific tasks or solve particular
problems. For example, if you want to type a letter, you would need to use a
word processor.Ib create a highly decorated birthday card would require
some type of graphics package. Word processors and graphics packages are
examples of application software.
There are man y different types of application software available these days.
Each is designed for a particular type of activity. Selecting the right
application software to perform a task makes it easier to accomplish the
task, and will greatly improve the final outcome. When you purchase a new
computer it is usually sold with systems software and some application
software. However, depending on your needs, you may have to purchase
additional application software. Application software includes
entertainment software such as games, home or personal software such as
CD-ROM encyclopaedias, productivity software such as word processing and
spreadsheet packages, and specialist software such as desktop publishing
and graphics packages. Application software can also be categorised as
follows: general-purpose software, integrated software, customised software
and custom-written (tailor-made) software packages.
General-purpose software
This is software that is not written for any specific business or organisation
but can be used or adapted to suit their specific needs. For example, a
teacher can use a spreadsheet package to prepare students' end-of-term
grades reports, and a word processing package to write letters to the parents.
These same packages could also be used in a business to perform different
tasks, such as accounting or memo-writing. General-purpose software
packages, also called 'off the shelf software, are usually well tested and
relatively cheap.
Integrated software
An integrated software package is a set of related programs combined in a
unified package that allows data to be transferred easily between the
programs. Examples include Microsoft Office, Microsoft Works, Lotus
Smartsuite and the IWorks package used by Apple Macintosh computers.
A basic integrated package may contain word processor, spreadsheet,
database, communications and graphics presentation programs. A major
•
advantage of these packages is the ease with which data can be transferred
66 •
•
In
from one component to another. For example, if you are working
on a word processing document you can quickly incorporate a
graph created in the package's spreadsheet component via a simple
cut/copy-and-paste operation.
Specialised software
Specialised software is software that is written for
a specific task rather than for a broad application area. These prograrr
provide facilities specifically for the purpose for which they were
designed. For example, a payroll program will usually only be able to
deal with all aspects of a company's payroll, i.e. for one very specific
purpose. Other examples of specialised software are expert systems
(software that operates like an expert in a particular field, e.g.
medical expert systems), accounting programs such as ACCPAC,
and theatre or airline booking systems.
Customised software
This refers to general-purpose software which has been
modified to meet the needs of an individual or organisation
better. These packages are customised through the writing of
code or macros. Macros are short programs written to
automate several steps in software such as databases,
spreadsheets and word processors. An instruction (usually a
keystroke or keystroke combination) signals the computer to
perform a predefined sequence of instructions. Macros are
usually written by experienced end-users of the program once
the program is complete. The core code of the program allows
for these macros to be added.
System software
System software is software that manages and supports the resources and
operations of a computer system. It enables the running of application
software and the management of the system resources. Three major
categories of system resources are the operating system, utility programs
and language translators. System software acts as a buffer between the
hardware and application software. Figure 2 shows a conceptual
arrangement of hardware, system software, application software and the
user.
Operating system
User
An operating system is a set of programs that governs the operation of a
computer. Without operating system software, the computer cannot
Application Software function. In some hand-held computers such as PDAs and Palm pilots, the
operating system is embedded on a ROM chip. However, for most PCs and
larger computers the operating system is switched on as soon as you turn
System Software
on, or 'boot', the computer. The term hooting refers to the process of
Utilities Operating r Language loading operating system software into a computer's main memory from
System Translators disk. The operating system remains in main memory until you turn the
computer off.
Hardware
Types of operating system
Some older operating systems that were used in PC computers include:
Figure 6.2 MS-DOS, Windows 3.X, Windows 95. Some operating systems that are still in
Conceptual arrangement of use today include: Windows 98, Windows ME (Millennium Edition),
hardware, system software, Windows 2000, Windows XP, Windows NT, Apple operating systems (e.g.
application software and the user OS9 and OSX), OS/2, Linux and Unix. There are Unix operating systems for
PCs, mini and mainframe computers.
68 %
Functions of the operating system
Did you know?
The functions of an operating system depend on the size and complexity of Did you know that the
the computer system. It may also depend on whether the system is a single Linux operating system
user system such as a PC or a multi-access system such as a mainframe or was initially developed
network. A multi-access system is one which allows a number of users with by a young University of
online terminals to interact with the same computer at the same time. An Helsinki student by the name of
online system is one where the terminals and the computer are linked Linus Torvalds? Linux was
interactively. Although the operating systems of mainframes and networks released with a General Public
are much more complex and perform a wider range of functions than those Licence and is example of 'open
of PCs, the functions of most operating systems can be grouped under the source' software. This means
headings discussed below. that anyone can copy, distribute
and modify the software's code,
Managing computer resources thereby building on the source
Managing all the resources of the computer system is a large part of the code written by MrTorvalds.
operating system's function. The operating system allows application This source code is often used
software or user programs such as word processing, spreadsheet and by other individuals to develop
database packages to communicate with the computer's hardware. For new, free programs. These
example, if you are working in a document in Excel and you want to print individuals often share the same
the document, you simply access the 'Print' command or press the 'Print' philosophy of cooperation and
button on the standard toolbar. Excel directs the operating system to select a openness as the code's original
printer (if there is more than one) to print the document. The operating inventor.
system then notifies the computer to begin sending data and instructions to
the appropriate program to get the document printed. Figure 6.3 shows how
the operating system acts as an interface between application programs and
the hardware.
Application
Hardware software
1. Command to 'Print'
2. O/S selects printer
Operating 3. Instruction from O/5 to
Excel
Lnnte9 System start sending Document
5. Document sent to
printer 4. Document sent to
programs in O/S
Figure 6.3
The operating system also manages the use of input and output devices. The operating system is at the
This is accomplished by the use of buffers. A buffer is an area of memory centre of operations, interfacing
that temporarily holds data being transferred to be processed or output. between software and hardware
Input buffers take data from a device (for example a keyboard) and hold the
data, releasing it to the CPU at a rate the CPU can cope with. This function is
especially important when a number of processes are running and taking up
processor time. The operating system will instruct a buffer to continue
taking input from the device, but to stop sending data to the CPU while the
process using the input is suspended. Then, when the process which needs
input is made active once again, the operating system will command the
buffer to send data.
The operating system functions in much the same way with output buffers.
An output buffer is used to store data waiting to be printed. For example, a
program that has to use the printer will transfer whatever needs to be
printed to the print buffer and continue processing. In this way the CPU
does not have to be idle while the printer, which operates at a much slower •
69 • •
•
JlW
speed, prints the document. The operating system also provides error
messages to indicate devices that may not be working properly or not
functioning at all.
Maintaining security
In networks and larger computers each user is given a username or ID and
password to gain access to the computer system. The operating system
keeps a register of all these names so that only persons with valid
usernames or IDs and passwords can access the system. This prevents
access by hackers and unauthorised persons. The operating system also
keeps a log which records which users logged in, the length of time each
user stayed on the system and what they did. Administrators can check the
log for breaches and abuse of resources.
Managing tasks
Early computers ran one process at a time. However, because of the fast
speed of the CPU and the much slower speeds of input/output devices the
CPU remained idle much of the time. 1b reduce the idle time of the CPU
multitasking or multiprogramming operating systems were developed.
Multitasking is the ability of the computer to appear to run more than one
program at the same time, although at a specific instant in time the CPU is
dealing with only one instruction for one of the active programs. The
operating system manages which instruction to send to the CPU.
For example, many students like to listen to music on their computer while
at the same time typing a document or playing a computer game. Another
example of multitasking is a user typing an e-mail while another e-mail is
being sent. These tasks appear to be happening simultaneously. Because
computers are so fast, the operating system can switch the program
executed in the CPU so quickly that the user cannot tell that, in reality, the
music-playing and typing functions are performed at individual moments in
time. Multitasking therefore accelerates the throughput of the system by
using the CPU time efficiently. Processes running in a multitasked
environment are called concurrent processes. In actuality, the CPU
processes one instruction at a time, but can execute instructions from any
active process.
Multiprocessing
This refers to a computer system's ability to support more than one process
(program) at the same time. Multiprocessing operating systems enable
several programs to run concurrently. This is accomplished by linking two
or more computers or processors which can then work on different
programs or different parts of the same program simultaneously. This
• generally increases processing times.
70••
•
Multiprocessing is much faster than multitasking/multiprogramming as
more than one program is processed at the same time. This type of
processing is used in real-time systems where fast processing speeds are
very important.
Processing modes
• Time-sharing: Time-sharing is one method that can be used in multi-
access systems. It makes many users believe they have the undivided
attention of the CPU. Tb accomplish this, the CPU allows each terminal
in turn a small amount of processing time (time slice) before it goes on to
the others. Each terminal is checked by polling to see if the CPU is
required. The process happens so quickly that every user on the system
thinks he/she has the continuous use of the CPU. The Unix operating
system is used for multi-access time-sharing systems, for example in
universities, where many students and professors may be connected to
the central CPU at one time from different terminals.
• Batch processing: A batch processing system is one where programs and
data are collected together in a batch queue before processing starts.
Batch processing is normally done on large mainframe computers. Each
piece of work the computer will do is called, simply, a job. Often a job
consists of a program to be run and the data that will be manipulated by
it. Batch jobs can be stored up during working hours and then executed
whenever the computer is least in use (usually at night). Once a batch
job starts, it continues until it is done or until an error occurs. There is no
interaction with the user while the program is being run. Batch
processing can be used for fairly automatic tasks, for example, weekly or
monthly payroll processing, processing utility bills (water, electricity,
etc) and credit card billing.
Real-rime processing: Real-time operating systems are designed to respond
to an event within a predetermined time. As soon as the data is input it is
processed and output immediately. In some applications the output is
used to influence the input. These types of operating systems are found
in environments where computers are responsible for controlling
systems continuously; for example, robotics, manufacturing, interactive
games, airline and theatre booking systems. In all these applications the
computer is often a dedicated computer and runs the same program all
the time.
User interfaces
There are three types of user interfaces, both for operating systems and
applications software: command-driven, menu-driven and graphical.
Command-driven interface
The command-driven interface is used in PCs that either operate exclusively
with the MS-DOS operating system, or in PCs that are currently in MS-DOS
mode rather than Windows mode. This interface requires you to enter a
command by typing in codes or words. You have to type in the command at Figure 6.4
A computer screen in MS-DOS mode •
ii .
•
the prompt on the display screen. For example, at the C:\ > prompt, where
C:\ generally refers to the hard disk, you can type the following command:
C:A>delete *.*
This command tells the operating system to erase all the files on the hard
disk. Figure 6.4 shows an example of a command user interface.
72 %
0
In this section of the chapter we will take
you through some of the most basic and
i mportant features of this graphical user
interface:
First you will look at some of the
icons you need to be most familiar
with.
2 You will then learn how to manage all
your computer files.
Finally, you will learn about some of
the key system utilities that will help
you maintain your computer in good
working order.
My Computer
U. La iTem PRvotm Led o
7eb
When this icon is opened Windows 98
JBack - ©. JJ Sea A: OFolds ®s-.
displays the icons which represent __.._:._
__
0.lbess; S My DmPM vI OG.
devices such as the hard drive (C:), 3.5- M
qe Rued m llb EampRer
System Tasks
inch floppy drive (A:), CD drive (D:)
v system gdwmation 9 & ed DOU,nents
and DVD drive (E:), as well as Add aranove VVWams I.^
applications, folders, files and other Q' Owgeasetteg
items. In Windows XP, the 'My
Dthe, Places
Computer' window shown in Figure 6.7 ^Lmal psk(C:) My D..n ,(D:)
4, Mi Nelwnk%a[es
displays the different drives and MV DOOene, 65
5hatedDmmmtz Devices wft Removable Storage
folders, as well as other windows. One co,tol P3,51
is a menu to select System Tasks such 3½Flopp
Floppy (A:) DVD -RW D m e (E:)
as adding and removing programs, Detzi
viewing system information and Rolmd's Docvttnts
Laal Cek
changing a setting. Another titled Fie System: NIPS
Fee 5,3,e: 23.5
Other Places gives the following rocs Ese: 66 .5
options: 'My Network Places', 'My
Documents', 'Shared Documents' and
'Control Panel'.
Figure 6.7
Recycle bin
The Windows XP
This is where deleted objects (files, programs, etc.) are placed by the 'My Computer' window
computer until you empty the bin. Items in the bin can be retrieved if you
realise that you don't want to delete the item after all. However, once the bin
is emptied items can no longer be retrieved. This icon functions the same
for all versions of Windows (e.g. 98 and XP).
•
73 ^•
•
In
subjects could be placed in the one folder called 'Assignments', which is also
shown in the figure. The name chosen by the user - 'Assignments' - is an
'umbrella' term for the all the sub-folders that would be found in that folder.
Creating a folder
'Ib create a folder on the desktop (e.g. Windows 98
(ED Folder or XP):
© Shortcut
1 Right-click on any clear area on the desktop.
Briefcase 2 When the pop-up menu appears select New.
Bitmap Imag 3 Select Folder from the menu that appears as
,_;;j Microsoft Word Document shown in Figure° 6.10.
Microsoft Office Access Application
4 A folder icon appears on the desktop and you can
Microsoft PowerPoint Presentation
Arrange Icons By give it a name.
Adobe Photoshop Image
Refresh
-J Microsoft Office Publisher Document Folders can be created in a diskette or hard drive by
Psr: Text Document selecting it, opening it and following the procedure
Paste Shortcut
I CJ WAV Audio outlined above, or by clicking the File menu and
Undo Delete Ctrl+Z selecting New and Folder. Folders can also be
Microsoft Excel Worksheet
L] Compressed (zipped) Folder created and stored within other folders.
Properties
Windows Explorer
Windows Explorer is the utility used for file
Figure 6.10
management functions in Windows operating
Creating a folder on the desktop
systems. It can be used to move, copy, rename,
duplicate and delete files, and to browse through
the directory. Explorer displays the file structure in
a hierarchical 'tree'.
If you want to find out more Back =.. Up Cut - Copy Paste U ti e(
about this topic you could Ideas L J C:IB ITWARE
look up the related
der"
animations and activities Desktop d Cap File Folder 05/23/006:29...
on your companion
J Fax File Folder 05/23/00 6:29 ...
My Computer
CD-ROM. +^ 4 31 Floppy (A:) C3 Voice File Folder 05/23/00 6:29 ...
O-, IC:I C3 Xfer File Folder 05/23/00 6:29 ...
! 0+-Q Acroread lO.wav 4KB Wave Sound 05/23/00 6:31 _.
^C7^ ® 41.wav 4KB Wave Sound 05/23/006:31...
.:--I Cap 410.wav 4KB Wave Sound 05/23/006:31 ..
{ Fax f s1 o0,,,av 5KB Wave Sound 05/231006:31 ..
--{_] Voice e1000.wav 6KB Wave Sound 05/23/00 6:31 ...
-- e 11 wav 5KB Wave Sound 05/23/006:31 ...
B--{ BookPack 05/23/006:31...
e12wav 5KB Wave Sound
cameol
s 1 6KB Wave Sound 05/23/006:31...
- ^] cameo2
--- applications e j 14.wav
^n.q 5KB Wave Sound 05/23/006:31...
-.. Computer applications 2 4015.wav 6KB Wave Sound 05/23/00 6:31 ...
{ L3-C] Corel Q]16.wav 7KB Wave Sound 05/23/00 6:31
Windows 98:
1 Click the Start menu. 1
MiY tlLL j >sms
®® J LJ
2 Click on Programs. a MC I"
d ,^3Nf1a0Y^R:) —Rf6° Cv50LC Orte Savrm
i i lvl Pd(C:)
3 Select Windows Explorer. a Somawome^E:l :0. ^ ®v ° ^" 9 "°""° oweese
0 fi.eeo.
m^e ^.
The Windows 98 Explorer window as LI
04Yn adrbu . IXUK.umm[ hv[- m .m
C.
£yS ONCE kitm
shown in Figure 6.11 is displayed. LI
ReA
A a P j ,,,.w...
s OtoswTon
2 Click on All Programs. adorn
aalemu
LI OHS. WI
3 Click Accessories.
4 Select Windows Explorer. ab
Utilities
Utility programs are system software programs which provide useful
services, such as performing common tasks and housekeeping' routines.
Some are included with the operating system (for example, disk repairing
programs) while others are purchased separately by the user (for example,
Norton Disk Doctor). Some of the functions performed by utility programs
include:
• Backup: This utility allows you to make a duplicate copy of every file on
your hard disk, which can be stored on CDs or diskettes.
• File defragmentation: When files are stored in a new computer or hard
disk they are stored next to one another (contiguously). After using your
computer for a while you will probably have deleted old files and added
new ones. The computer fills free gaps with new files, including parts of
files. After a while, the constituent parts of a typical file are scattered all
over your hard disk - they are fragmented. This can considerably slow
down your computer, as the operating system must first find all the parts
of a file before they can be put back together and loaded. A defragmenter
utility finds these fragmented files and organises them back in a
contiguous manner.
• Disk repair: A disk repair utility scans a hard disk or floppy disk for bad
sectors (defective areas) and either makes repairs to these sectors, or
marks the defective area so that the operating system will not store any
data in that location.
• Virus protection: Antivirus software programs are also utility
programs. These are covered in Chapter 9.
• Language translators: Language translators (assemblers, compilers and
interpreters) translate a program written by a programmer into machine 77
language (the language the computer can understand). •
•
Summary 13 Real-time operating systems are designed to
respond to an event within a predetermined time.
1 Software is the general name given to all the The response may in turn create a response in the
programs (sets of instructions) that computers use user, e.g. in computer games, which are always in
to perform different tasks; it can be classified into real-time mode.
application software and system software.
14 The user interface is the user-controllable part of
2 Application software programs carry out specific the operating system which allows you to
tasks or solve particular problems and can be communicate, or interact, with it. The three types
categorised as general-purpose software, are command-driven, menu-driven and graphical.
integrated software, specialised software,
15 The command-driven interface requires you to
customised software and custom-written (tailor-
enter a command by typing in codes or words. An
made) software packages.
example is MS-DOS.
General-purpose software is software that is not
16 Menu-driven interfaces allow you to use either a
written for any specific business or organisation
mouse or cursor-movement (arrow keys) to make
but can be used or adapted to suit anyone's
a selection from a menu. An example is the pull-
specific needs, e.g. a word processing package.
down menus in Microsoft Word.
4 An integrated software package is a set of related,
17 The graphical user interface, also called WIMP
specialised programs combined in a unified
(windows, icons, menus and pointing devices),
package that allows data to be transferred easily
allows the use of graphics (icons), menus and
between each of the programs, e.g. Microsoft
simple keystrokes to choose commands, start
Office.
programs, see lists of files and many other
5 Specialised software is software that is written for options. The most popular example in use today is
a specific task rather than for a broad application Windows.
area, e.g. accounting software.
18 Utility programs are system software programs
6 Customised software is general-purpose software which provide useful services by performing
which has been modified to better meet the needs common tasks and 'housekeeping' routines, such
of an individual or organisation, for example, as backup, disk defragmentation, disk repair, virus
using macros. protection and language translation.
7 Macros are short programs written to automate
several steps in software, such as in database,
spreadsheet and word processing programs. They
are often written by end-users.
Questions
8 Custom-written (tailor-made) software is software
written to meet the specific needs of a specific Fill in the blanks
company or organisation; it is therefore expensive 1 software is written for a
and highly specialised. specific task rather than for a broad application
9 System software is software that manages and area.
supports the resources and operations of a 2 Software written to meet the specific needs of a
computer system; it includes the operating company is known as
system, the user interface and utility programs. 3 Software that manages and supports the resources
10 An operating system is a set of programs that and operations of a computer system is known as
governs the operation of a computer. It manages
computer resources, files, memory, tasks and 4 Programs developed to carry out specific tasks or
maintains security. solve particular problems are called
11 A time-sharing processing system makes users in
a multi-access environment believe they have the 5 refers to a computer's
undivided attention of the CPU. It does this by ability to support more than one process at the
giving each terminal in turn a small amount of same time.
processing time (a time slice) before going on to
6 A system where programs and data are collected
the others, then quickly returning to the first
together in a batch queue before processing starts
terminal again.
is knownasa
12 A batch-processing system is one where data is
7 The is a set of programs that
collected together in a sequenced batch queue
governs the operations of a computer.
• before processing starts. The program is then run
without interaction from the user.
78 %
0•
(b) Unix
(c) Windows ME
(d) Language translator
9 A folder or directory can contain:
(a) Files
(b) Folders
(c) Programs
(d) All of the above
10 Operating system software that allows more than
one user to access the same data is called:
(a) Multitasking operating system
(b) Multi-user operating system
(c) Single user operating system
(d) File managing operating system
Figure?.! •
81
:•
•
The lines that transmit data can also be classified according to the direction
Did you know? in which data flows through them.
Did you know that there • A simplex line permits data to flow in only one direction. You can send
are currently over 2000 data or receive data, but not both.
• A half-duplex line can alternately send and receive data. This means
satellites orbiting the
that at any particular time you can either send data but not receive it, or
earth, many of which
are used for communication? receive data but not send it.
• A full-duplex line can simultaneously send and receive data.
Wireless communication
Wireless communications offer organisations and users many benefits, such
as portability, flexibility, increased productivity and lower installation costs.
Wireless technologies, in the simplest sense, enable one or more devices to
communicate with each other without physical connections - without
cabling. They use radio frequency transmissions as the means of
transmitting data. Wireless communications range from complex systems,
such as Wireless Local Area Networks (WLAN) and cell phones, to simple
devices such as wireless headphones, microphones and other devices that
do not process or store information. These devices include infra-red (IR)
devices such as remote controls, some cordless computer keyboards and
mouse, and wireless hi-fi stereo headsets, all of which require a direct line of
sight between the transmitter and the receiver to close the link.
Networks •;•
Many businesses, organisations, universities and schools have networked
computers. A network is a group of two or more computers linked together
so that they can share resources (hardware, software and data) and can
communicate with one another. Each computer network falls into one of the
following groups:
• Local area networks (LANs)
• Wide area networks (WANs)
• The Internet
• Intranets
• Extranets
A LAN's ability to share information and communicate with the devices and
computers on the network has many benefits for its users:
• Hardware such as printers can be shared.
Storage facilities can be shared.
• • Software and data files can be shared by many users.
82 ^•
•
It is usually cheaper to buy one copy of a software application and pay
the licence fee for several machines, than to buy individual packages for
each computer.
• Users can work together on a single document.
• Users can communicate using e-mail.
LANs can be divided into two categories based on how the computers
communicate with one another: client/server networks and peer-to-peer
networks.
1 A client/server networl+: is one in which any computer on the network
can be designated as the server, although most such networks will have a
specially designed computer that operates as a dedicated server and
has a faster processor, more RAM and a lot more storage space. A large
LAN may have several servers to perform different tasks. For instance, a
file server may look after the organisation of the files on the network,
while a print server co-ordinates printing on the network and looks after
the sending and receiving of faxes and e-mail. The server or servers
contain the software that manages:
• A shared hard disk
• Requests from users
• The protection of data
• The security of the system.
2 A peer-to-peer network allows every computer to communicate with
every other computer in the network. No computer is designated as a
server. Instead, each computer can be considered as both a client and a
server. This is because a user can access data from any computer on the
network and vice versa. Peer-to-peer networks are limited to about ten
machines, after which the performance drops and the system becomes
cumbersome. They are used mainly in small businesses and
departments.
Cabled LAN
In a cabled LAN, all the computers and other peripheral devices on the
network are attached to transmission cables. These cables fall into three
types:
Twisted pair: This is a convenient and cheap method of connecting •
computers and peripherals in a network. It is normally used for home
networking or on small sites where the distances between devices are 83.0
small and there is no great need for speed. 0
• Coaxial cable: Coaxial cable is more expensive than twisted pair
because its transmission capabilities are higher; it is used to transmit
voice, video and data. It is ideal for a medium-sized network.
• Fibre optic: Fibre optic cables are relatively expensive. They enable
large volumes of digital data to be transmitted extremely fast and
virtually error-free. A single strand of a fibre optic cable is a hair-thin
piece of glass tubing. The inside of the tube acts as a mirror, allowing
pulses of light to travel along it which carry data. A cable consists of
thousands of these hair-thin strands.
LAN topologies
How computers on a network are connected together determines its
topology (or configuration). The most common topologies for a LAN are
star, line or bus, and ri ng.
=fly. PC
Star topology
All the computers on the network are connected to one
another through a central hub as shown in Figure 7.2. A hub
is a hardware device to which a number of computers can be
connected. Data is transmitted from one computer to the
next by packets. A packet containing the addresses of the
=J^ sender and receiver is first sent to the central hub, which
then sends the packet to the designated computer.
Central
server Advantages of a star topology
• Adding new devices to the network is easy.
• If a computer stops working, the network is not affected.
• If one piece of cable is damaged, only one computer is
affected.
Disadvantages
PC * It requires more cabling.
• If the central computer or server malfunctions, the entire
network will fail.
• Only one computer on the network can send data at any
Figure 7.2 particular time.
A star network
Ring topology
PC
Here the cable is connected to all the computers on
the network. The ends of the cable are then
connected together to form a loop or ring as shown in
Figure 4. Data is passed from one computer to the
next by means of a token (electronic signal), which is
N
passed around the ring, giving each computer an
opportunity to send data. A computer can send data E=li ,w
In 1999 the it-Mbps 802.1lb became the standard for access points on which ' Mbps' is short for 'mega bits per
products like the Cisco Aironet 350 series, Ericsson LAN 11 Mbps, and many second', a megabit being just
others, are based. over a million bits.
A wireless LAN has the same features that are available in a wired LAN. It
also provides more flexibility in acquiring information, as we have just seen.
Less wiring also means greater flexibility, increased efficiency and reduced
wiring costs. But, there are disadvantages. Besides the relatively slow speed
at which a wireless LAN operates, there is also the problem of interference
from other users or devices using the same 2.4 GHz band and the risk of
illegal access to information. Interference can corrupt data and is therefore a
major concern when installing a wireless LAN. Illegal access is also a big
problem, since anyone with a compatible NIC can have access to the
network. The need for encryption is therefore of the utmost importance.
Bluetooth
The other emerging technology used to set up a WLAN is Bluetooth
technology. Bluetooth is a standard developed by a group of electronics
manufacturers that allows any sort of electronic equipment (computers,
digital video cameras, cell phones, PDAs, keyboards, etc.) to automatically
make their own connections without wires, cables or any direct action from
a user. The manufacturers program a Bluetooth radio transmitter into each
unit with an address that falls into a range of standard addresses established
for a particular type of device. When a device is turned on, it sends radio
signals asking for a response from any unit with an address within a
particular range. For example, if a computer and a printer are turned on and
their addresses are within the established range, they will respond to each
other and a tiny network (piconet) is formed. Once the networks are
established, the systems begin communicating amongst themselves. Note
that this is different from a standard LAN: Bluetooth networks are formed,
broken up and reformed all the time, simply by switching on Bluetooth-
enabled devices when they are in close proximity to each other.
These 'ad hoc' networks, as they are called, allow data synchronisation with
network systems and sharing of applications between devices. Bluetooth
functionality also eliminates cables from scanners and other peripheral
devices. Handheld devices such as personal digital assistants (FDA) and cell
phones allow remote users to update personal databases, and provide them
with access to network services such as wireless e-mail and Internet access.
The Bluetooth method of wireless networking is already being used by
many companies with great success. However, like any network, there are
inherent risks. Some of these risks are similar to those of wired networks;
some are the same as for other types of WLAN.
Telephone line
Figure 7.6
Transmission of data An internal modem performs the same function and is now a standard
over a telephone line feature in most PCs. It is an interface card that fits into an expansion slot in
the computer's motherboard. The modem has an external outlet for a
telephone jack to be plugged into. Besides converting data signals, modern
modems can also perform:
• Automatic dialling - a modem can dial a phone number.
• Automatic answering of remote computers - a modem can answer an
incoming call.
Cable modems
A cable modem is a modem that connects a cable-TV line to a PC. In some
countries, such as the USA, TV cable companies install a single cable to
provide both cable TV and Internet services to customers. A special cable
box is needed to split the signal for the television and the PC. These cables
are two-way, an improvement over the one-way cables used solely for cable
TV. The new two-way cable enables the cable company to use a 6 MHz
channel slot within the cable signal to deliver Internet service. The
S download speeds are phenomenal, reaching a maximum of 5 Mbps, with
90 0 slower upload speeds of a little less than 1 Mbps. The actual transfer rate
••
II
depends on the number of people in the area accessing the service at the
same time. Data transfer rates drop drastically when the number of users
increases. This type of connection provides continuous Internet service. It
is not widely used.
Internet connections/links
Tb get connected to the Internet with your modem, ISDN, cable or ADSL
you need a connection between your computer and a host computer. The
computers communicate with each other through these connections using
protocols, which are like a recognised language for talking to each other.
Some of the basic types of connections are:
• SLIP/PPP: Serial Line Internet Protocol/Point-to-Point Protocol. These
are also referred to as a dial-in direct connection. It is the most common
method used by individual users to access the Internet. You dial up an
Internet service provider which gives you access to the Internet. A
SLIP/PPP link enables you to import and export files directly between
your computer and another.
• Dedicated connection: This means that you have a permanent
connection and are part of the Internet at all times.
• Remote network access: Two-way satellite access is one of the most
recent methods of providing remote access to the Internet. For this, you
must have a satellite dish. You send data requests at speeds that vary
from 300 kbps to 900 kbps, depending on the number of users on the
system. These requests are transmitted to a satellite that reflects the
signals to a satellite dish located at the satellite network operations
centre. After the requests are processed, they are returned along the
same route. The returned signals picked up by your dish are sent along a
cable to a transceiver and then to your PC.
TCP/IP
All forms of communication, either electronic or other means, are based on
some form of protocol. Computers connected to the Internet use a protocol
called TCP/IP. This is a set of protocols used to transfer data from one
computer to another over the Internet. A protocol is a set of rules that
defines how computers interact or communicate with each other. TCP/IP is
a non-proprietary protocol suite (it is not designed for any specific type of
computer) that enables hardware and operating systems software from
different computers to communicate. For example, an IBM (PC) compatible ^.
computer can communicate with an Apple or other computer. 91
••
•
TCP/IP is actually two protocols: the TCP portion divides the data that is to
be transmitted into smaller pieces called packets. This allows data to travel
more easily, and therefore quickly, along phone lines. Each packet is
numbered so that the data can be reassembled when it arrives at the
destination computer. The IP protocol sends each packet by specifying the
address of both the sending and the receiving computers.
Each packet may take a different route depending on the amount of network
traffic or on the location of the destination computer. The packets are sent
along by routers. A router can be a specialised computer or a piece of
electronic hardware designed specifically for routing. It chooses the best
route to send data to its destination. Data arriving at the destination
computer is reassembled. If a packet does not arrive or is corrupted, the
entire file does not have to be re-sent - just the packet that was lost or
corrupted.
Browser
In order to navigate the World Wide Web (www), you need a web browser. A
web browser is a program that resides in your computer and enables you to
find, retrieve, view and send hypertext and h y permedia documents over
the web. Popular browsers include Microsoft Internet Explorer, Netscape
Navigator and Mozilla Firefox.
All web browsers operate in a very similar manner and have similar
features. If you are using Microsoft Internet Explorer, the following are
some of the things you can do or can control with associated software
accessible through its 'toolbar':
• View hundreds of millions of web pages from all over the world.
• Send and receive e-mail: Outlook Express enables you to create and
exchange e-mail globally.
• Participate in 'conferences': e.g. NetMeeting conferencing software in
conjunction with a sound card, speakers and a microphone enables you
to talk to and listen to other users in real time.
• Chat: the Chat program gives you the opportunity to join discussion
groups and converse online.
• Develop web pages: you can build your own web pages by using the
ActiveX controls software.
• View channels: a channel is a web site that automatically transmits
information to your computer at the time you specify.
• Shop online: for books, CDs, clothes ... almost anything.
• See and hear recorded broadcasts: you can see and hear information as it
is downloading; you do not have to wait until all of it has arrived.
• 'ib allow users to refer to hosts by names, the Domain Name System
(DNS) was developed. This divides the Internet into a series of domains.
92 5
•
It uses a hierarchical naming system or tree structure to represent a host. A
domain is divided into second-level domains, which further subdivide into
third-level domains and so on. A host is therefore named for the largest
domain to which it belongs, then for any sub-domains within the largest
domain, and then finally for the unique host name. The DNS system allows
an Internet host to find another Internet host, by translating the host name
to the IP address of the computer.
At the top level there are domains corresponding to educational institutions
(edu), commercial entities (com), public organisations (org), governmental
bodies (gov) and the military (mil). Individual organisations each get their
name at the second level of the naming hierarchy. For example, Microsoft
has 'Microsoft.com' and the Association of Curriculum Developers has
ASCD.org'. Departments within an organisation will be at the third level of
the hierarchy, for example, 'shop.ASCD.org'. Sometimes a fourth level,
which includes the unique host name, is included. For example, if your
domain is'fun.com' which points to your web site, you can create
'holiday.fun.com', which points to the holiday section of your web site. You
may also have a 'Caribbean.holiday.fun.com' which now gives the name of
the computer in the holiday section of the web site. The complete name of a
host therefore includes: the unique host name, all sub-organisation units,
the organisational name and the top level domain. Table 1 shows a list of the
current top-level domains in the United States.
.com Commercial
These services enable you to locate and use electronic Iles stored on
computers across the Internet.
The files in an FTP site are stored in directories. Each file has a name and an
extension, the name labelling the contents of the file and the extension
indicating the type of file - text, sound, program, image, video, etc.
Communication services
Electronic mail (e-mail)
E-mail is the most popular and widely used service on the Internet today. It
If you want to find out more enables users locally and world wide to send electronic messages (text,
about this topic you could sound, video and graphics) to one individual or to a group of individuals, and
look up the related to receive messages from others. A powerful feature of e-mails is the option
animations and activities to send attachments. For example, a document created in Microsoft Word
on your companion can be attached to an e-mail message and received by the recipient with an
CD-ROM. e-mail program.
E-mail is much faster than mail delivered by the traditional postal system.
An e-mail can be sent to an e-mail subscriber in any part of the world in a
matter of seconds or minutes (depending on the 'traffic' on the Internet).
Also, a subscriber can access his/her e-mail from any part of the world as
long as Internet access is available. Apart from the fee that a subscriber has
to pay to an ISP for Internet access, sending e-mail is free. You can send as
many e-mails as you like at no additional charge and at your own
convenience, any time of the day or night. This does not cause any
problems for the person receiving it, who does not have to be present to
receive the e-mail. They collect the e-mail (e.g. from their ISP) at a time
convenient to them.
E-mail addresses
• 'lb be able to send and/or receive e-mail, each user must have an e-mail
94 •• address and an e-mail program such as Outlook Express. The address is
•
unique to the user and consists of two parts separated by the @ ('at') symbol.
The first part is the user name, which can be a real name, a shortened form
of a real name or some made-up name. The second part is the domain name
- the location of the e-mail account on the Internet, e.g. with your ISP. The
general form of an e-mail address is as follows:
Username@Domainname
For example, an individual in Trinidad and Ibbago who has an Internet
account with the Telecommunications Service of T inidad and Tbbago
(TSTT) may have an e-mail address like this:
[email protected] or [email protected]
Internet users can also use the free e-mail services offered by web sites such
as Yahoo!, MSN and Excite. You simply fill out an online form to open an
account and get an e-mail address. You access e-mail directly through the
web site, rather than through an e-mail program resident on your computer.
Examples of these addresses are:
operates like the traditional post office. The mail server Cc: a9.com
receives incoming messages and delivers outgoing 56ject: LOrt ON ro Ir FCR C%C
access.
• Mail client: This is a program that enables you to read
and compose e-mail messages, send e-mail and access
e-mail from the server. If you are using Microsoft Office
software, you may use the popular Outlook Express
program as your mail client.
Figure 7.7 shows the Microsoft Outlook Express e-mail Figure 7.7
screen for creating a new message; the format for other An e -mail message
e-mail software is quite similar.
Components of an e-mail
lb send an e-mail, in the 'Tb: field fill in the e-mail address of the person to
whom you want to send it. If you want to carbon-copy the e-mail (send the
same e-mail for information to a number of other users), fill in the other
addresses in the 'Cc' field. Tb give the receiver an idea of the contents of an
e-mail before opening it, type a descriptive phrase in the 'Subject' field. Now
move to the blank area and type the message.
You can also send attachments along with the original e-mail. An
attachment can be a word processing file, a spreadsheet file, a database file
or any other file that your computer can access. When a file is attached, a
new field showing the name and size of the file is displayed below the
'Subject' field.
•
95 ^•
•
Electronic discussion forums
Electronic discussion forums such as mailing lists, newsgroups, chats and
bulletin boards are another very popular feature of the Internet.
Mailing lists
An electronic mailing list is a group of people using e-mail to communicate
their views on common issues or interests. You subscribe to become part of
the group. Not all groups are open to everyone. Some might only allow
professionals in a certain field. For example, a group discussing early
childhood education may only want to include researchers in that field. A
mailing list may therefore involve only a few people or thousands of people.
When you become a member of a group, you can send messages with your
comments or views on some matter that is being discussed or to which you
want an answer. A copy of your message is then sent to all subscribers on
the mailing list. You can also simply read the contents of messages and not
make a contribution. Some mailing lists only let subscribers receive
messages but not send them. For example, there is a mailing list that sends a
joke a day to its members, but the members cannot reply.
Newsgroups
D14 you kn ° -nv? A newsgroup enables a group of people with common interests to
Did you know that posting communicate with each other. There are thousands of newsgroups on the
messages to newsgroups Internet, dealing with almost every imaginable topic. A subscriber to a
is very easy using newsgroup posts a message, which can vary from a few lines to whole
Outlook Express and articles. The other subscribers read the message and may or may not choose
other similar e-mail clients? to reply.
To set up a newsgroup account,
The main difference between newsgroups and mailing lists is the method of
click on 'Set up a newsgroups
communication. Mailing lists use e-mail to communicate with subscribers.
account...', displayed in the main
Messages are sent to a subscriber's e-mail address. Newsgroups post
Outlook Express window under
messages on the Internet for all the users to access. For you to be able to
the heading 'Newsgroups'. The
read and post messages to newsgroups, your computer must have
Internet connection wizard will
newsreader software. For example, Microsoft's Outlook Express has a built-
take you through the necessary
in newsreader.
steps. After setting up your
account, answer these
Bulletin board system
questions: How many
newsgroups did you find? What A bulletin board system (BBS) is an Internet facility much like a newsgroup.
topics were covered? It is dedicated to the exchange of messages. Most bulletin boards serve
specific interest groups and are often free, although some may charge a
membership or user fee. Everyone with access to the bulletin board can post
and view messages on the topics covered by the board.
Chats
Chatting on the Internet has become a favourite pastime for many users. A
user can enter any one of the thousands of chat rooms that are present on
the net. A chat room is a group of people with common interests
communicating with one another interactively, in real time. There are chat
rooms for specific topics, but many chat rooms discuss a range of subjects.
For example, a chat room for unemployed Internet users at home might
discuss things like their children's education or possible opportunities for
work. Some of the different ways of chatting include:
• Text-based chat: This is the oldest and most common method of
chatting. You enter a chat room and look at the comments posted about a
96 % topic. Everyone currently in the room is notified that a new person has
entered the discussion. You are identified by a name, but many users
prefer to use a handle or sobriquet (a name that they want to
characterise their personality). You can see the comments made by other
participants and can type out a reply on any of the comments to
everyone connected, or, if you wish, only to selected people in the group.
You may wish to start a topic of your own. Users can enter and leave a
chat room as they wish. One popular chat program is ICQ.
• Internet Relay Chat (IRC): This is a real-time conference system that
lets you talk with as many people as you like, grouped together on
channels by topics, using text messages. Once you have accessed IRC,
you can find out what topics are being discussed and how many users are
involved. You can then search for a channel that suits your interest.
IRC can be considered as a variety of text-based chat where each chat
room (channel) is dedicated to a specific topic, and where users are not
allowed to discuss topics unrelated to the channel's purpose.
• Instant messaging: This is a variation of IRC. With instant messaging, a
user on the web can contact another user currently logged on and type a
conversation. Chatting is therefore usually 'one-to-one'. Instant
messaging is available from ICQ MSN and Yahoo!; a very popular
program to this end is MSN Messenger. The service is free as long as you
have Internet service. You simply need to fill out an electronic form with
some basic information and you can get started.
• Multimedia chat: Multimedia has created a new form in which users
can communicate. With multimedia software, you can use the
microphone in a computer to talk to another user anywhere in the world,
as if you are on the phone. If you each have a small video camera
(webcam) connected to your computer, you will also be able to see each
other. However, in most countries at present the quality of video output
is not very good, due to bandwidth issues, and users may have to wait
many seconds for each video clip. For live video communication to
function properly, the bandwidth of the present transmission channels
will have to be increased.
- Pee is & tea I-S tlN
(PPP)
Point-to-point p rotocol (PPP)
Figure 7.8
enables users to dial into a local Internet service provider to connect
The sms message box
securely to their corporate network through the Internet. This is
particularly useful for people who work from home or people who travel
and need to access their corporate networks remotely, for example, to check
e-mail. 97••
•
Broadcasting
Broadcasting refers to the distribution of information, programming or
advertising content to everyone on a network. The sending of junk mail
randomly to as many people as possible on the Internet is therefore an
example of broadcasting.
Narrowcasting
This is the opposite of broadcasting. It refers to the targeted distribution of
information, programming or advertising content to specific individuals or
venues. Narrowcasting ensures that its content is timely and relevant to its
intended audience. It can therefore be used to select specific target groups
and market products to them.
wM,an..m,.v as ^. .m..aL.,M
linked to organised collections of web
pages.
• Entering an Internet address or URL I
06 xurnoan. seaeon
20
a 1.q b.,mo r
aeM
ls, n
Aym ro h
.11 b as ale
ae
r
aln ha
a - a 1 eI
gene Ir n --
a
a
Rn wn
. e, . la l
- ea+ i [
s _p
nn
.e apl a n t n anaa ^^N'
sWM aryl. Ides a pe ban ng.Nat,gh n matoelb LMaeie
and retrieving a page directly. • -
• ^o
d
de, Z Nd em JNeby cane, as re mamberee 1,05A m .,mo
N,snaw a v, by M awM -endln eon g .in g ll,1Wu3
v W: u ai,
r ys:
he,e d^p; jy i dh Malrm
men g - hundeh e,uptologenda q e
• Humaan. IC. v us. EM+ and b l am n eel. heady legend s . but umimely deMne made them lmmunal. $o lilt, beg,
• Entering a key word or a search IM queer tlbe
Mw as nl%y
ns Dee,, Wets also Inda, M Ife age 00 74. uvula he be as much side icon to xollynooe as -j
PWOWIw. M4
Sports, A rt s and Humanities and many SEARCH
m
flatten ueWeb O l MOO eawy 1 0lniecamgory
P...(Oa.ea fill)
pe , nn cmmon nom a
Duo
• IC* d. (® • )1221£('® ) C % NA nvAAINb
Yahoo! a popular search engine. Figure Bma£am )a P e ekek,00
n dsLPfUe dRomm,vl651•ea. It, Rut bw ,,
padS a.0 • P e Inle, arlananecaNeen (151) ies , at -m
7.10 shows the results when the • Decided Dim i,e (FI • Roua nh ansm oevenu . (I D@ " vwx cencem
oitliun - M seen and mm^ubue pan
category 'computers is selected, and . Em env y s+a amen+ n Patl
enrro.^na com
o:e Rosa
Finding information
a PIe _. e0000 n ,
* * Q
using a Uniform gDr a
©^ e^ i9 A &, ° ^ str •! ®- $ a - LJ • 4
la t ---------... --_ _J
sandd xm:n..,.m.rerc_ a.e.es..:.Jc .:•,.ae.+_.:a _ ar.nwronseAnn_I.. _ % ®m ° --
Resource Locator (URL) e,-la.I) time. gel Me p,o..
wrv. cwaa cem
• OSLSertmee DSL Prodders - Swedes ielmm&iun and lads an OSL+ervnce and makes, key queninn+ to ask DSL
You can also find information by typing • !
.
i g Nh ,n,sn uAbe3ng
inn, 1191+,10 SOMpneelvi6 and 1111eut b ne Is com
$oeakeasr BUS:nes+
p Ue ,nev
No
.
010 ,
o phone ed nquirea
. npn+L,
in a web site's direct address or . QS^prr^ + ompum
sons.. prowls, cnmpn:.a
y 11,01210
Mn pl.rar+co,anng l.l.[omnrumm^gno,+. .gaWm. compNme. nMV.vNine and OSQE.ae.
rin
.ea.aaa. na.
DR-sneeenm -paY weed l fl, and raeaxaMart. line un mcnaainq ep..a, and made
Uniform Resource Locator (URL) . p -omrs DSL vdam:aim h,cnn+ume2 and prdheeientl+. 9,a,,ed DR thin
into the 'Address' field, located at the • Q$Lld¢- IM cmwnnMo gd, IA AOSL, and dD3lechnomgie.. lam+'*. nnexavwl:v
• rwuthoo xmr DSL dendi comm me tecMnio Ay..qupipmem..ne einenm ryp.e at ee l..ev.ESlnL;ru:
9
top of the browser window, just below •
^'
\NO i _ An$L ^ Mose a k mvn+vga MvNe ApSL, vnM1Vbae on l Spa in Ihe UK
s .....
as e.
n,
^ Zwe4n0.cW..
Finding information
Pease select. caegory below or c4Y oa ane Nthe feavea cna. using key words or
^Ihd—. IVeddm¢..^.mi•:rsu.. Join,
U(- - H40001; Jokes, Pious Rrmres. 0
V eud F.,,,. said Mmd Touts
...
ih.ot You. Crxdo.do, Good Lurk.
Pnru,u,¢.menc Sm ,th...h.
phrases
Hi H.pa, Thmlva ofl'o¢
Loin, R. e.. ddfvim.lsaC* You can also find information by typing
Email l.le. CaY DIe. Good Mer®a.
J.r H..o.: COlt
into a search-field one or more keywords or
phrases that indicate the topic you would
like to search for. The easiest way to start is
Figure 7.12 by clicking the Search button on your browser toolbar. What happens after
Finding a web page with a known that will depend on which search engine is set as the default one for your
address — www.funnies.com browser to use. Typically, your browser window will split to include a new
pane that enables you to type your search terms into a particular search
engine. Of course, there are many search engines available, and you can use
as many as you like until you find a site that you want to visit.
Google ^^^map
Web
Map of Jamaica, NY
Jamaica Map
w
Goods Maps- Yahoo! Maps -Ma
f
® ® ©HP.IIm'm.pafy a.g >rdlldeth lm'ae
Tour Jamaica on the map. Mup aid rmrbmme daennklbn arid eaplom the
rlpv
B.ani
m
^—I
Coo 111 .
Webcasts
The delivery of live or delayed sound or video broadcasts over the world
wide web is called webcasting. The sound or video is captured by
conventional video or audio systems. It is then digitised and 'streamed' on a
web server. Live webcasting is commonly used to transmit radio. For
example, if you are a student from St Lucia studying a long way from home
in the United States, it might still be possible for you to listen live to your
favourite radio station in Castries, using your computer's speakers and
Internet connection. With delayed webcasting, individual web users can
usually connect to the server via a web site to view/listen to the webcast at a
time of their choosing. In both cases, the transmission is one-way, without
any interaction between the presenter and the audience.
Web mars
The term webinar is short for web-based seminar and refers to conducting
a seminar or lecture via the World Wide Web, using graphics (often slides),
text, even live voice. Unlike webcasting, the audience is able to interact with
the presenter, for example by 'asking' questions by sending an instant
message. This interactive element allows the presenter and the audience to
give, receive and discuss information. •
101 IS•
•
Intranets
An intranet can be considered as a micro-version of the Internet within a
company or organisation. It offers the same features as the global Internet,
but in a localised environment such as a factory site or an office. Many
companies handle large volumes of information such as:
• Training manuals
• Company reports
• Job openings and descriptions
• Newsletters.
Authorised users within a company can use the company's intranet to find
information easily and quickly. The documents in an intranet contain tags
that provide links to other documents found in the company's network (or
n outside on the wider Internet). This is handled using the same browsers,
other software and TCP/IP as used for the Internet.
•
Extranet
If a company has an intranet and allows limited access to it by people
outside the company, the intranet is referred to as an extranet. A company
may set up an extranet, for example, to provide technical support
information to its customers based on products it sells or services it
provides.
102 ^0
12 The four main types of service available on the
Summary Internet are:
1 'Data communication' refers to the transmission of
data from one location to another for direct use or
• Communication services, including e-mail and
electronic discussion forums (mailing lists,
7
for further processing. newsgroups, chat rooms and bulletin boards)
2 The data communication channels used to carry • File Transfer Protocol (FTP) services which
data can be classified into narrow-band, voice- enable you to locate and use electronic files
band and broadband, depending on the volume of stored on computers across the Internet
data that can be transmitted. • Tbrminal emulation services such as Tdlnet
The transmission lines that carry the data are which enable you to use your computer to
classified according to the direction of data flow: connect to a remote host, as if your computer
simplex, half-duplex or full-duplex. were a terminal of the host computer
• The World Wide Web (WWW).
A local area network (LAN) is a collection of
13 A bulletin board system (BBS) is an Internet
microcomputers connected within a small
facility dedicated to the exchange of messages.
geographical area so that they can share
14 Broadcasting refers to the distribution of
information and peripherals, and also
information, programming or advertising content
communicate with each other.
to everyone on a network.
LANs can be divided into two categories: 15 Narrowcasting refers to the targeted distribution of
client/server networks and peer-to-peer networks. information, programming or advertising content
The connection in a LAN can be through cables or to specific individuals or venues.
wireless. Some typical configuration topologies of 16 Point-to-point protocol (PPP) enables systems to
LANs are bus, star and ring. dial into a local Internet service provider to
A wide area network (WAN) can connect connect securely to their corporate network
computers and peripherals across a large through the Internet.
geographical area such as a city, a state or 17 Webcast is the delivery of live or delayed sound or
countries. Information is transmitted using special video broadcasts conducted over the World Wide
high-speed telephone lines, microwave links, Web.
satellite links or a combination of all three. 18 Webinar is the conducting of a seminar or lecture
via the World Wide Web.
The Internet is a network of networks that
connects computers across the globe. Tb connect 19 The World Wide Web consists of hypertext and
hypermedia documents. A hypertext document
to the Internet you need a personal computer or
workstation, a modem, a communications link enables you to use hyperlinks to move from one
document in a computer to another related
such as a telephone line, cable or satellite, and
document, either in the same computer or in
access to an Internet service provider (ISP).
another computer elsewhere.
9 A standard phone modem is a hardware device
20 HyperText'Iansfer Protocol (HTTP) is a set of
that converts analogue signals to digital signals
rules governing how data travels between server
and vice versa. Other types of modems that do not
and client computers on the Internet.
convert analogue to digital signals are ISDN 21 A web site consists of web pages built using
modems and ADSL modems. specialised programming languages such as
10 An ISP is a company that has a direct connection HyperText Markup Language (HTML). Each web
to the Internet and gives users access to it, usually page has a unique address called its Uniform
for a fee. Resource Locator CURL).
11 lb transfer data from one computer to the next, 22 lb find, retrieve, view and send hypertext and
computers must follow a set of rules called hypermedia documents over the web, you need a
protocols. The protocol used over the Internet is browser. Browsers also give you access to search
TCP/IP ' ansfer Control Protocol/Internet engines such as Yahoo!, Google and MSN, enabling
Protocol), which allows operating systems you to find information quickly by typing in
software from different computers to keywords, a phrase or a web site address.
communicate. Each computer on the Internet has 23 An intranet provides many of the features of the
a unique address called the IP address. Internet within a company or organisation.
24 An extranet is similar to an intranet except that it
allows limited access to individuals outside the
•
103 %
•
•
104 .•
•
The following statement is true about the Short answer questions
Internet:
1 Many individuals and organisations are connected
(a) Viruses can be easily downloaded to the Internet.
(b) It contains a lot of inaccurate information (a) What is the Internet?
(c) There are many sites that promote (b) List the hardware requirements needed to
pornography and religious and racial connect to the Internet.
propaganda
2 Explain the term 'Internet Service Provider'.
(d) All of the above
3 List and explain THREE types of communication
4 TCP/IP is a protocol suite that was designed to be links that maybe used to get an Internet
used with: connection.
(a) Apple computers 4 What is an IP address and why is it necessary?
(b) All computers 5 Define the terms:
(c) IBM-compatible computers (i.e. PCs) (a) Protocol
(d) None of the above (b) TCP/IP
The following is not a browser: (c) Router
(a) Google 6 List the four main types of'services available on
(b) Microsoft Internet Explorer the Internet.
(c) Netscape Navigator 7 List the different types of modems and explain
(d) Mozilla Firefox how they differ.
6 You can do the following with browsers: 8 Many people now use e-mail for sending letters.
(a) View hundreds of millions of web pages all (a) What is e-mail?
over the world (b) List THREE advantage' and TWO
(b) Send and receive e-mail disadvantages of e-mail over normal mail.
(c) Participate in on-line conferences (c) Why does a user need to have a password to
(d) All of the above access and send e-mail?
7 The IP address of a computer on the Internet (d) Give TWO advantages of using e-mail as
consists of: opposed to using a phone.
(a) 4 bits 9 Define the following:
(b) 8 bits (a) Mail server
(c) 16 bits (b) Mail client
10 What is the difference between a mailing list and a
(d) 32 bits
newsgroup?
8 'Ib upload a file means to:
11 List and explain THREE different methods of
(a) Move your file from your diskette to the hard chatting.
1 drive
12 Explain the following:
(b) Copy information from a web site to your hard
drive (a) FTP
(c) Send files from your computer to other (b) Thrminal emulation services
computers on the Internet 13 What is the difference between the Internet and
(d) None of the above the World Wide Web?
14 Explain the following:
9 Which of the following would you use to create
web pages? (a) Hypertext
(a) HTML (b) Hypermedia
(b) FTP (c) Hyperlink
(c) HTTP (d) HTTP
(d) TCP/IP (e) HTML
•
105 S0
•
15 (a) What is a search engine? Crossword
(b) Give the names of THREE popular search
engines.
(c) Explain how information can be found using a
search engine of your choice.
16 (a) What is a browser?
(b) Give the names of TWO browsers.
(c) List the main features of a browser.
17 Give TWO examples of how a browser may be
used for:
(a) Business purposes
(b) Personal use
18 Explain the difference between uploading and
downloading.
19 With the aid of examples, explain what URLs are.
20 How does an intranet differ from the Internet?
21 What are some of the benefits that can be gained
by a company that has set up an intranet?
22 Explain the term extranet.
23 Using an example, briefly explain how the Domain
Name System operates. Across
1 An area of storage allocated to you by a mailserver
(7)
3 A set of rules that defines how computers interact
or communicate with each other (8)
6 This topology connects the computers on the
network through a central hub (4)
7 It runs the networking software that allow
resources to be shared with other computers on
the network (6)
8 The term used to describe the copying of a file
from one computer on the Internet to a storage
device on your computer (8)
Down
2 Used to navigate the WWW (7)
4 A device or computer designed specifically for
sending packets of data to their correct destination
(6)
5 An interface that enables communication between
two different networks (7)
e are faced with problems every day, from the time we get out of
bed in the morning until the time we fall asleep at night. A problem
is any task that requires a solution. The problem may be simple or
complex. In order to come up with a solution we must:
1 Have a clear understanding of the problem.
2 Determine what we need to help solve the problem.
3 Decide what results we want to achieve.
4 Consider different ways to achieve our result and select the best one.
Figure 8.1
•
107 •
•
Generations of
computer languages
Computer languages can be classified according to whether they are low
level or high level.
High level languages are independent of the machine. They are not
specifically designed for any one brand of computer.
Many computer languages have been developed and evolved over the years.
They can be classified according to the following generations.
Characteristics of 1GL
• Fastest to execute because it is already in the language that
the computer can understand
• Difficult to decipher (requires the aid of a reference manual
to decipher the meaning of each code)
• Easy to make mistakes in the sequence of 1 s and Os; replacing a 1 for
a 0 can result in the wrong command/instruction being executed
• Time consuming/tedious to w ri te
• Machine dependent
• Programming becomes more difficult as the complexity of the
program increases
Characteristics of 3GL
• It uses English words and symbols, and is therefore even
easier to write
• It is machine independent Table 1
Some examples of third
generation languages
Language Example
•
109 %
•
COBOL - COmmon IDENTIFICATION DIVISION.
Business Oriented PROGRAM-ID. SUM OF TWO NUMBERS.
3 Language
DATA DIVISION.
systems, used to manipulate large WORKING-STORAGE SECTION.
databases,files and business applications. 01 Numl PIC 99 VALUE ZEROS.
Can be a tedious language to w ri te. 01 Num2 PIC 99 VALUE ZEROS.
01 Sum PIC 999 VALUE ZEROS.
PROCEDURE DIVISION.
DISPLAY "Enter First Number:" WITH NO
ADVANCING
ACCEPT Numl
DISPLAY "Enter Second Number:" WITH NO
ADVANCING
ACCEPT Num2
ADD Numl, Num2 GIVING Sum
DISPLAY "Sum l's = ", Sum
END-PERFORM.
STOP RUN.
Example 1
What are the input and storage instuctions here?
1 Read the price of an item and calculate the discount of 10%.
2 Enter the name and year of birth of a person and calculate the person's age.
3 Input the length of a side of a square tile and find the area.
Let's analyse these instructions to determine the inputs and what we need
to store.
1 read and store the price of an item
2 enter the name and year of birth of a person
3 input the length of the side of a square tile
Processing instructions
These instructions manipulate the input data. They involve calculations,
that is, mathematical operations (e.g. addition, subtraction, multiplication
and division), repeating instructions, selecting instructions and comparison
instructions. They also include commands and constructs.
A command is a word that instructs
the computer what must be done to
accomplish a specific task. Commands I F a < 10 THEN
are specific to a particular READ Nun
Example 2
What are the processing instructions here?
1 Read the price of an item and calculate the new price after a 10% discount.
2 Enter a temperature in degrees Celsius and convert it to degrees Fahrenheit.
3 Input the name and year of birth and compute and print the age of a person.
Let's arrlyse these instructions to determine what we need to process.
calculate the new price after a 10% discount
2 convert it to degrees Fahrenheit
3 compute the age of a person
Output instructions.
These instructions allow information to be displayed on the screen. Problem
statements that include key words like 'print', 'output', 'display', 'return' and
' write' indicate what data should be output to the screen.
Example 3
What are the output statements here?
I Enter the name and year of birth of a person and compute and display the
age of the person.
2 Write an algorithm to print a conversion table of degrees Celsius to degrees
Fahrenheit, 10 °C to 20 °C inclusive.
Let's analyse these instructions to determine what we need to output.
1 display the age of the person
2 print a conversion table
Let's analyse a few problems.
Example 4
Write a program to enter the base and height of a triangle and find and print
the area.
Example 5
Write a program to read the temperature in degrees Celsius (°C) and convert
it to degrees Fahrenheit (F) where F = 32 + (9C/5). Output the temperature
in degrees Celsius and Fahrenheit.
C Calculate Fahrenheit C
F = 32+(9C/5) F •
113 ^•
•
•
Variables
In the memory of a computer are storage cells (or bytes), each of which has
a unique address. Data occupy these storage locations rather like the way
• people occupy houses. A person living in a particular house can be located
by their surname or house number; similarly, memory locations are given
names that allow the computer to locate the relevant data easily. It is easier
to refer to the data by name.
During the execution of the program, instructions may cause the contents in
these memory locations to change or vary, hence the term variable.
Variable names should always be meaningful: they should convey the
meaning of what is being stored.
Writing instructions
Data input and storage instructions
These instructions accept data that is entered into the computer and store
the value in the location with the given variable names.
Prompting instructions
Prompting statements are used along with input statements to request or
notify the user to enter data into the computer. These statements are usually
displayed on the screen. Prompting instructions usually precede input
instructions.
Commands used to prompt the user are PRINT or WRITE.
Example 9
(a) Let's look at the question from Example 4:
Wri te a program to enter the base and height of a triangle and find and print the
area.
The inputs were base and height.
116 ^•
•
(b) Look at the question from Example 5:
Write a program to read the temperature in degrees
Celsius (°C) and convert it to degrees Fahrenheit (F) PRINT "Enter temperature in Celsius (C)" •
where F = 32 + (9C/5). Output the temperature in READ C
degrees Celsius and Fahrenheit.
(c)Look at the question from Example 6:
Write a program to read the answer to the sum 10
PRINT "Enter the answer for the problem 10 * 12 ="
* 12. (The answer is 120.) Retu rn the comment READ Answer
'Co rrect" if the answer is right and "Incorrect" if
the answer is wrong.
(d) Look at the question from Example 7:
Write a program that reads the result of 10 games played by a
team and find the percentage of games won by the team.Output PRINT "Enter game results (Results)"
the percentage of games won. READ Results
Output instructions
These instructions display/output data that is in the computer's memory.
Commands used to output data are PRINT or WRITE. You can output string
variables and numeric variables as follows.
Syntax: PRINT < Variable name > , < Variable name >
Example:
Value of variables
Jane Doe 78
The value of a variable is printed, for example, 'Jane Doe' and '78' are •
p ri nted.
117 ^•
•
Outputting a string constant
Whgn a string constant is P rinted the exact characters within the quotation
marks are p rinted.
Syntax: PRINT
"String" PRINT "Carlos is my name." Carlos is my name.
PRINT "Time" Time
Example: PRINT "Sum = 3 + 4" Sum = 3 + 4
Wri te output instructions for the 5 Write an algorithm to read a R Write an algorithm ^•
following problems. time and output the message: to read the name and
1 Write an algo ri thm to display 'At a time like this', time, 'who amount on a cheque
'My name is Carla'. needs enemies'. and display this
2 Write an algorithm to output 6 Write an instruction to print information.
the number of adults and the average score of 25 9 Input and output the
children on a flight, students, and the name and following information: the
approp ri ately labelled. mark of the person receiving name, age and sex of a
3 Write an algo rithm to output the highest mark. person, appropriately
'Warning: Read all labels 7 Print the name of an item, labelled.
before washing'. cost of the item, the price 10 Print the principal, rate, time
4 Write an algorithm to output inclusive of the VAT, the and interest for a loan.
the message 'At times like discount, and the fi nal price
this, who needs enemies'. of the item.
Calculations
The mathematical operators for addition (+), subtraction (-), multiplication
(*) and division (/) are used in writing calculation statements. The equal
sign in a calculation statement is known as the assignment symbol.
Variables are assigned the results of the calcula tion.
For example: Memory locations storing the
A=B+C 6 2 4 values of variables A, B& C
ABC Variable names
Write calculation instructions for 5 Read the cost of a meal at a needed to cover ^•
the following problems. restaurant. If a 10% service the wall, adding 10% ^•
1 Enter the length and width of charge were added to the bill, more tiles to cover for
a pool and calculate and print write an algorithm to breakage. Print the size of
the length of rope needed to calculate and return the total the wall, the size of tiles
cord off the pool. amount on the bill. used and the total number of
2 Input the price of a textbook. 6 Write a program to read the blocks needed, inclusive of
Calculate and print the total temperature in degrees number of tiles added to
cost of the book after 15% Celsius (°C) and convert it to cover breakage.
VAT is added. degrees Fahrenheit (F) where 9 Read the height in inches and
3 Pipes are laid by an oil F = 32 + (9C/5). Output the weight in pounds of an
company. If the company has temperature in degrees individual and compute and
to lay down 3 km of pipes and Celsius and Fahrenheit. print their BMI (body mass
each pipe is 25 metres long, 7 + b — c(c + d) Write an index). BMI =
calculate and print the a instruction to ((weight/height)/height)
enter values for a, b, c and d 703.
number of pipes needed to
cover the distance. and compute and print the 10 A carpenter is paid a contract
4 Enter the size of a wall in result of the equation. fee of $2000.00 for 3 days
square metres, to be laid 8 Write an instruction to enter work. He hires 3 workers who
between two columns. If the the size (length and width) of work for the 3 days at $75.00
area of one brick is 0.6 m2, a wall and the size of tile a day. Calculate and print the
calculate and print the (length and width) in square amount of money paid to
number of bricks required to metres used to cover the wall. each worker, the total paid to
build the wall. Estimate the number of tiles all workers and the amount
the carpenter is left with.
Syntax:
(that is, instruction statements that would be performed if the conditions are
met)
ENDIF
Example 10
A company gives out bonuses based on the amount of income generated by their
sales representatives per month. Once the income is greater than $5000. 00, a
bonus of 10% of the generated income is given to the employees. Read the income
generated and print the bonus.
The decision to give a bonus is based on the amount of income the sales
representative generates.
Case 1
We must be aware of
where the PRINT PRINT "Enter the Income-Generated"
READ Income-Generated
statement is placed. If it
IF Income-Generated > $5000.00 THEN
is placed within the IF-
Bonus = Income-Generated * 10%
THEN-ENDIF construct, PRINT "Bonus", Bonus
only if the income ENDIF
generated is greater than
$5000.00 is the bonus
printed.
Case 2
•
120:.
Initialising a variable
It may sometimes be necessa ry or wise to initialise a va ri able, that is, to
give the variable a starting or initial value.
Case 3
Example 11
A car rental firm leases its cars for $250.00 per day. The manager give a
discount based on the number of days that the car is rented. If the rental period is
greater than or equal to 7 days then a 25% discount is given. Read the rental
period and print the discount given.
Input the rental period
The decision is based on —
the length of time the car PRINT "Enter car Rental Period"
is rented. READ Rental Period
IF Rental Period >= 7 THEN
The action is to calculate Discount = ($250.00 * Rental Period) * 25%
the discount to be given ENDI F
for the rental period. PRINT "Discount", Discount
Only if the car is rented
for 7 days or more is the
discount calculated.
•
121 ^•
•
The IF-THEN-ELSE construct
The IF-THEN-ELSE construct contains two parts: the THEN part and an
ELSE part. The condition is tested before an action can be unde rt aken. If the
condition holds TRUE, the THEN action is taken, otherwise the ELSE action
is taken if the condition is FALSE.
Indentation is used for readability, so that you can see at a glance the
structure of the construct - especially which statements belong to the THEN
pa rt , and which belong to the ELSE part.
Syntax:
IF <Condition> THEN
<THEN part: Action to be taken if condition is TRUE >
ELSE
< ELSE pa rt : Action to be taken if condition is FALSE >
ENDIF
Example 12
A company gives out bonuses based on the amount of income generated by their
sales representatives per month. Once the income is greater than $5000.00 then a
bonus of 10% of the generated income is payable; otherwise the bonus is 3% of
the generated income. Read the income generated and print the bonus.
Boolean operators
When selection is based upon one or more expressions/decisions being
TRUE or FALSE, it is possible to combine the expressions/decisions together
using the Boolean operators AND or OR.
• If the AND operator is used both conditions must be met, in order for the
total expression to be true or false.
• If the OR operator is used, either condition must be met, in order for the
total expression to be true or false.
Example 13
A club plays cricket only on Sundays, and only if it is not raining. Read the day
and the weather and print 'Game on' if it is a suitable day for playing.
What happens with each of the two operators? Let's try some algorithms.
•
122 ^•
•
With the AND operator
PRINT "Enter the Day and the Weather"
Both conditions must be met for the expression to READ Day, Weather
be true and 'Game on' is printed. If either IF Day = "Sunday" AND Weather = "No Rain" THEN
condition is not met, such as the day is not PRINT "Game on"
'Sunday' or the weather is 'Rain', then the action ENDIF
(printing 'Game on') is not taken.
Example 14
A company gives out bonuses based on the amount of income generated by their
sales representatives per month. Once the income is greater than $5000.00 and
less than or equal to $8000.00 then a bonus of 10% of the generated income is
given to the employee. Read the generated income and p ri nt the bonus.
q Nested selections
IF statements embedded one within another are said to be nested. For every
IF-THEN statement there must be an ENDIE
Syntax:
IF < Condition 1> THEN
<Action to be taken if condition 1 is true >
ELSE
IF <Condition2> THEN
<Action to be taken if condition 2 is met>
ELSE
IF <Condition3> THEN
<Action to be taken if condition 3 is met>
ELSE
<Action to be taken if conditions 1 to 3 are not met>
ENDIF
ENDIF 2••
:
ENDIF 1 ^
If the first condition is not met the second condition is checked, if the first
and second conditions are not met then the third condition is checked, and
so on.
Example 15
PRINT "Enter Income-Generated"
READ Income-Generated A company gives out bonuses based
IF (Income-Generated >= $10,000.00) THEN on the amount of income generated by
Bonus = Income-Generated * 20% their sales representatives per month.
ELSE Once the income generated is greater
IF (Income-Generated >= $8000.00) AND (Income-Generated than or equal to $10, 000.00 a bonus of
< $10,000.00) THEN 20 % is given. If the income generated
Bonus = Income-Generated * 15%
is greater than or equal to $8000.00
ELSE
but less than $10, 000.00 a bonus of
IF (Income-Generated >= $5000.00) AND (Income-Generated
< $8000.00) THEN
15% is given. If the income generated
Bonus = Income-Generated * 10% is greater than or equal to $5000.00
ELSE but less than $8000.00 a bonus of 10%
Bonus = Income-Generated * 3% is given. If the income generated is less
ENDIF than $5000.00 then a 3% bonus is
ENDIF given. Read the income generated and
ENDIF print the bonus.
PRINT "Bonus", Bonus
-b- b z -4ac ^•
Using the IF-THEN and IF-THEN- 6 A club plays cricket only on and 2a 0
ELSE construct write instructions Sundays and only if it is not provided that b - 4ac .
for the following problems. raining. Read the day and the <0 and a<>0.
1 Write an algorithm to read the weather and output 'Game on' 9 Write an algorithm to read
number of days a person has if the weather is good and the the withdrawal amount from a
been using a demo and display day is Sunday, or 'Play savings account. Determine if
the message "Time Up" if the suspended' if it is Sunday and there are sufficient funds in
number of days exceeds 12. it is raining. the account, and whether the
2 A video club rents videos for 7 Write an algorithm to read the daily withdrawal limit has
three days. Write an algorithm name of the student and the been exceeded. Output,
to read the date borrowed and value of the student's mark. appropriately labelled, 'Not
the present date; calculate the Print the name of the student enough funds' and 'daily
number of days borrowed. If and the appropriate grade withdrawal limit exceeded'.
the number of days borrowed based on the following grading 10 Read the height in inches and
exceeds three days compute scheme. weight in pounds of an
the number of days overdue 80 or more A individual, and compute and
and the overdue charge. Use a Less than 80 but more than or print their BMI (body mass
rate of $1.50 for every day equal to 65 B index). BMI =
overdue or part thereof. ((weight/height)/height)
Less than 65 but more than or
3 Read the weather; if the 703. If the BMI is less than
equal to 50 C
weather is sunny output 'Good 18.5, output'You are
Less than 50 but more than or underweight'; if the BMI is
day for the beach'.
equal to 35 D between 18.6 and 24.9, output
4 Read the present date,
Less than 35 F 'Your weight is normal'; if the
appointment date, time, place
Write an algorithm which BMI is between 25 and 29.9,
and contact name. If the 8
reads three values, for a, b and output'You are overweight'; if
appointment date is equal to
c, and prints the roots of the the BMI is greater than 30,
the present date, display the
e
quadratic equation ax + bx + output 'Your health is at risk,
appointment information
c = 0. The roots are you are in the obese category'.
appropriately labelled.
•
124 I•
I Read N; if N is greater than 100
then subtract 50 from N,
given by - b + b z
2a
4ac
otherwise multiply N by 3.
•
Repeat statements/looping/
counting/iterations
It is often necessary to repeat certain parts of a program a number of times.
One way of doing this would be to write that part of the program as many
times as needed. This is impractical, however, as it would make the program
lengthy. In addition, in some cases the number of times the section of code
needs to be repeated is not known beforehand.
You need to keep track of how many times the instructions are repeated.
Counting or iteration involves increasing the value of a counter variable by
a fixed number (this can be any value, such as 1, 2, 5, etc.) every time the
instructions are repeated. This counter can be part of a condition for
stopping the instructions from repeating when the value of the counter
becomes equal to a certain value.
Counting
Syntax:
This example simply states that 1 is added to the value of the counter
variable and the result is placed back into the counter variable. The counter
variable must be initialised before the instructions are carried out. It is x
usually set to 0; this is often, but not always, the case. The choice of name
for the counter variable can reflect what is being counted: in the case below,
NumofCars for the number of cars.
Example 16
A car rental firm leases its cars; read a car registration number and count the car.
Print the number of cars. t
S.
a i
O
PRINT "Enter a car number" PRINT "Enter a car number"
Counter = 0 NumofCars = 0
READ Car number READ Car number
Counter = Counter + 1 NumofCars = NumofCars + 1
PRINT Counter PRINT NumofCars
In these two examples the variable name 'Counter' and the variable name
'NumofCars' are used to keep track of the number of cars where 'Car Note: You can use any
Number' is the car's registration number. abbreviation or word as
a variable name to
It may become necessary to keep track of more than one item. In this case
two counter variables are needed. convey the meaning of
what is being stored. •
125 %
•
Example 17
A car rental firm leases its cars; read the car registration number and count the
car. If the car is a station wagon also count the number of station wagons. Print
the number of cars and the number of sta tion wagons.
Cumulative totals
It often becomes necessary to keep adding values to a current total to get a
new total. For example, you may want to keep track of the total runs made
by various batsmen on a cricket team:
Syntax:
< Cumulative Total > = < Cumulative Total > + < Variable >
It is important to initialise the Cumulative'Ibtal variable to 0 before the
values are added.
•
Example 18
A car rental firm leases its cars; read the number of cars leased in one day and
;QJ add it to the numbers of cars leased. Print the total number of cars leased.
Loops
When a group of statements/instructions are repeated it is called a loop.
There are two types of loops.
• A finite loop is where the number of times a repetition is to be made is
known.
• An indefinite loop is where the ins tructions are repeated an
unspecified number of times.
Iteration is repeating a set of instructions over and over. One execution
of a set of statements in a loop is called an iterate.
A sentinel or terminal value is required to cause the program to exit the
loop. A sentinel value is a lookout value such that if the data being
entered ever becomes equal to the sentinel value, the computer exits the
loop. The sentinel value must not be one of the values in the list of data
• to be processed. Either the user can input this value, or the computer can
126 ^• be programmed so that a certain condition can be met, triggering the end
• of the loop.
For example, if a number of student ages in a class is to be read and the
number of students is not known, a particular value can be entered to
•
indicate the end of the list. This value could be 0 or 199 since none of the •
students in the class would have an age of 0 or 199. These values are
sentinel/terminal values since they indicate the end of the list.
Syntax:
FOR < Variable > = < Beginning value > TO < Ending value > DO
<Action to be repeated >
ENDFOR
or
FOR < Variable > = < Beginning value > TO < Ending value > STEP
<incremental value> DO
When this statement is executed, the counter variable is initially set to the
beginning value, in this case, 1. After the execution of the instructions
between the FOR and the ENDFOR, the counter variable is increased by 1.
The instructions are repeated and the counter variable increases until it
becomes equal to the Ending value, in this case, 4. So the instructions are
repeated four times.
Example 19
A car rental firm leases 4 cars in one day. Read the Total Rent = 0
number of days for lease of each car and calculate the FOR Counter = 1 TO 4 DO
total rent paid to the firm if a car is leased for $250.00. PRINT "Enter the number for days for
Print the total rent paid to the rental firm. lease"
READ NoofDays
The STEP clause allows you to increase the counter
Rent = NoofDays * $250.00
by the increment value every time the instructions
Total Rent = Total Rent + Rent
are repeated, until it becomes equal to or exceeds ENDFOR
the ending value. It is often used when we want to PRINT "Total rent paid to firm", Total Rent
print tables.
Example 20
Print a table to find the square and cube of numbers 1 to 10.
• In this case Number becomes set to the initial value 1. Print "Number", "Square", "Cube"
• The first time through the loop, Square becomes equal to FOR Number = 1 TO 10 DO
Square = Number * Number
Number * Number which is 1 * 1 and Cube becomes
Cube = Number * Number * Number
equal to Number * Number * Number which is 1 * 1 * 1.
Print Number, Square, Cube
• Then the Number, Square and Cube are printed. ENDFOR 127 %
r
• The second time through the loop, Number becomes set to 2 and the
Square and Cube are calculated and printed.
• This continues until Number becomes equal to the ending value, which
is 10.
Example 21
Print a table to find the
square and cube of all Print "Number", "Square", "Cube"
FOR Number = 2 TO 20 STEP 2 DO
even numbers between 2
Square = Number * Number
and 20 inclusive.
Cube = Number * Number * Number
• In this case Number Print Number, Square, Cube
becomes set to the ENDFOR
initial value 2.
• The first time
through the loop Square becomes equal to Number * Number which is 2
* 2 and Cube becomes equal to Number * Number * Number which is 2
2 * 2.
• Then the Number, Square and Cube are printed.
• The second time through the loop Number becomes set to 4 as the STEP
clause increases the value of the Number by 2 every time it goes through
the loop. The Square and Cube are calculated and printed.
• This continues until Number becomes equal to the ending value, which
is 20.
Example 22
Calculate the sum of all the odd numbers between 1 and 20. Print the total.
The statements that make up
the body of the FOR loop can Sum = 0
consist of other constructs FOR Oddnumber = 1 TO 20 STEP 2 DO
such as the IF-THEN, and IF- Sum = Sum + Oddnumber
THEN-ELSE constructs. ENDFOR
PRINT Sum
Example 23
Using the FOR construct write 5 An airline does not charge for 8 Write an algorithm •
instructions for each of the babies 2 years and under; it to input an integer N. •
following problems. charges half price for children Find and output the
Write a program that reads the 2 to 12 years and the full price value generated when 2 is
result of 10 games played by a for persons above 12 years. raised to the power N, where
team and finds the percentage Read the airfare and the age of N is between 0 and 10.
of games won by the team. the person; calculate and 9 Write an algorithm to input a
Output the percentage games print the total amount paid by country and exchange rate of
won. a family of five. the country's currency against
Write an algorithm to enter 10 6 A school has a house system the US dollar. Output a table
numbers and output the implemented. Points are showing the amount of US
highest and lowest numbers awarded to a house based on dollars and the equivalent
appropriately labelled. the performance of its amount of the country's
Write an algorithm which members: 1st place - 4 points, currency, for 1 to 20 US
finds the total of the numbers 2nd place - 3 points, 3rd place dollars.
10 to 25 and print the total. - 2 points, 4th place - 1 point 10 Write an algorithm to output
and last place - no points the sum of all the even
Write an algorithm to awarded. For 10 members of
compute the following numbers in the range 2 to 40.
the A ripo house read the 11 Write a program that accepts a
expression:
place they came in the events; positive integer and prints all
2
Yl = 2(2—x )andY2 = calculate and print the total
2
2— (2 — x ) using values -4 to
numbers from the given
awarded to the house. number down to 1 inclusive.
+ 4 for the value of x. Print x, 7 Print a five-times
Yl and Y2. multiplication table for
numbers 1 through 20.
Example 25
Write an algorithm PRINT "Enter the student's age"
to enter the age and READ Age
count the number Count = 0
of students in a WHILE Age <> 999 DO
class. Calculate the Iota]. = Total + Age
Count = Count + 1
average age of the PRINT "Enter the student's age"
group of students if READ Age
the data is ENDWHILE
terminated by the Average = Total/Count
value 999. Print the PRINT "Number of students:", Count
PRINT "Average ages of students:", Average
number of students
in the class and the
average age of the students.
The statements that make up the body of the WHILE loop can consist of
other constructs such as the IF-THEN, and IF-THEN-ELSE constructs.
Example 26
Note: the highest Negative = 0
Write an algorithm to Positive = 0
number is initialised to read a set of numbers PRINT "Enter a number"
0 so that any number terminated by 0; print READ Number
entered is higher than the numberofpositive WHILE Number <> 0 DO
that value. Each and the number of IF Number > 0 THEN
negative numbers. Positive = Positive + 1
number entered must ELSE
be checked against the The WHILE loop can Negative = Negative + 1
previous one. be used to find the ENDIF
maximum and PRINT °Enter a number"
minimum values in a READ Nunber
series of numbers. ENDWHILE
PRINT "Number of Negative Numbers", Negative
PRINT "Number of Positive Numbers", Positive
Example 27
Highest = 0
Write an algorithm
PRINT "Enter a number"
to read a set of
READ Number
numbers terminated WHILE Number <> 0 DO
by 0 and print the IF Number > Highest THEN
highest number. Highest = Number
ENDIF
PRINT "Enter a number"
• READ Number
ENDWHILE
130 .0 PRINT "The highest number entered is:", Highest
•
Using the WHILE construct write generated income is added to each purchase;
instructions for each of the the sales representative's calculate the total ^•
following problems. salary of $4000.00. Write an amount sold and the
Persons working for an algorithm to input the sales quantity remaining, if the
income between $20,000 and representative's number and number of sales and
$30,000 dollars per annum income generated; calculate quantity purchased is not
pay an income tax of $12,000 the bonus, and salary plus known in advance. Terminate
per annum. Persons working bonus. Data is terminated by the data by entering 0 for
for an income of between entering the value 000 for the quantity.
$30,000 and $40,000 per sales representative number. 8 Write an algorithm to accept
annum pay an income tax of 5 Write an algorithm to fi nd a list of positive integers.
$15,000 per annum. Read the and print the mean of a list of Each sub-list of non-zero
employee number and positive integers. The integers is terminated by a
income, and calculate the number of integers is not zero. Each time a zero is read,
total tax paid by employees. known in advance. The output the sum of the non-
Data is terminated by procedure is terminated by zero integers. The data is
employee number 000. the value 0. terminated by -1. Indicate
2 Enter the marks of students 6 A car rental firm leases its the number of non-zero
terminated by 999. Find and cars for $250.00 per day. The integers and the number of
p ri nt the average and the manager gives a discount sub-lists.
highest mark. based on the number of days 9 Write an algorithm to input
3 A resident person leaving that the car is rented. If the integers until a sentinel value
their count ry is required to rental period is greater than of 0 is entered; print the sum
pay a departure tax of or equal to 7 days then a 25% of all the positive numbers
$100.00. However, if the discount is given. Read a car entered and the sum of all
person is a visitor to the number and the rental negative numbers entered.
count ry , an additional $20.00 period, and calculate the total The number of positives and
must be paid. Read in the amount earned by the car negatives must also be
passenger number, rental firm after discounts, if printed.
terminated by 0, and whether the number of cars rented is 10 Write an algorithm to accept
the passenger is a visitor or not known in advance. The a number of integers until a
resident. Write an algorithm process is terminated by car sentinel value of 0 is reached.
to calculate the total amount number 0. The algorithm must print
of tax collected for the day. 7 A supermarket is keeping each pair of consecutive
A company gives out bonuses track of the amount in stock numbers where the first
based on the amount of of an item. Write an number is larger than the
income generated by their algorithm to keep track of second. For example: if the
sales representatives per how many of the items inputs are 1, 3, 2, 4, 5, 2, -1, 0
month. Once the income is remain at the end of the day and 0, the output would be "3,
greater than $5000.00, a if the initial quantity was 210. 2" and "5, 2" and "2, -1".
bonus of 10% of the Input the quantity bought at
Step 4- writing a
computer program ®
corresponding to the algorithm.
After developing an algorithm or method of solving the problem, the next
step is to write a computer program corresponding to the algorithm, using
programming language. Converting the algorithm to the programming
language requires the use of the specific syntax of that programming
language. •
After the program is written it must be tested and debugged. Algorithms can 131 ^•
also be tested and debugged.
•
Step 5- Testing and
debugging the program ,
Once an algorithm or a program is developed or written, the next stage is to
check that the algorithm or program is doing what it was designed to do, and
is doing so correctly.
Example 28
What is printed by the following algorithms?
(a)
Count = 0
WHILE Count < = 10 DO
Count = Count + 2
PRINT Count
ENDWHILE
Count OUTPUT
0 Count is set as 0; Count < 10
(b)
FOR Kg = 1 TO 5 DO Kg Lb OUTPUT
Lb=Kg*2.2
PRINT Kg, Lb 1 2.2 1, 2.2
END FOR
2 4.4 2, 4.4
3 6.6 3, 6.6
4 8.8 4, 8.8
5 11 5,11
132 •
•
(o)
A=3 A B C D E OUTPUT
B = 5
C=6 3 5 6 15 11
D = B * A
15 15, 5, 6, 15, 11
E = C + B
L
IF E > D THEN
A = E
ELSE At the end of the program the values for
=
A D
B, C, D and Edo not change.
ENDIF
PRINT A, B, C, D, E
134S•
•
LJ
•
135 %
•
Step 6 - f
Documenting the program
Documentation is a wri tt en explanation of how the program works and how
to use it. There are two types of documentation; user documentation and
technical documentation.
•
137 ^•
•