top of page

A gentle introduction to the Central Processing Unit and Assembly language

Based on (and in support of) the complementary Educational CPU Visual Simulator

simulator GIF

This e-book aims to illustrate the basics of how a computer works, focusing on how a program written in a high-level language ends up being physically executed on a Central Processing Unit (CPU). The e-book is intended to be used in the context of an introductory computer science course at high school or undergraduate level.

 

The e-book starts with a concise explanation of the fundamental architecture shared by a wide variety of modern "computers", such as desktop computers, mobile phones or car control units. This is followed by an explanation of the essential elements of the structure of any CPU, and the machine (assembler) language that it can execute. The e-book is based on the associated Educational CPU Visual Simulator pictured on the left, which readers are encouraged to download in order to experiment and carry out the proposed programming exercises.

​

The associated Educational CPU Visual Simulator allows users to visualize with detailed animations the execution of assembly language code. Its main goal is to support novices in understanding the behaviour of the key components of a CPU, focusing on how code written in high-level languages is actually executed on the hardware of a computer.
It supports a simplified but representative assembly language of 16 (Data Transfer, Control Flow, Arithmetic-Logic) instructions, with immediate and direct addressing modalities. Instructions and numeric data can be inserted and edited directly in RAM. It is possible to define “labels” to be used as parameters in jump instructions, or as variable identifiers. The speed and level of details of the animations can be controlled by the users. At any time, it is possible to switch between symbolic and binary representations.

                                                            CC BY-NC-SA 4.0                                                                                              Credits

bottom of page