Learning Objectives:
- State the purpose of the CPU
- Describe the function of the CPU as fetching and executing instructions stored in memory
- Understand the concept of machine code instructions
Suggested time: 50 mins
Starter:
I started with an activity, courtesy of CS Unplugged, which provides students a basic understanding of how computers work by having them act out a simple computer simulation.
Each student takes on the role of a different part of a simplified computer (CPU, ALU and Display) and, working in groups of three, run a simple program. The end result of this program is to draw a picture on a simulated computer display.
You download the activity here: http://cse4k12.org/how_computers_work/index.html
I showed students a CPU, left over from the first lesson, and explained to students that, in the starter activity, they simulated what goes on inside the CPU (All be it at a very basic level!). I then explained that we would be taking a deeper look inside the CPU using a simulation called Little Man Computer (LMC). - http://www.yorku.ca/sychen/research/LMC/LittleMan.html
http://www.eastaughs.fsnet.co.uk/cpu/execution-fetch.htm
http://community.computingatschool.org.uk/resources/95#post_18284 (Requires you to sign up – FREE)
After discussing the sample program with the class, I then showed them the LMC reference sheet (See attached) and explained the different instructions.
Finally, I challenged the students, using the reference sheet and what they had learnt, to write a program to add 3 numbers and execute it in the LMC simulator. As an extension, I asked some students to write a program to add and subtract a number or to write a program of their own.
Extension: If you are feeling really brave, you could ask the students to convert the instructions from machine code to binary.
Resources:

cpu_lmc_worksheet.docx |
I finished by playing a game of CPU dingbats (See attached). This version is based on a starter activity shared via CAS by John Bilton. (Original version can be found here: http://community.computingatschool.org.uk/resources/1314). Once the students had guessed the answers correctly, I explained to them that their homework was to research each of the three keywords (Clock Speed, Core and Cache Memory) and to explain how these effect the speed of the CPU. I asked the students to use their revision wikis to record their findings.

cpu_dingbats_plenary.pptx |
Suggested time: 50 mins
Main task:
Following on from the previous week’s lesson, I asked students to load TouchDevelop (www.touchdevelop.com) on their computers and sign in with their google, microsoft or yahoo id.
Once logged in, I directed the students to the TouchDevelop Challenge website (www.touchdevelop.weebly.com) and challenged them to attempt lesson 2 of the TD Challenge (http://touchdevelop.weebly.com/td-challenge.html).
Plenary:
To finish the lesson, I asked the students to swap seats and invited them to try out each other’s scripts - giving feedback where appropriate.