CS33 : The CPU

The Central Processing Unit (CPU) is the brains of the whole outfit. In this section, we look carefully at different computer architectures, the structure and role of the CPU, how it fits into the running of the computer and also factors which affect it's operation (i.e. make it go faster!)

We are learning ...
  • To explain the role of the CPU
  • About the Fetch, Decode, Execute cycle
So that we can ...
  • Show an understanding of the Von Neumann model for computer systems
    - Stored program concept
    - Contrast with Harvard architecture for embedded systems
  • Explain the role and operation of the main memory and processor components
    - Arithmetic logic unit (ALU)
    - Control unit (CU)
    - Clock
    - System bus
    - Special purpose registers (MAR, MBR, PC, ACC)
    - Cache memory
  • Describe the stages in the Fetch, decode, execute cycle
  • Show an understanding of interrupts
  • Understand that processors execute machine code and each type of processor has its own specific machine code and instruction set
  • Describe how the characteristics of the CPU affect its performance
    - Clock speed
    - Cache type / size
    - Number of processor cores
  • Graphics Processing Units (GPU)

CGP The Revision Guide Page 2, 3, 5
CGP Exam Practice Workbook Page 5, 6, 8

# Get Ready.png

Activity 1
Computer architectures 

There are two main types of computer architecture each suited to different computational applications.

Click to engage. Image originally from IT Hare.

Task 1.1 Comparing Harvard and von Neumann Architecture
Where we learn about the differences and similarities between the two computer architectures


Read the following passage carefully before you carry out the activities which follow.

Harvard architecture machines are generally found in embedded or fixed program computer systems. These systems often contain a pre-programmed microcontroller containing firmware which carries out one specific role very well and uses a separate, volatile memory chip to store environmental data to assist the microcontroller to carry out its processes. The fixed program on a Harvard architecture machine is very hard to change.

On the other hand, von Neumann architecture machines (note the lower case 'v') are much more flexible and allow the programs to be changed easily and frequently. The data occupies the same storage area as the currently running programs and the allocation can be controlled by a general purpose operating system. The von Neumann architecture is found in desktop and laptop computers, phones and tablets.

Watch the video

Get your headphones on and watch this video ...

He sounds familiar ...

Answer these questions

Using a word processor, make some notes on these two different computer architectures. Use the following questions to help you structure your response.
  1. What is an embedded system?
  2. What sorts of devices do you find embedded systems in?
  3. Why do you think an embedded system is sometimes called a 'fixed program' system?
  4. Embedded systems generally have a Harvard Architecture. Do some research and find out what this computer architecture is named after.
  5. Traditional desktop and laptop computer systems have a von Neumann architecture. Find out who this is named after and what he was famous for (apart from this computer architecture).
  6. Describe the difference between the two different computer architectures.

Activity 2
Processor components 

Before we look closely at the way in which a Central Processing Unit (CPU) operates, we need to learn about the different components present in a simplified CPU and what their jobs are.

Task 2.1 Components of a CPU
Where you learn about the different components in a CPU and their functions

Watch the video

Get your headphones on and watch this video ...

Who is that crazy guy?

Copy this diagram

If you haven't already done this, copy this diagram onto the centre of a piece of A4 paper.

The main components of a Central Processing Unit
Add Input / Output devices to the right of memory with I/O controller and buffer.

Add the label headings to your mindmap to explain the abbreviations

Add the following headings to your diagram ...
  • Current Instruction Register (CIR)
  • Program Counter (PC)
  • Accumulator (ACC)
  • Memory Address Register (MAR)
  • Memory Data Register (MDR)
... and perform some research using your favourite search engine to find out what they do. Add these explanations to your diagram but make sure they make sense! Do not "copy and paste" if you don't understand!

Also, make sure you add a reference to the website to your annotation so I know where you've got it from!

Annotate your diagram

Grab a copy of or download this crossword puzzle (limited educational value, I know) and use it to annotate the diagram you have drawn on the A4 paper. You need to learn what these different components do.

Activity 3
Fetch, decode, execute 

When the processor executes a program, it does so using a very specific method called the Fetch, Decode, Execute cycle. The steps in the Fetch, Decode, Execute cycle use the components of the CPU in a very specific way.

Task 1.1 The Fetch Decode Execute Cycle
Where we learn to recall the steps in the FDX cycle so we can remember it in the exam!

Review the diagram

Look at the following diagram very carefully. You should already have got a copy of this in your notes.

Click to engage

Practice makes Perfect

Now take a blank sheet of paper and make yourself a Learning Game / Card Sorting activity to help you remember the FDX cycle. Grab yourself an envelope to put your card sort in and make sure you practice it until you don't get it wrong!

Wow - this is helping me remember!

Task 1.2 Simple turtle graphics
Where we learn how to program a mechanical turtle using a simple instruction set

Complete the worksheet

Instruction sets are simply instructions encoded in binary. Download and complete A Turtles Challenge and hand it into your teacher for assessment.

Activity 4
Factors affecting processor performance

Processors are very complicated things and as such, there are many different factors which affect it's performance.

Task 4.1 The 'X' Factor
Where you learn about the different factors which affect the performance of a processor.

Create a table

Create a table on a word processed document with the following structure ...

... in each column write about ...
  • what is the impact on the speed of the computer;
  • why does it affects the speed of a computer;
  • something good (plus) about the factor;
  • something bad (minus) about the factor;
  • something interesting about the factor.

What about clock speed?

Clock speed is a measure of the number of operations that a CPU core can carry out per second. Perform some research on "cpu clock speed" on Google and use what you find to complete the first row in the table.

More cores, vicar?

No CPU can carry out more than one job at a time. However, if you put more processing cores in a CPU, and the software you run supports it, the CPU can process data in parallel which greatly increases it's performance. Again, perform some research on the World Wide Web on "multicore processors" and use this to complete the next row in the table.

Cache, Johnny?

Cache memory is designed to store recently used instructions to prevent them having to be continually fetched from the main memory. The type and quantity of Cache memory on a processor massively effects it's performance. Again, perform some research on the World Wide Web on "processor cache" and use it to complete the third row in the table.

This is quite useful as well!

GPU's aren't just for playing games, you know!

Graphics Processing Units (GPU) are dedicated, massively parallel processors, usually on an add-on board which are specifically designed to perform intensive data processing.

Firstly, get your headphones on and watch these videos ...

CPUs vs GPUs As Fast As Possible (5:59)

Mythbusters Demo GPU versus CPU (1:23)

Now, read more about the applications of GPUs on the NVIDIA website and then complete the last row in the table.

Assessment Task (Homework)

Watch this video and make some notes for your folders. It's a great summary of the unit and will be an excellent 8 minutes of revision when you get closer to the final exam!

How do computers work? (8:20)

Grading rubric
MASTER : You have made some really detailed notes about the FDX cycle including lots of things you learnt during the rest of the lesson. I could have used your notes to help me teach - in fact why not have a go yourself!
APPRENTICE : You have used the structure of the video to make your notes. They are detailed but don't really reflect your own personality or learning styles.
NOVICE : You've just copied stuff. No point really, I'm not sure how much has gone in. Meh.

# Flash cards.png
Click to load key word list to help you make your own flash cards 

Hungry for more?

The image of the rabbits is from a blog called IT Hare, which has lots of really interesting articles (though some are probably a little too complex for some of us mere mortals).