CPU Role Play for Children (teaching computer hardware in primary schools)

In the last years, a large number of educational toys to teach kids programming and robotics have appeared on the market. While many are great tools to introduce children to computer science, none of them seems to be helpful in explaining the hardware which makes this complex toys work. But learning to program a computer without any knowledge of how a computer works internally is not satisfying for children. Like this, the computer remains a magic black box.

But unfortunately the hardware of modern computers is so enormously complex that most educators don‘t even try to teach kids how all this works. In my last blog post I have sketched a strategy and methods how this could be achieved in general.

In this post I want to present a method to teach the inner workings of a CPU (Central Processing Unit, the heart of a computer) to primary school children. It addresses one specific abstraction layer mentioned in my last blog post. The idea is to make a group of children play the different modules of a CPU (like ALU, registers, data and address bus, control unit, RAM etc.). This idea is probably not from me, I have found vague descriptions of similar school projects in the internet. But there was no detailed material available to read / download. Therefore I decided to create my own CPU role play and make it available for others to use. To be precise, it should be called microcontroller role play, as the RAM is also part of the play (which is not part of the CPU). But I will stick to “CPU Role Play” in the following.

I am not a CPU designer, my knowledge of CPU architecture is very limited. So if you know more about this topic, you are invited to have a look at this project and help me to improve it. Any feedback (ideas, bug reports, suggestions for improvements etc.) is most welcome.

It is helpful if the children are already familiar with the basics of electronics (digital electronics if possible) before playing the CPU role play. Also they should understand the binary number system (representing numbers, addition). We have tested the role play with the school class (10 years old) of a teacher friend of mine. It worked surprisingly well, but 10 is probably the lower age limit. 12 years is most likely ideal.

The CPU role play requires about 2 lessons. The group should consist of around 7 children and needs one supervising adult. Therefore you might have to organize teaching only half of your class (or organize help from other teachers or external persons, e.g. a retired software engineer).

The two lessons consisted of the following elements

  1. Explaining the workings of a CPU in about 15 minutes
  2. Looking at an old (!) microcontroller under the stereo microscope
  3. Playing the CPU role play in the group

In 1. we explained how a very simple CPU is executing programs. We identified the different modules (ALU, control unit, registers, RAM memory etc.) and explained what they do.

2 Helps to see that CPUs really exist and that they have incredibly small structures! You will need to buy a really old microcontroller from the early 70s on ebay (in later models its difficult to see the structure under a stereo microscope due to their high integration). Ideal are microcontrollers which have a glass window over the chip (for erasing their EPROM memory using UV light) like the intel 8749.

We tried to identify together some of the larger modules described in 1. (e.g. RAM).

microprocessor under stereo microscoope

Now to 3., the actual CPU role play. Note that this is a completely uncreative activity. The children will simulate a machine together!

Each child gets a role card which describes what it has to do. The child playing the RAM (Random Access Memory) gets the program (starting at the memory address 0) and initializes some data memory cells with initial values. The RAM-child keeps track of the memory content using a piece of paper and a pen. Then the Control-Unit child is told to start doing what is written on its role card. From now on, everything should work „automatically“. Of course the teacher has to intervene whenever a child makes a mistake (otherwise you will harvest confusion and wrong results). Every 2–3 commands the role cards are rotated among the kids, such that each child is operating at least once in each role. This is important because some roles are challenging — like the Control Unit — while others are very easy (e.g. the address bus).

As program I wrote some code which is calculating the Fibonacci numbers (1,2,3,5,8,13,21,…). This is simple enough to allow the really slow „human CPU“ to calculate something, but still a meaningful result.

The nice thing about the CPU role play is, that the children will understand quite quickly how a CPU works in detail and this with very little prior explanation.

You can find all the material for the role play on my GitHub account here (in German for now, English will follow soon).

[Added 23.9.19: The English version is also available on the GitHub account above]

cpu role play on blackboard

Title image: Shutterstock / LumineImages
Other images © author


Follow me on Twitter to get informed about new content on this blog.

I don’t like paywalled content. Therefore I have made the content of my blog freely available for everyone. But I would still love to invest much more time into this blog, which means that I need some income from writing. Therefore, if you would like to read articles from me more often and if you can afford 2$ once a month, please consider supporting me via Patreon. Every contribution motivates me!