CS30 : Looking under the bonnet ...

In this modern world of computing, it's easy to forget that a) it didn't always used to be like this and b) there is a lot more going on 'under the bonnet' than first meets the eye (or ear).

We are learning ...
  • About computer hardware
So that we can ...
  • Describe the fundamental types of computer architecture
    - Von Neumann and Harvard architectures
  • Describe the different components of a computer system and how they relate to each other
    - Processor
    - Main memory (1° storage) including different types (RAM, ROM, cache)
    - System bus (address bus, data bus, control bus)
    - I/O controllers
  • Virtual memory
  • Caching
  • Explain the concept of memory addressing and how it operates
  • Describe the different components of the processor and their functions
    - Arithmetic logic unit
    - Control unit
    - Clock
    - Dedicated registers (PC, CIR, MAR, MBR, SR)
    - General purpose registers
  • Describe different processor architectures and the way it's affects performance.
    - Multicore processors / parallel processing
    - Cache memory
    - Clock speed
    - Word length
    - Address bus width and it's effect on maximum addressable memory
    - Data bus width
    - Pipelining
  • State the meaning and applications of CISC and RISC systems
  • Describe the purpose of GPUs in graphical and non-graphical applications (modelling / data mining)
    - Explain the benefits of GPUs (specialist instructions, multiple cores and SIMD processing)

Let's get started ...

Before we start thinking about the theoretical structure of computer systems, ask your teacher if they have any AOpen MX46-533v Motherboards in stock. If they do, have a look in conjunction with the following image ...

Click to enlarge

... and the AOpen MX46-533v User Manual and the full schematic. Pay particular attention to the location of the Central Processing Unit (CPU), the Northbridge chip (SIS651, under the heatsink) which controls the interface with the memory and high speed graphics port and the Southbridge chip (SIS962) which controls all input / output operations.

Activity 1 Fundamental architectures

There are two common types of computer architecture - Harvard and von Neumann.

Harvard Architecture

In a Harvard architecture machine, there is separate data and instruction memory allowing both the instructions and the data on which the instructions are performed to be fetched simultaneously through separate channels or busses. Both memories have address busses onto which memory addresses are placed and data busses onto which instructions / data is placed.


Clearly, this has performance benefits due to increased bandwidth and Harvard architecture machines find use in high performance embedded applications like Digital Signal ProcessingThe term originated from the Harvard Mark I relay-based computer, which stored instructions on punched tape (24 bits wide) and data in electro-mechanical counters.

Von Neumann Architecture

Von Neumann machines have only one memory area and hence a single bus connecting this to the central control unit. Clearly, there is no way that instructions and data can be fetched at the same time and transfers must be scheduled which leads to an inevitable reduction in performance. Architectures like this are useful where compiled code embeds data within the instructions or where it is necessary to write to the instruction space for example, in the case of self-modifying code.

These "stored program concept" machines are easily reprogrammable - they are the general purpose machines which we use every day. The first ever machine produced with this architecture was called the Manchester Small Scale Experimental Machine (MSSEM) or the 'Baby' for short. The Baby was a prototype for the first commercial stored program concept computer, the Ferranti Mark 1.


Task 1.1
 History - there's no future in it!

Research the Harvard Mark 1 and the Manchester Baby and use this to demonstrate your understanding of both Harvard and von Neumann architecture machines. You can also visit the Replica Baby at the Manchester Museum of Science and Industry on Tuesday, Wednesday, Thursday and Sunday if you fancy a day out!

Present your findings in as inventive a form as you can, maybe a dance? If you can't choreograph one, how about a single page summary for your notes?

OUTCOME : Demonstration of your understanding.

CISC and RISC architectures

The term RISC stands for Reduced Instruction Set Computer whereas CISC stands for Complex Instruction Set Computer. As you can imagine, there are considerable differences between the two in terms of programming and execution and they are suitable for different environments.

Task 1.2


Read through the following article from Stanford University CS department which succinctly explains the difference between RISC and CISC. Copy the table contrasting the two different approaches into your notebooks.


Now watch this video and add any extra comments to your notes which you might feel necessary. There are also comments in this video about "Pipelining" which is on the A Level Only part of the specification.

