Skip to content

Foundations

From Source to Silicon

How source becomes instructions, what translation costs, and how to investigate performance.

Begin — Unit 01 →

What this is

You write SHOW "Hello". What makes the computer carry it out?

We follow three routes: an assembler turns assembly source into machine code; a native-code compiler turns higher-level source into machine code; an interpreter reads a stored program and carries out its operations. In every route the processor executes machine instructions. What differs is how we describe the program and which work the tools do before and during execution.

Source is what we write and edit. Machine code is instructions encoded for a processor. Compilation is a translation process that can produce machine code. We will keep those meanings separate, then investigate how the route we choose affects the work a program performs.

By the end you can trace a translator built from lookup lists and loops, including what it does when a name is unknown. This is teaching notation to follow on paper, not a program to paste into a particular computer.

Who it’s for

Anyone wondering what happens between writing a program and running it, or how BASIC, assembly and compiled languages relate to the processor.

You will use short lists, a loop and an IF question. List positions start at 1; we recall the lookup as we use it. Structure offers more practice, and Counting in Twos explains binary and bytes. Prior attendance is not required. BASIC and assembly remain independent ways into a system track.

What it is not

This is not how to write assembly. Not one real instruction for one real machine. That is Meet Assembly, in your machine’s own words, once you have picked one. Here we stay a level up: what kind of thing an interpreter is, what kind of thing an assembler is, and how translation, implementation choices and the target can affect the work a program performs.

The shape

  • The program is not what runs — source, machine code and three routes to execution.
  • Translating as you go — the interpreter, and the work it repeats inside a loop.
  • Translating once — two routes to machine code, and a toy assembler we can trace.
  • What speed costs you — diagnostics, explicit detail and portability.
  • Put it on the clock — comparable work, deadlines and the clock behind a measurement.

From here the road goes into a real machine, where the numbers stop being made up.