The full story
The episode's narration, word for word. Numbers link to the sources below; timestamps play that moment.
The question 0:00
Here's a complete piece of a program, three lines long 1. It takes two numbers, a and b, and hands back their sum. You can read it. But the processor in your laptop can't read a single word of it, because a processor only runs instructions stored as numbers 2. So how does code you can read become something a chip can run? Let's follow one small function all the way down.
What the chip actually reads 0:28
In the Silicon series, we met the loop every processor runs: fetch the next instruction, work out what it asks for, carry it out, step on 2. Each instruction is tiny, like add two numbers, or copy one from memory 2. The numbers being worked on sit in registers, a handful of small, fast storage slots inside the chip 2. The full menu of instructions a family of chips understands is its instruction set, and a program written directly in those numbers is called machine code 3,4.
Hand-to-hand combat 1:03
Before 1954, almost every program was written in the machine's own numbers, or in short abbreviations standing for them 5. John Backus, who later led IBM's Fortran team, called it hand-to-hand combat with the machine, and IBM's history adds that the machine often won 6. Programmers usually cost at least as much as the computer itself 6,5. And a quarter to half of the computer's own time went on hunting for mistakes 5. Here's what our little function becomes.
Thirty-two bits 1:36
Compile it for the Arm chip in an Apple silicon Mac, and the whole function becomes two instructions, each a thirty-two-bit number 1,7. The first eleven bits say: this is an add, on thirty-two-bit numbers 8. Two five-bit fields name the registers that hold the inputs, and the last five bits name the register for the answer 8. By Arm's own rules, a arrives in register zero, b in register one, and the answer leaves in register zero 9. The second just says return 1. The adding itself is done by logic gates, like the adder in Silicon episode seven 10.
Same code, different chip 2:17
Now compile the same three lines for x86-64, the instruction set in Intel and AMD processors 11,1. You get four bytes instead of eight 1. The first instruction was built to calculate memory addresses, but the compiler borrows it to do our sum 12,1. The inputs even arrive in different registers 13. Machine code only makes sense to the family of chips it was made for 3.
Names instead of numbers 2:46
The first fix was to give the numbers names 4. From 1946, Kathleen Britten, later Kathleen Booth, worked with Andrew Booth at Birkbeck College in London, where they were building their own computers 14,15. She's widely credited with inventing assembly language, where each instruction is written as a short symbol instead of a number; it first appears in a 1947 report she wrote with Andrew Booth 4,15,16. At Cambridge, on last episode's EDSAC, David Wheeler's loader, the initial orders, turned one-letter codes into instructions as the tape was read in 4,17.
The assembler 3:26
A program that turns those words into numbers is called an assembler 4. Feed our two lines of Arm assembly to a modern assembler, and out come exactly the same two numbers the compiler made 1. But here's the catch. Assembly is usually one line per instruction, so you still choose every register and every step yourself 4. And it's still tied to one family of chips 3,4.
Let the computer write it 3:53
Grace Hopper wanted to go further. In 1951 and 1952, working on the UNIVAC computer, she and her team created a system called A-0 18,19. You listed codes for ready-made routines, plus the numbers they should work on, and A-0 stitched the routines together into machine code 18,19. The computer did the tedious part of programming itself 20. Hopper later recalled that she had a running compiler and nobody would touch it, because computers, she was told, could only do arithmetic 20,21.
Was it a compiler? 4:29
So was A-0 the first compiler? It depends on what you count. The IEEE milestone that honours it, dedicated in 2024, says A-0 worked like what we'd now call a linker or loader, joining prepared pieces of program together 20,22. Her team called it a compiling routine, and Hopper is often credited with coining the word compiler 20,19. And Backus, looking back, listed other early work from 1950 to 1952, and one classic history credits Alick Glennie's Autocode as the first real compiler, even though A-0 was finished first 5,19. Who came first is still argued about 5,19.
Formula translation 5:13
At IBM, from 1954, John Backus led a small team building Fortran, short for formula translation, for the IBM 704 computer 6. You wrote maths much as you would on paper, and a program turned it into machine code 6. It was meant to take about six months, but it was April 1957 before it was ready to send out 6,5. In one example IBM gives, a job of up to a thousand hand-keyed instructions shrank to just forty-seven in Fortran 6.
What a compiler does 5:48
That's a compiler: a program that translates your code ahead of time into another form, usually machine code, without running it 3. It checks the grammar, works out the meaning, then writes instructions for one particular chip 3. Programmers doubted a machine could match their hand-written code 5. IBM credits Backus's team with the first optimising compiler, its output running nearly as fast as code crafted by hand 6,5. And a Fortran program could run on any computer that had a Fortran compiler 6. The cost is a separate build for every family of chips 3.
The interpreter came first 6:28
There was another way, even older 23,19. In 1949, John Mauchly proposed a system later called Short Code, and late in 1950, William Schmitt recoded it for the UNIVAC 23,19. Nothing was turned into machine code ahead of time 19. Instead, a program called an interpreter read each coded line of maths and carried it out on the spot 23,19.
Reading as you go 6:53
Think of a translator who translates a whole book before anyone reads it, against an interpreter at a meeting who translates each sentence as it's spoken. The book costs time up front, but then reads at full speed 3. The meeting starts straight away, but every sentence pays a little delay 24. Here's where that picture breaks. A pure interpreter never writes a translation down 3. It reads your code and performs it, and a line inside a loop gets decoded again every time around 25.
Python's middle path 7:28
Most real languages mix the two 3. Python first compiles your code into bytecode, compact instructions for an imaginary chip 24. Here's our add as Python 3.13 bytecode 26,1. Load a and b, do an add, return the result. The imaginary chip is called a virtual machine: a computer defined entirely in software, which is itself a program running on the real chip 24. Python can even save it to disk, so the next run can skip that step 24.
The price of flexibility 8:02
Here's why that's slower. Run the same add instruction twice, and it gives five for two and three, and icecream for ice and cream 1. A chip's add instruction only adds the bits in two registers 8. So every time Python's virtual machine meets that instruction, it has to fetch it, decode it, look at what the values are, and pick what adding means for them 25,1. That's why interpreted languages usually run more slowly than compiled ones, though they're quicker to write and test 24.
JavaScript changes course 8:37
JavaScript went the other way round. Google's V8 engine, the one inside Chrome, used to compile scripts straight into machine code before running them 27,28. But that machine code ate memory, even for code that only ran once 27. So in 2016, the V8 team announced an interpreter called Ignition, running bytecode a quarter to half the size of that machine code 27. Here's our add in V8's bytecode: load b, add a, return 1.
Just in time 9:09
Then comes the clever part. While the bytecode runs, V8 keeps track of which functions get called a lot, and what kinds of values flow through them 29. When a function gets hot, V8 compiles it into real machine code, right there, while the program is still running 29. That's called just-in-time compiling, or JIT for short 3. Call our add with whole numbers, and within the first thousand calls, Node's own log says it plainly: add is hot and stable, so it's being optimised 1.
A bet that can be lost 9:43
But that fast machine code is a bet. V8 compiled add on the assumption that it would keep getting small whole numbers, the kind V8 calls small integers 29,1. Now hand it two strings of text instead 1. The machine code can't handle them, so V8 throws it away and falls back to the bytecode, which is called deoptimising 29,1. The log gives the reason in its own shorthand: not a small integer 1. The answer is still icecream, just not by the fast road 1.
An old idea, in tiers 10:15
The idea is old: a 2003 survey suspects the earliest published hint of it is in John McCarthy's 1960 paper on the language LISP 30. Today, V8 climbs a staircase of tiers 29. The interpreter runs first, then a quick compiler called Sparkplug, announced in 2021, then Maglev, from 2023 29,25. At the top is TurboFan, slower to compile but built for the fastest code 29. Even Python 3.13 added an experimental JIT, though it's switched off by default 31,32.
Every road ends in machine code 10:53
C is usually compiled ahead of time, straight to machine code for one chip 3. Python compiles to bytecode and runs it on a virtual machine 24. JavaScript in V8 starts as bytecode, and compiles its hot spots on the fly 29. Every road ends in machine code, because even an interpreter is a program running on the chip 24. Compiled and interpreted describe how a language is run, not the language itself 3. But what about a language that gives no instructions at all, and just describes a page? Is HTML a programming language?
Sources
Every factual claim in the episode is tied to one of these. Spotted an error? Tell us.
- This episode's own check, calc.py (run 2026-10-07 on an Apple silicon Mac: Apple…
- Intel, MCS-4 Micro Computer Set data sheet, November 1971 (fetch–decode–execute; via… — bitsavers.org
- R. Nystrom, Crafting Interpreters, ch. 2 "A Map of the Territory" (compilers,… — craftinginterpreters.com
- Wikipedia, "Assembly language" (1:1 statements; Booth and Britten 1947 Coding for… — en.wikipedia.org
- J. W. Backus, "The History of FORTRAN I, II, and III", ACM SIGPLAN Notices 13(8),… — softwarepreservation.org
- IBM, "Fortran" (IBM History) — ibm.com
- Apple Developer, "Addressing architectural differences in your macOS code" (Apple… — developer.apple.com
- Arm A64 instruction set reference, "ADD (shifted register)" (encoding diagram and… — scs.stanford.edu
- Arm, Procedure Call Standard for the Arm 64-bit Architecture (AAPCS64) (r0…r7… — github.com
- T. R. Kuphaldt, Lessons In Electric Circuits, Vol. IV (Digital), ch. 9… — ibiblio.org
- Wikipedia, "x86-64" ("also known as AMD64, x8664, x64 and, rarely, Intel 64"; a… — en.wikipedia.org
- F. Cloutier, x86 instruction reference: "LEA: Load Effective Address" (8D /r) and "RET… — felixcloutier.com
- Wikipedia, "x86 calling conventions" (System V AMD64 ABI: RDI, RSI, RDX, RCX, R8, R9) — en.wikipedia.org
- Wikipedia, "Kathleen Booth" (Birkbeck; ARC; "co-wrote the first assembly language") — en.wikipedia.org
- The Telegraph, "Kathleen Booth, computer pioneer who made a major breakthrough in… — web.archive.org
- A. D. Booth & K. H. V. Britten, Coding for A.R.C., Institute for Advanced Study,… — albert.ias.edu
- IEEE Computer Society, "David Wheeler" (Computer Pioneer Award 1985; "initial orders"… — computer.org
- Wikipedia, "A-0 System" (UNIVAC I; "more as a loader or linker than the modern notion… — en.wikipedia.org
- D. E. Knuth & L. Trabb Pardo, The Early Development of Programming Languages,… — bitsavers.org
- IEEE / ETHW, "Milestones: A-0 Compiler and Initial Development of Automatic… — ethw.org
- P. Schieber, "The Wit and Wisdom of Grace Hopper", OCLC Newsletter no. 167, Mar/Apr… — cs.yale.edu
- Penn Engineering blog, "Recognizing a Pioneer: The IEEE Dedicates Milestone to Grace… — blog.seas.upenn.edu
- Wikipedia, "Short Code (computer language)" (Mauchly 1949; UNIVAC I 1950; interpreted,… — en.wikipedia.org
- Python Software Foundation, Python Glossary ("bytecode", "virtual machine",… — docs.python.org
- V8 team, "Sparkplug: a non-optimizing JavaScript compiler", v8.dev, 27 May 2021 — v8.dev
- Python Software Foundation, "dis: Disassembler for Python bytecode" — docs.python.org
- V8 team, "Firing up the Ignition interpreter", v8.dev, 23 August 2016 — v8.dev
- V8 team, "Launching Ignition and TurboFan", v8.dev, 15 May 2017 — v8.dev
- V8 team, "Maglev - V8's Fastest Optimizing JIT", v8.dev, 5 December 2023 — v8.dev
- J. Aycock, "A Brief History of Just-In-Time", ACM Computing Surveys 35(2), June 2003… — cs.tufts.edu
- Python Software Foundation, "What's New In Python 3.13" (experimental JIT, disabled by… — docs.python.org
- B. Bucher, S. Rojas, "PEP 744 – JIT Compilation" — peps.python.org
Researched and scripted with AI assistance, fact-checked claim by claim, with synthetic narration and diagrams drawn in code. How we make episodes.