A level CISC vs RISC (4:44)

OUTCOME : Comparison between RISC and CISC computer architecture.

Operating systems which use reduced instruction set architectures are actually more popular than you might think, especially for embedded systems. Early RISC architectures were adopted by Acorn Computers LTD from Cambridge who designed personal computers specifically to run on the ARM chipsets. They developed their own operating system called RISC OS specifically for these machines. Luckily for us, the RISC operating system is now open source and is available to download for all sorts of ARM based embedded systems.

The Acorn Archimedes A3020 cost £799 in 1992!

Graphics Processing Unit (GPU)

A Graphics Processing Units (GPU) is a specialised processor which is designed to perform simple processing operations on a large quantity of data very quickly. Contrast this to a standard Central Processing Unit (CPU) which is designed to perform complex processing on small data sets.

Borne from the need for specialist programming for games / graphics rendering, GPUs can have anything from 8 to over 5000 individual processing cores, each capable of performing many millions of operations per second

Activity 2 Components of a computer system

The main three components of a computer system are the Central Processing Unit, the primary / immediate storage (memory) and some form of input / output controller. These are linked, naively, by a single system bus.

The "Three Box Model" of a computer system

Task 2.1
 Enhanced three box model

The "Three Box Model" of a computer system is extremely simplistic because it does not tell us exactly how the different component communicate with each other. To remedy this, the diagram below describes an enhanced model. Click the image to enlarge it and look carefully at the components and how they connect together.

Click to enlarge

The system bus in the simple three box model is now split into three separate busses ...
  • The ADDRESS BUS which carries memory addresses from the CPU to the separate components;
  • The CONTROL BUS which carries control signals to and from all components;
  • The DATA BUS which carries data signals from INPUT controllers, to OUTPUT controllers and to and from other components as necessary.

... the input / output controllers are now split into ...
  • Keyboard INPUT controller with its associated I/O Port;
  • Visual Display Unit OUTPUT controller and its associated I/O Port;
  • Disk INPUT / OUTPUT controller with its associated I/O Port.

How on Earth are you going to remember this? Using good old 'cut and tack' of course! Download the activity sheet Enhanced Three Box Model from the lesson resources (or by clicking on the link). Make sure that you print the activity sheet single sided on white card. If you don't know how to do this, ask your teacher. You will also have to ask your teacher for an envelope to store your components in so they don't get lost. You might need to use little bits of tack to stick down the components to stop them blowing away ...

OUTCOME : Enhanced three box model kinaesthetic activity.

All this cutting and tacking is all well and good but how do we know what the components actually do? Through discussion with your teacher during the last task, you will probably have heard / talked about the functions of all the components but probably not written anything down. Now is your chance ...

Task 2.2
 Mind map

Either on paper or using a suitable mind mapping software application, create a mind map containing definitions for the following terms ...
  • Central Processing Unit
  • Addressable memory
  • Immediate Access Store
  • RAM
  • ROM
  • Cache memory
  • System bus
  • Address bus
  • Control bus
  • Data bus
  • Peripheral
  • I/O Controller
  • I/O Port
  • Secondary storage
OUTCOME : Mind map of definitions of components

Activity 3 Processor architecture and it's affect on performance

Watch the following video about the Intel 4004 - the Worlds first commercial microprocessor.

3 Minutes On ... The Intel 4004 Microprocessor (3:18)

Clearly, even early microprocessors like this have many thousands of interconnected components so it's difficult to simplify their operation and for the architecture to still make sense, however, the following massively simplified diagram of a general purpose processor contains all the major components ...

I'd print this diagram out for your notebooks if I were you :)

Notice the vague link with the enhanced three box model that we met earlier through the colours of the three busses which make up the system bus.

Task 3.1
 Processor components match up exercise

