In this kinesthetic activity students act out the roles of the Arithmetic and Logic Unit (ALU), the CPU, the memory, and the display as they act out how these basic hardware components function by "running" sample programs. This is a great way of introducing the basic concepts before moving on to more advanced machine architecture. You can download the following sheets:
This activity was created by Gary Kacmarcik from cse4k12.org and is licensed under the Creative Commons CC-SA licence.
The Little Man Computer (LMC) is a software simulator of a simple computer with a CPU, memory, and a basic instruction set. Students can enter programs in either assembly language or machine code and follow their execution by watching the change state of the program counter, accumulator, and memory. More advanced versions show animated representations of the address and data lines too. The LMC is a great tool for helping students visualise how code and data are represented in memory and how the fetch-execute cycle works.
There are now many versions of the LMC available. Some of the best include:
- Little Man Computer (Flash version) which runs in the browser
- Little Man Computer (Java applet) which runs in a web browser (Java plugin needed)
- Little Man Computer (Windows version) for Windows with .NET installed.
The CS Field Guide has a very comprehensive guide to different types of programming languages. These range from very high level graphical languages such as Scratch, down to assembly language and machine code. The differences between each language type are clearly explained. There are also lots of interactive elements to try, including a MIPS assembler and simulator to allow students to try assembly language without risk of damage to their machine.
There are several assembly language simulators available for use online. Simulators offer the advantage of a risk-free environment to practise programming, plus a quicker development cycle compared to restarting a crashed machine. Excellent assembly language simulators include:
In addition to helping understand assembly language, most of these simulators also offer a view of memory and register status, allowing pupils to get a better understanding of the fetch-decode-execute cycle too.