Chapter 1.5 Hardware. 1.5 (A) Control Unit, Memory Unit, and Arithmetic Logic Unit
Chapter 1.5 Hardware. 1.5 (A) Control Unit, Memory Unit, and Arithmetic Logic Unit
1.5 (a) Control Unit, Memory Unit, and Arithmetic Logic Unit
The first thing to be said in this section, is what is not necessary. The three topics that are
listed in the heading would normally lead to the fetch- execute cycle, this does not come
into this module. Likewise, any complicated diagrams showing how the various parts of
the processor are connected up and communicate with each other do not appear in the
syllabus until next year. The requirements of this section are very simple, they are
restricted to a basic understanding of what these three parts of the processor are meant to
do.
Control Unit.
All computers follow instructions that are given to it in a program. These instructions are
in a particular order in the program, and following them, and carrying them out, will
mean that the computer has accomplished whatever task it was meant to do. Something,
in the computer, has to manage the instructions and make sure that all the other parts of
the processor do what they should be doing. This is the job of the control unit.
The control unit has three jobs
1. It has to decide which instruction to carry out next and then go and get it.
2. It has to decipher the instruction, in other words it has to work out what needs to be
done to carry the instruction out.
3. It has to tell other parts of the processor what they should do so that the instruction will
be carried out.
Memory Unit
The third part of the processor is where everything that the processor is going to use is
stored. This includes all the program instructions and all the data needed to carry out
those instructions. One of the jobs of the control unit is to be able to find the information
stored there when it is to be used.
The parts of the operating system, which the computer is using at the time, also need to
be stored in memory.
1.5 (b) Types of Primary Memory
Notes:
1. There are many other types of primary memory that you may have heard of (PROM,
EPROM, EAROM, SRAM, DRAM,…). They are all a type of either RAM or ROM and
you have no need to learn about any of them, in fact it is probably better not to until the
later parts of the course.
2. A typical question will ask for an example of what is stored in ROM and RAM. The
safest answers are the bootstrap being stored in ROM and user software and data being
stored in RAM. Problems arise if a student answers that the operating system is stored in
ROM because it can be, but in most micro systems it isn’t for the reasons given above.
The BIOS (if you don’t know what that is, don’t worry, it is not in the course) is another
problem. The BIOS itself includes user defined parameters and hence is not stored in
ROM entirely. In fact the BIOS tends to be stored in a special type of RAM which is
refreshed using battery power when the system is switched off. This is past the level of
this course and students are advised not to use this as an example of storage in ROM.
1.5 (c) Secondary Storage Media
Primary memory is memory within the processor. It is here that the computer stores data
that are in current use because the control unit does not have direct access to data that is
stored anywhere outside the processor. However, the memory that is available in the
processor is limited in size and volatile. What is needed is something that is less
temporary in nature and that does not have the same restrictions as far as size is
concerned. This will be storage outside the processor. It is called secondary storage.
There are a number of different types of secondary storage that can be categorised
according to
• Means by which the data is stored, optically or magnetically
• The technique used for storage of the data, sequential storage or direct access storage
• The capacity of the medium, how much can be stored on it
• Portability of the medium, can it be moved around easily
• Access times to the data stored.
1. Magnetic tape
Magnetic tape is still widely used, particularly in the form of tape streamers. The big
disadvantage of tape is that the access to the data stored is, by necessity, sequential which
makes it largely unsuitable for most data handling applications because of the time
necessary to find a particular item of data. However, large volumes of data can be held
and the medium is freely transportable. These qualities make it valuable for producing
back up copies of files stored on a computer system.
2.Magnetic floppy disk
Floppy disks hold a relatively small amount of information. Most software is too large to
be stored on a floppy disk, as are commercial files of data. However, a floppy disk is very
portable, allowing for easy communication of data from one stand-alone computer to
another. It is also readily available, almost all microcomputers having a floppy disk drive.
It is also convenient for storing those files that are particularly confidential because the
files cannot be broken into if they are being carried by the owner, or locked away in a
safe. Despite being direct, access times are slow because of the limited speed of rotation
possible and the relatively crude nature of the read heads.
3.Magnetic hard disk
Data is stored in the same way as on a floppy disk. The differences being that the hard
disk is made of a rigid material rather than a floppy plastic, and it is contained in a sealed
unit. These differences mean that the hard disk can rotate faster, the heads can get closer
to the surface meaning that the storage density can be greater, consequently that the
amount that can be stored is greater and that the access times are much faster. The hard
drive is likely to be the main secondary storage for a computer system, having very large
storage capacities. Although they can be portable, it is more likely that they will be fixed
to the chassis of the machine because of the tolerances that they have to work to.
4.CDROM
A CDROM is different from the storage devices so far mentioned because it is not
magnetic. A CDROM is an optical storage device, using the reflection of a laser off a
pitted surface to store information. Large quantities of data can be stored on the surface
and it is completely portable from one machine to another. In addition, most computer
systems can now be relied on to have a CD drive, and a CD is not alterable by the user.
For these reasons, manufacturers have tended to use CDs to produce software and large
data files like encyclopaedias.
5. CDRewriteables.
It is now possible to write to CDs by using a special peripheral device called a CD writer
and a special CD, but it is important to remember that these are not CDROMs, which
cannot be changed. They tend to be used for things like making a back up copy of files,
or archiving for long term storage.
6.Others
There are many other types of secondary storage, two of which are worth a mention. Zip
drives are a more robust version of a floppy disk, having a faster access speed and a
greater capacity. They have become fairly popular for backing up work on
microcomputers. DVD is a relatively new technology that will probably replace CDROM
as it can store much larger quantities of data and allow access at high speed. For the
purposes of the syllabus, the original 4 types of secondary storage are quite enough at this
level.
Uses.
Obviously, no list of uses will be complete. However, there are some obvious uses for
each storage type which take into account the advantages and disadvantages of each.
A Tape Streamer is used for making backups of files held on computer systems. This
makes use of the fact that it can store a large amount of data, but the disadvantage of the
access being slow does not matter because it is rare that a backup file would be used
anyway.
A floppy disk has the advantage that it can be written onto and taken away from the
computer. Because of this it can be used for storing confidential files. Add to this the fact
that all computers can be relied on to have a floppy disk drive and it becomes a sensible
way of transferring information from one machine to another.
A hard drive has the advantages of being fast to access and also stores massive amounts
of data. These advantages mean that it is going to be used for storing software and user
files. The disadvantage of being attached to one machine is not important if the same
users always use the same machines, some other method of sharing will have to be
devised if this is not true.
A CDROM cannot be altered. This disadvantage can be turned into an advantage if the
owner does not want the contents of the storage to be altered. Examples of files stored on
CDROM are software for import to a system and large reference files like
encyclopaedias.
1.5 (d) Transfer of Data, including Buffers and Interrupts
There are two places where data can be stored in a computer system, the primary memory
and secondary storage. Sometimes it is necessary to transfer data from the primary
memory to secondary storage, perhaps because the computer is going to be switched off
in which case the data in primary memory would be lost. Sometimes it is necessary to
transfer from secondary storage to primary memory, perhaps because the processor wants
to use some data held in the secondary storage and, consequently, needs to move the data
into the primary memory first. Whichever direction the data is to be transferred the
method of transfer must be planned.
Normally the data would be transferred through a wire connecting the two storage areas
together. The type of wire and the different rules for data transfer are explained in section
1.6.d, sufficient for the moment is to have a picture of data travelling freely in both
directions.
Primary Secondary
Memory Storage
Unfortunately, we know that things can’t be that simple. We know that primary memory
is part of the processor, and that anything that goes in or out of the processor must go
through the ALU, so the diagram should look like this
Primary Secondary
ALU
Memory Storage
This causes a problem. The primary memory operates at great speed because it is part of
the processor, while the secondary storage is probably some sort of disk or tape which
(while it seems incredibly quick to us) is very slow at reading or writing the data, in
comparison. This means that the processor should be able to get on with something else
because the secondary storage is so slow. Unfortunately, it can’t because it needs the
ALU that is being used for the transfer of the data. This problem is overcome by the use
of a buffer.
Buffers.
The problem is caused because the secondary storage device is so slow compared to the
processor, the solution is to put a small amount of fast memory in to the system between
the ALU and the secondary storage device.
This means that the processor can send data very quickly (or receive it), and then get on
with something else while the storage device takes its time in reading (or sending) the
data. This small amount of memory between the two parts of the system is called a
buffer.
Stage One: Filling the buffer from the processor
Primary Secondary
ALU Buffer
Memory Storage
Stage Two: Emptying the buffer to storage
Primary Secondary
ALU Buffer
Memory Storage
Interrupts.
This system is fine if the buffer can hold all the data that needs to be sent to the storage
device. However, if there is more data than will fit in the buffer, the storage device has to
be able to tell the processor (actually the control unit) that it has used up all the data in
the buffer and that it is ready for the next lot. This forces the processor to stop what it is
doing and fill the buffer up with more data. Because this message from the secondary
device makes the processor stop what it is doing it is called an interrupt. When the
processor receives the interrupt, the whole procedure is repeated.
Notes:
A buffer is a small amount of fast memory outside the processor that allows the processor
to get on with other work instead of being held up by the secondary device.
An interrupt is the message which the secondary device can send to the processor which
tells the processor that all the data in the buffer has been used up and that it wants some
more.
The example used here was communication between primary and secondary storage, but
the same is true for any communication between the processor and a peripheral device,
e.g. a printer or a keyboard.
The system is not really quite as simple as suggested here, but further complications can
wait until the second year of the course.
1.5 (e) and (f) Common Peripheral Devices
Any hardware device that is part of the computer system but is not part of the processor
itself, is called a peripheral device.
Peripheral devices can be categorised under four headings.
1. Communication devices.
These devices allow for communication between machines and will be covered in detail
in section 1.6.b.
2. Storage devices.
These devices, which provide for secondary storage in a computer system, have been
described in section 1.5.c.
3. Input devices.
There are too many different input devices to expect familiarity with all of them.
However, by inclusion in the syllabus there are some that must be understood. While this
list is not exhaustive, specific questions will not be asked about other input devices with
the following exceptions. There are some devices that are so common that any candidate
taking an exam in computing can be expected to have experience of using them, e.g.
mouse, keyboard. Additionally, candidates should be encouraged to learn about a variety
of contemporary devices so that they can use them when answering questions that ask for
a hardware configuration for a specific application.
a) Keyboard. A standard keyboard uses keys that stand for the different characters that
the computer recognises in its character set. Most keyboards contain the letters of the
alphabet, but not all do, for instance most calculator keyboards are very different, as are
the keyboards for use at ATM machines. The characters needed for specialist use
machines are determined by the use to which the machine is to be put. Keyboards are the
most common form of input device to a system because they are universally available and
understood.
The common keyboard is known as the QWERTY keyboard because those are the first
six characters on the top line. The design is not very good for two reasons. First, the
arrangement of characters comes from the original typewriter whose keyboard was
arranged to be the most difficult to use in order to slow typists down so that they did not
jam the mechanism of the old machines. The second is that the keyboard itself is difficult
to use comfortably because of the way that the keys are arranged in rigid rows, making it
awkward to keep your arms comfortable while using it. The first problem is very difficult
to solve because of all the experienced operators that can use the present keyboard so
well. Retraining them to use a different arrangement of keys would not be feasible.
Various attempts have been made to address the second problem by arranging the keys in
curves that fit the palm of the hand rather than in straight lines. These are called natural
or ergonomic keyboards.
One problem with normal keyboards is that they are particularly prone to damage from
dirt or liquids because of the gaps between the keys. A different type of keyboard, where
the keys are simply part of a continuous surface which has areas on it, which are sensitive
to pressure, can overcome this problem. Called touch-sensitive keyboards, or concept
keyboards, they are ideal for use outside because rain will not damage them like a normal
keyboard.
A type of keyboard not yet mentioned is a musical keyboard. Normally arranged like a
piano keyboard these need a special piece of hardware to allow them to work properly,
known as a MIDI (musical instrument digital interface) this connects the musical
keyboard to the processor and allows data to be passed between the instrument and the
processor.
c) Barcode readers. A barcode reader is a laser scanner that reads the reflected laser light
from a series of dark and light coloured lines of varying thickness. The different widths
of pairs of lines make up a code that can be converted into a number. This number can
then be used as the keyfield relating to a file of items that have been barcoded. The
details of the contents of the barcodes are not of importance to us in this section, except
to say that barcodes can easily be misread by the system, so one of the digits in the
number is used to check that the rest of the code has been read properly. This digit is
called the check digit, and will be discussed in more detail later in the course. Barcodes
are particularly useful because they do not rely on human beings to input the data,
although, if the barcode is damaged so that the laser scanner cannot read it properly, the
digits represented by the code are printed underneath so that they can be input by a user
at a keyboard. Barcodes are used where the data does not change, and so can be printed
on original packaging.
d) MICR (magnetic ink character reader). This is a device that reads characters that are
printed on an original document at the time of it being created. The characters are printed
using magnetic ink. The value is that the characters are readable by humans and by
machines. The only common use for such characters is the data printed on the bottom of
cheques containing account identification.
e) OCR (optical character reader). This is a device that reads characters and can
distinguish between the different characters in a given character set. It works by
comparing the shape of a scanned character with a library of shapes that it is intended that
it should recognise. OCR tends to be an unreliable form of input and works more
effectively when it is restricted to having to recognise a standard character set produced
by printing rather than by using hand writing. OCR is used for reading post codes on
printed documents and also for reading documents for blind people, the contents of which
can be output using a voice synthesizer.
f) OMR (optical mark reader). This device can recognise the presence of a mark on a
sheet of paper. The position of the mark conveys information to the machine. For
example a school register may consist of a list of names of pupils in a class together with
two columns of small rectangles, one for present and one for absent. The same action
(shading in a rectangle) stands for both being present and being absent. The difference is
the position that the mark occupies on the paper. Printing in the sensitive areas of the
sheet is done using a special type of ink which the optical scanner does not see, that is
why OMR documents tend to be printed in a light blue or pink colour. The other standard
use for OMR documents is as multi choice examination answer sheets.
The big advantage of both OCR and OMR is that data can be input to a computer system
without having to be transcribed first, thereby cutting down the number of errors on data
input.
h) Graphics Tablet. A graphics tablet is a flat surface on which a piece of paper is placed.
The user can then draw on the paper and the tablet will sense where the pencil is pointing
and transfer the line to the screen.
4. Output Devices
There are too many output devices to be able to write notes on all of them. Again, the
same thing is true about output as is true about input, that it is important to know about
those devices stated in the syllabus and also a range of devices that will allow for sensible
decisions about peripheral devices to be made for a given scenario in a question.
b) Printers. A printer is a device which provides the user with an output from the system
which is permanent. This output is known as hard copy, so a printer is a device which
produces hard copy. There are many different types of printer and the student should be
aware of a number of them, their uses, advantages and disadvantages. However, there is
no need to understand how they work.
The first type is a dot matrix printer. These tend to be slow, and the output is particularly
poor quality. The big advantage is that the output is produced by using pins to strike at
the surface of the paper. Because of the physical nature of the way that the printout is
produced, it is possible to obtain multiple copies by using carbon paper or self
carbonating paper. A good example of this is the receipt that a shopper is presented with
if buying something using a credit card, there are two copies produced, back to back, one
for the shop to keep and one for the buyer to take away with them.
Ink jet printers, which produce output by spraying ink on to the paper could not produce
the two copies that the dot matrix can, but it can produce much better quality and in
colour, at low cost. This makes ink jet printers ideal for home use.
Laser printers can produce very high quality work at high speed. The cost is more than
with the other types but used where it is necessary to give a good impression, for instance
sending letters from a solicitor’s office to clients.
Plotters are a type of printer designed for drawing lines and geometric designs rather than
for producing characters. The image is created by pens being moved across a piece of
paper, under the command of the processor. Plotters tend to be used for drawing
blueprints, perhaps in an architect’s office to produce detailed drawings of buildings for
builders to follow.
There are many other peripheral devices and, as has been mentioned, knowledge of some
others will not come amiss, however that is enough to be able to answer questions in the
exam. The questions will normally take the form of presenting a scenario and then asking
for a description of the hardware required. The important thing to remember is how the
marks will be awarded. There will not be a mark for every device mentioned, but the
candidate will be expected to give sensible suggestions for each of the four areas of
peripherals mentioned at the start of this section. In other words the mark will not be for a
keyboard or a mouse, but for suggesting sensible methods of input to the system.
Example Questions.
2. a) State two ways that RAM and ROM memory differ. (2)
b) Explain what types of data would be stored in each of RAM and ROM memory,
giving reasons for your answers. (4)
3. A student has a home computer system.
State what storage devices would be used on a home computer system and justify
the need for each one. (8)
4. Describe how buffers and interrupts can assist in the transfer of data between
primary memory and a secondary storage device. (4)