Match up the following statements to the correct component in the diagram. Write out the definition on a Post It note and stick it in your notebooks.

  1. Can be used by the programmer to store data as needed
  2. Contains the next addressable memory location
  3. Carries out mathematical and logical operations
  4. Carries memory addresses to the memory controller
  5. Instructs the Program Control Unit how to execute the current instruction
  6. Used to transfer data to and from the memory
  7. Holds the content of the currently addressed memory location
  8. Holds the opcode of the current instruction
  9. Carry control signals to and from all components in the system
  10. Contain components which allow the Program Control Unit to send signals along the Control Bus
  11. Stores single bit condition codes which indicate the outcome of the last calculation carried out by the Arithmetic and Logic Unit
  12. Holds the currently addressed memory location
  13. Provides a timed pulse to keep all components synchronised

OUTCOME : Correct definitions for processor components

Focus on the Status Register

OK - here's one of the answers for Task 3.1 if you've read ahead! The Status Register stores single bit condition codes which indicate the outcome of the last calculation carried out by the Arithmetic and Logic Unit (ALU) or, in some cases, switches which allow us to control the behaviour of the processor. The following is the structure of the Intel 8086 16 bit status register, sometimes called the flag register (in case you research it) ...

Intel 8086 16 bit Status / Flag Register

Seven of the sixteen flags are not used by the 8086 processor whilst, out of the remaining nine, three are used as control flags (indicated with a switch) and six are used as condition / status flags (indicated with a light bulb).
  • Control flags can be set / reset by the programmer and force the processor to carry out certain tasks.

    TF : The Trap flag. When set, the processor is forced to operate in single stepping mode, pausing after each instruction is executed. This is useful during developing and debugging.
    IF : The Interrupt flag. When set, forces the processor to handle 'maskable' hardware interrupts.
    DF : The Direction flag. Controls the direction of string handling operations.

  • Condition flags are set / reset by the processor to indicate occurrence of certain events.

    CF : Carry flag. Indicates a carry operation occurred out of the accumulators most significant bit.
    PF : Parity flag. Set to 1 if the result of the last operation has an even number of 1's, set to 0 otherwise.
    AF : Auxiliary carry flag. Indicates a carry operation occurred out of the accumulators 4 lower order bits.
    ZF : Zero flag. Set if the result of the last calculation is zero, cleared otherwise.
    SF : Sign flag. Set equal to the higher order bit of the result, 1 if negative, 0 if positive.
    OF : Overflow flag. Set if the signed result cannot be expressed within the number of bits available.

Task 3.2
 The Status Register

There's probably a lot of stuff here which is confusing, I understand that. However, remember what our friend said - "the Status register is just like a set of switches and indicator lights". With that in mind, simply make some notes on this section in your notebooks / folders. Simples.

OUTCOME : Notes about the function of the status / flag register

Factors affecting processor performance

Finally, a quick look at the factors which can affect the performance of processors. Most of these are fairly self explanatory, however, you may need to engage in some discussion with your teacher of some of the more theoretical ones.

Isn't that an analogy?

Task 3.3
 Processor Performance Analogies

For each of the following factors, I've given you a simple analogy to help you to decide how and, most importantly, why it will affect the performance of a microprocessor. Use the analogy to explain your reasoning in your own words. Remember to explain the effect in terms of a CPU, not an orange (or any other fruit for that matter).
  • Multiple cores / Parallel processing : One person doing your shopping versus a team of people doing it.
  • Cache memory : Having a pad on which you write down all the most important facts you need.
  • Clock speed : If I play a song at twice the speed, it finishes sooner.
  • Word length : If I eat more of the cake with each bite, I'll finish it sooner.
  • Address bus width : If I open my eyes wider, I can see more of the world at once.
  • Data bus width : If I buy in bulk, I won't need to go back to the shop as often.

OUTCOME : Explanation of factors affecting processor performance via analogies.

Extension Activities 

This is all pretty high end / low level (oxymoron) stuff to be honest and I think that if you wanted to develop your understanding of Microprocessor architecture, you'll have to spend a LONG  time researching, reading and trying things out. I would focus on the Intel 4004 microprocessor - it seems a good place to start seeings as it was the first commercial microprocessor an' all! It could be a nice project idea ...

What's next?

Before you hand your book in for checking, make sure you have completed all the work required and that your book is tidy and organised. Your book will be checked to make sure it is complete and you will be given a spicy grade for effort.