How Computers Work

The operation of modern computers, especially when running programs that are recursive, is fascinating and educational, but generally very hard to learn except by studying high-level Computer Science (indeed even many contemporary undergraduates of Computing never learn about compilation, machine code, and recursive memory management). This poses a potentially serious problem for the academic or student philosopher who – perhaps inspired by the ideas in this website – wishes to achieve a deep understanding of computers. But the problem has a solution, provided by the Turtle Graphics Programming systems on this website.

The most distinctive feature of these systems is that they contain a genuine compiler which translates the typed "source code" program (in Pascal or Java syntax) into a sequence of numbers constituting a pseudo-machine-code program (so-called "PCode") running on a virtual "Turtle Machine". When the program is run, it is these numeric PCode commands (rather than the source code statements) that are executed, exactly as though they were being performed on a real Turtle Machine (i.e. a computer whose central processor chip is designed to respond directly to those numbers in an appropriate way). Moreover the system's "visual compiler" allows the PCode commands to be inspected directly – translated if desired from pure numbers into more comprehensible "assembler mnemonics" – and also allows them to be recorded (together with important memory storage information) in an instruction-by-instruction "trace" as the program is executed. Not only do these features enable users to learn easily about the general concepts of machine code and compilation (including lexical and syntax analysis), but also, the simple Turtle Machine architecture provides an exceptionally straightforward way of learning about the complexities of Heap and Stack memory manipulation, and variable and parameter handling, which are central to the performance of any modern recursive programming language.

Full details of these features, together with tutorial materials designed to introduce them in a friendly and accessible manner, are provided in the comprehensive online Help that is provided with these systems.

John Von Neumann

John Von Neumann

Devised stored program computer architecture