Hardware
We now need to consider more closely what makes up the computer's processor and how it interacts with the other components of the computer system. The processor is purely electronic circuits. It will be mounted on a motherboard which has connectors to various buses used to communicate with input and output devices.
A bus
A bus a pathway along which data travels and consists of a set of parallel wires (lines). Each line can transmit a single bit. The bus is made up of a number of lines so be would described as (for example) a 16-line bus. 16 lines means 16 bits can be sent along the bus at the same time, so a 16-line bus therefore can transmit a 16-bit number.
The address bus
All components of the system - including the primary memory - will be referenced by the processor using an address. Since it is the only data that the processor understands an address will be a binary number.
The only component which can load an address onto the address bus is the processor. This address is then passed to the relevant component such as the main memory or an input or-output device.
Device controllers
The processor has a fundamental problem. Manufacturers will want a particular processor to be able to communicate with thousands of different devices which are manufactured by various companies. It would be impossible for these connections to be hard-wired for all possible devices and so communication between the processor and the various devices is done through an intermediary device controller.
The data bus
Data will be continually passed to and from the processor, the main memory and the devices. Since data needs to be both read and written, the data bus will be bi-directional.
The control bus
Both the address bus and data bus use all the lines together to form a binary member. The control bus works very differently where each line is used for a different control signal. It is the task of the control bus to coordinate the various actions and send appropriate timing signals to indicate something has happened or been completed.
Consider when the processor has to read a value from main memory. The sequence of events would be as given here.
• Address bus is loaded with the address
• Data bus is loaded with the contents of this address and copies the value to a register in the processor
• Control bus sends a signal to confirm the 'data read' operation has been completed.
Other control bus signals include:
• memory write completed
• output completed - data on the data bus has been copied to the output device
• input completed - data has been copied from the input device to the data bus
• reset - the user has pressed the Reset button on the computer.
Inside the processor
The processor will be continually receiving program instructions in sequence. Each time it must make sense of the instruction before it is able to execute the instruction.
A typical instruction could require the processor to:
• load the contents of a memory location
• add/subtract a number
• add/subtract the contents of a memory location
• manipulate the bits in some way, for example, shift them one place to the left.
Each instruction must be loaded from memory onto the data bus and it is one of the main roles of the control unit to manage the sequencing of instructions.
Arithmetic is done by circuits inside the processor called the Arithmetic Logic Unit (ALU). The ALU is made up oflogic circuits which are designed for various computations required.
Processor
CIR Accumulator
| ↑
↓ ↓
Instruction decoder ALU
Figure 4.1 Inside the processor
Figure 4.1 assumes there is only one general storage location available inside the processor called the Accumulator.
Primary memory (or Main memory)
Primary memory
Operating system
Word processor
Document
Unused
Figure 4.2 Primary memory
Consider a session of word processing on a PC. The user will load the word processing software (from the secondary storage) - type the document and later save the document onto the secondary storage.
For this computer session the primary memory Will contain both program instructions (the OS and the word processing software) and what the computer system will consider as 'data' (the document) (Figure 4.2) .
The memory consist of a number of memory cell Which are each referenced with a unique memory address.
Each cell of main memory on a PC will contain one byte (i.e. 8 bits); hence modern computers are described as 'byte-addressable'.
It is a major job for the operating system to manage which memory cells are being used and which cells are 'free'. When the word processing session finishes both the memory used for the program and the document will become free and available.
It is a fundamental concept that the computer system when reading/writing values to and from memory will treat the contents of all memory cells as a 'data' value. It is what it then does with that data value that will give the byte a context.
Random Access Memory (RAM)
'Random access' because the processor is able to go directly to a particular memory location (assuming it knows the address) to retrieve the data value from that cell.
For the most popular form of RAM - Dynamic RAM (DRAM) - each bit is formed from a capacitor and a transistor working together. The capacitor stores the charge representing the value 0 or 1. The transistor is the switch to this component which allows the value to be written or read.
RAM is volatile - that is its contents will be lost when the power to the computer system is switched off. Also the contents of the RAM can continually change (think back to our word processing session scenario).
Integrated circuit technology has progressed at such a rate that PCs with a memory size of 4GB are now common and this has implications for programming. In the early days of computing memory was at a premium and programming techniques were specifically designed to maximise the use of the available memory. One quote Bill Gates will want to forget is "640K ought to be enough for anybody!" (1981).
Read Only Memory (ROM)
'Read only' implies that the contents of this type of memory cannot be changed. The bit pattern in each cell of ROM is burned at the time of manufacture of the memory component. ROM also allows random access to cells. Because the contents of this memory cannot be changed this makes it suitable for storing the program instructions the computer needs for its start-up process (called booting the computer). The software on the ROM memory is called the bootstrap loader. The computer will be hard-wired to run the bootstrap loader software when the power is switched on and its main task will then be to load parts of the operating system from the secondary storage.
Secondary storage
Also called auxiliary storage or backing storage.
If the RAM is volatile the computer system must use secondary storage for the permanent storage of programs and data.
Issues concerned with secondary storage will be:
• Is the device internal or external to the computer?
• Does the medium allow for direct access to particular files?
• Is the technology based on optical or magnetic methods of storage?
• Is the data effectively online or off-line to the computer system
Magnetic devices
Hard disk
A magnetic medium which has a number of surfaces (or disk platters) each divided into tracks and sectors. Data is read/written to and from the surface of a platter by a read/write head which floats above the surface of the disk. The disk rotates at high speed. To read a particular sector from the disc requires that:
• the head moves to a position over the correct track
• the head must wait until the disk rotates with the start of the sector under the head
• the head reads/writes the sector data.
Convention
♦ 'Disk' for magnetic media
♦ 'Disc' for optical media
The hard disk is the device for secondary storage on all PCs and is an internal unit. External hard drives are available and are often used for archiving or the backing up of data.
The hard disk is an electro-mechanical device. Read and writing the data is electrical but the positioning of the head to the correct track and waiting for the disc to rotate (the latency time) are all the result of a mechanical movement. The mechanical aspect has implications for the speed with which data can be retrieved and written to the device.
Optical devices - General operation
Like a hard disk, an optical disc is rotating at high speed. The disc consists of a protective plastic layer on top of a reflective layer (that looks like aluminium foil). The surface of the disc alternates between flat areas (called 'lands') and tiny depressions (called 'pits'). These two surfaces effectively encode the pattern of Os and 1s.
A laser is shone onto the disc and light that strikes a land it reflected back to a detector - light that strikes a pit is scattered. Unlike a hard disk, the data is written onto a single track divided into areas called sectors all of the same size. The speed of rotation of the disc is continually changing.
CD-ROM (Compact Disc-Read Only Memory)
Typically used for the commercial distribution of media files - software, audio and video/film. Typical capacity 600-800MB.
CD-R
A CD-R can be written to once and read many times. Capacity the same as for a CD-ROM. It is useful for the backup/archiving of data .
CD-RW
A CD-RW can be written to many times. Capacity the same as for a CD-ROM. It is useful for the backup/archiving of data.
DVD
Rapidly replacing the CD-ROM. Has a capacity approximately 13 times that of a CD-ROM.
Technology is similar to a CD-ROM but the DVD disc is multi-layered hence the increased storage capacity.
DVD-RW
A DVD-RW can be read and written to many times.
Blu-ray
Designed to eventually replace the DVD, Blu-ray discs store 25GB of data in each layer and are dualed. Hence they are used for High Definition (HD) media and games machines such as the Playstation 3. A Blu-ray player is becoming a standard household item to connect to the television monitor.
The media use a blue laser (replacing the red laser used with DVDs) which allows data to be stored with a higher packing density.
Until 2008 there had been two competing optical formats Blu-ray and HD DVD and it was the announcement from Warner Bros that it was to adopt the Blu-ray format that made it become the de-facto standard.
Solid-state Storage
A Solid-state Storage Device (SSD) uses solid-state technology to store and retrieve the data. Unlike a hard disk (which is an electro-mechanical device) the SSD is only electrical. The benefits which result from this are that the device is silent and not susceptible to shock (such as a hard disk).
SSDs are increasingly being used as the main secondary storage in laptops, netbooks and other mobile devices.
Flash memory cards/Pens
In widespread use and capacities of 4GB now common. Fitted in portable devices such as a smartphone or a digital camera and used extensively for transferring files between two PCs.
Buffers
We have already described a hard disk as being an electro-mechanical device - compared with solid state memory which is purely electrical (there are no moving mechanical parts). This has implications for the operation of the computer system.
The processor executes its program instructions on a time scale of microseconds (i.e. millionth's of a second).
The mechanical parts of the disk drive operation (rotation of the disk and the movement of the head) are on a time scale of milliseconds (i.e. thousands of a second.
Consider these tasks:
• the output of data to a printer - this could take several seconds to print an A4 document.
• the user keying in data at the keyboard - even slower!
This suggests that all stages of operation of the computer, i.e. input, output and storing data are much slower than the speed at which the processor can operate.
A buffer is a temporary storage area between the device (for example, the hard disk) and the processor. Buffers are used when there is a speed mismatch between the speed at which data can be processed and input/output.
When data is read from the disk we can never read just a byte or a couple of bytes. The operating system will organise its available storage space into 'allocation units' which will typically be two of the sectors on the disc - this is called a physical record. An allocation unit which is read could contain (for example) 10 of the customer records we are storing so we say that one physical record from the disk is storing ten of the logical records.
A read operation of the disk head will copy this allocation unit to the disk buffer. And the operating system will then sort out the logical records and make them available to the application program (for example, the database).
Data transfer between the buffer and the processor is only electrical and so the use of a buffer is effectively speeding up the transfer of data between the secondary storage device and the processor.
Double buffering
More sophisticated is the use of double buffering. When one of the buffers is having its contents read by the application program a second buffer can be filling up by reading data from the disk.
Print buffer
The buffering technique can similarly be applied to the output of data to a printer. Output is sent to a print buffer storage area and then the printer receives the data from the buffer. Double buffering would again speed up the operation.
Peripheral devices
A peripheral is any device which is not part of the Central Processing Unit. This includes any external input, output and storage device and also the internal hard disk.
Input devices
Keyboard
We expect to find a standard QWERTY keyboard on any PC. The keyboard may have a numeric keypad on the right hand side. Each key press generates the ASCII code for that character and the codes are stored in a keyboard buffer before transmission to the processor.
Concept keyboard
A keyboard device with a similar appearance to a touch screen. Different areas on the keyboard can be represented as a picture and each picture programmed to match a choice or action.
Mouse
Used by all computers with a graphical user interface. Original mice had the movement detected by the physical movement of a trackball, but newer mice use lasers and transit the movement signal wirelessly (rather that through a connecting cable).
Scanner
Most scanners are a photo-diode system which works on the following principle.
• A laser light is shone at the source document
• A moving mirror or prism moves the light across the source
• The light is reflected back; black areas reflect less light than white areas/bands
• A light sensor - typically a photo-diode - measures the intensity of the reflected light
• This level of reflected light is converted to an electrical signal which is encoded as a digital measurement.
Barcode reader
The following group of devices - barcodes, OMR and OCR - are given the description automatic data entry as the data capture is done with some form other than the keying of data from the user.
A barcode is a series of vertical black bars with variable spacing of the width of the bars and the White space gap between. The pattern of bars and gaps encodes the data value. The two coding systems in widespread use are the Universal Product Code (UPC), a variant UPC-E and the European Article Number (EAN).
A bar code is read by a peripheral device called a bar code scanner and there are variations:
• a horizontal flatbed panel - as used at the EPOS in a supermarket
• a hand held wand type scanner.
Optical Mark Reader (OMR)
Optical mark recognition uses 'marks' placed by the user at certain positions on a document. For example, the shading in one of a number of boxes coded (1 to 5) on a customer satisfaction survey form. The positioning of the marks on the data capture form is the method for encoding the data. The form once completed is scanned. Some applications will have the ability to scan a whole batch of completed forms at high speed.
Typical applications include
• the input of an entry into the National Lottery
• students complete a multiple choice examination where the answer paper is designed for the OMR entry of the responses.
Optical Character Reader (OCR)
Uses optical character recognition. A document contains a numbers of characters which are printed in a stylised font which can be read by a scanner.
Typical applications include
• utility billing - the invoice sent to the customer is a document in two parts. The customer will return the bottom part of the form with their payment. This returned form has data such as the account number, printed in characters which can be scanned and captured.
• The basis of any OCR software on a PC. A document is first scanned and captured as an image. Software then processes the image and converts its contents into separate text characters (which could typically then be edited by word processing software).
Graphics tablet
The user draw on a glass plate with a digital pen and the movement of the pen is captured by software and mirrored on the screen.
Typically applications include
• capturing a handwritten signature
• tracing the outline of a shape from a paper copy (the paper document would be first secured on the tablet).
Touch screen
The visual display can detect the touching of the screen and translates the input as (for example) a menu choice and follows it with some action.
The obvious benefit of this device is that it does away with the need for an intermediary device such as a mouse. Modern touch screens use one of two possible technologies:
Resistive - The screen consists of a number of layers, two of which come into contact as the result of a 'touch'.
Capacitive - the glass screen is coated with a layer of transparent conductor. Touching the screen causes the screen's electro-static charge to change and so its capacitance.
Typical applications include the primary communication for tablet PCs such as an iPad and smartphones such as an iPhone.
Radio Frequency Identification Reader (RFID)
An RFID chip or tag is embedded into an input device such as a plastic card.
• The RFID reader transmits a radio signal
• When the RFID tag comes into close proximity to the reader the signal from the reader activates (or 'energises') the tag
• The tag then transmits data to the reader by radio waves.
Typical applications include
• the identification of crates boxes of products in retail distribution (or even individual items)
• a microchip tag under the skin of a pet - when the tag is activated it sends data to a central database so allowing the identification of the (lost?) pet
• tagging of new born babies in a hospital (to avoid them being wrongly identified).
Output devices
Monitor or the Visual Display Unit (VDU)
Monitors using cathode ray tube technology are rapidly being replaced by flat-screen LCD and TFT technology monitors. LCD monitors have the benefitthat they use little power, but have the drawback that they are susceptible to temperature changes.
Laser printer
A laser is a page printer, i.e. it prints a whole page at a time. To print a page the following sequence is followed:
• the rotating print drum is negatively charged
• the printer generates a bitmap image of the page
• a laser beam is directed at the drum and removes the charge corresponding to the black areas of the image
• the toner is given a negative charge and is attracted to the positively charged areas of the drum
• toner is then bonded to the paper using heated rollers.
Typical application
The laser printer is the 'office workhorse'.
Dot matrix printer
A dot matrix printer has a print-head which moves laterally across the page and so prints a line of characters before advancing the paper to print the next line.
The print-head is made up of a matrix of pins and various combinations of pins form the different characters. The clarity of the printing will increase as the number of pins forming the matrix is increased. The pins strike a carbon ribbon which then impacts the character onto the paper.
Typical application
Although noisy and lacking in quality they are still in office use as their impact way of working makes them suitable for printouts which require one or more carbonised copies printed concurrently.
Inkjet printer
A print-head squirts coloured ink- black, cyan, magenta and yellow - onto the page from a piezoelectric crystal. Combinations of these four colours produce the coloured output.
• A heater behind the ink reservoir warms the ink.
• This causes droplets of ink to vaporise and a small blob of ink is forced out onto the paper
• The print-head moves laterally across the width of the page and then prints the image line-by-line. The ink dries on the paper before it is removed from the printer.
Typical application
Inkjet printers are in widespread commercial and home use for producing photo-quality printouts.
Plotter
The most common type is a jlatbed plotter. A sheet of paper is placed on the flat surface and a carriage mounted with pens of different colours moves above the paper. The carriage can move both horizontally and vertically so enabling the pens to be positioned anywhere on the page.
Typical application
Production of CAD drawings.
Speakers/Headphones
A loudspeaker is an analogue device and so the digital signals representing the sound wave must first pass through a digital-to-analogue converter before they are received by the loudspeaker.
Typical applications include
• the playback of media files
• signalling a warning message from a software application.
Storage devices
These can simply be summarised here as:
• an internal or external hard disk
• a variety of optical media storage devices