The very first machine in the world, with no one to borrow from — how was the first instruction ever entered?
In Episode 8 we saw that a new machine is brought up by borrowing "another machine that already runs." But trace that chain all the way back and you always arrive — at the very first machine, with no one at all to borrow from. That first computer in the world had no other machine to assemble for it, and no ready-made paper tape. So how was the very first instruction entered? The answer was as plain as it could possibly be. A human, by hand. This is the floor of software's chicken-and-egg.
In Episode 7 we saw that the thing which turns assembly (human-readable) into machine code (numbers) is the assembler. If there is no assembler — then a human does that conversion themselves. Looking at the CPU's instruction table (the manual), "the opcode for this instruction is 6, the address goes here…", they compute the machine-code numbers by hand, on paper. This is called hand-assembly. Picture Episode 7's Figure 1 (assembly), but done with a pencil by a human instead of a machine.
How do you get the hand-built numbers into memory? Early machines (the PDP-8, early PDP-11, Altair 8800, and so on) had a row of toggle switches (a front panel) on the front. Here's how it works — set the bits (0/1) for one word on the switches, press "DEPOSIT," and that one word is written to memory and the address advances by one. Repeat this once per word. Quite literally, you line up the bits by hand and feed them into the machine. Try touching the front panel below for yourself.
Of course, toggling in an entire OS by hand would be insane. So what you enter is only a very short "loader." That little loader has just one job — to read a bigger program from paper tape (or, later, disk) into memory and hand execution over to it. The PDP-11's bootstrap loader was designed to be as short as possible, precisely because you toggle it in by hand. In many cases, the loading grows step by step, like a staircase: the tiny hand-entered loader → a second-stage loader on paper tape → the OS. Climb that staircase in the figure below.
The series watchword, "the first egg was carved by hand," here almost stops being a metaphor. The OS you use now, the compiler, the self-hosting loop from Episode 0 — trace them all the way back and they rest on a few words that someone typed in by hand, on switches, with a manual in one hand. The foundation stone at the very bottom of the towering edifice of software was a human finger.
The word bootstrap comes from a 19th-century turn of phrase, "to pull yourself up by your own bootstraps." Physically it's impossible — a tall tale. It carries the sense of getting something going out of nothing. In Episode 0 we said, "the loop can't start itself; it must be lifted once, from outside." The physical site of that "lift from outside" was this very front panel. And today, when we say to "boot" a computer — to turn it on — that too is rooted in this word bootstrap. The power button you press every morning is a distant descendant of the days when people flipped switches by hand.
"Which came first, the chicken or the egg? — The first egg was carved by hand."
Neither the chicken (running software) nor the egg (its source and tools) sprang from nothing. Only at the very beginning did a human carve a few words by hand, and that tiny seed called a loader, the loader called an OS, a compiler ran on top of the OS, and the compiler entered the loop of reproducing itself. Once the seed is sown, the loop of software making software keeps on turning — this was the shape of the answer to chicken-and-egg.
(1) The "1 byte" in the title is symbolic; the unit you actually enter by hand is the word (18 bits, 16 bits, and so on, depending on the machine). (2) You didn't hand-toggle everything every time — some of it survived in core memory, and later machines burned the bootstrap into ROM and graduated from hand-toggling (the way today's PCs boot is a continuation of that). "Entered by hand" is about the very first time / bringing up a brand-new machine.
(3) The values, bit counts, and step-by-step procedure in Figure 1 are a simplification to convey the feel of operating a front panel, not a rigorous reproduction of any specific model (storing to memory with toggle switches and the bootstrap loader are real practice). (4) And the biggest caveat of all — what turns those hand-entered numbers into "meaning" is still the "machine itself," which lies below. What executes the 0s and 1s of the switches as instructions is wired-up circuitry. We've reached the floor of software, but there is hardware still beneath it — on to the finale, Episode 10.
Trace the cross-compiling chain of Episode 8 back and you arrive at the first machine, with no one at all to borrow from. There is no chicken (running software) and no egg (tools). So a human reads the CPU's manual, builds the machine-code numbers by hand (hand-assembly), and enters them into memory one word at a time with the front panel's toggle switches. You don't enter all of it — what you enter by hand is only a tiny bootstrap loader, which reads a second stage from paper tape, and the second stage becomes a staircase that reads the OS.
bootstrap is the name of the impossibility of "pulling yourself up by your own bootstraps," and the site of that "single lift from outside" was this front panel (the root of today's "boot"). Episode 0's watchword, "the first egg was carved by hand," here becomes almost literal — the foundation stone of the towering edifice of software is a human finger. But what turns the hand-entered 0s and 1s into meaning (execution) is still the machine itself, lying below. We've reached the floor of software. One question remains — who made the hardware that turns that machine code into "action"? In the finale, down to the very bottom floor.
6032 into the action "read memory"? It's an instruction decoder wired from logic gates — and the person who designed that was, again, a human. At the very bottom of the software chain lie wired-up physics, and the hands that made it. On to the last floor of chicken-and-egg.
Print / save as PDF: ⌘+P (Ctrl+P on Windows). On screen, in Figure 1 you can click the front-panel switches and DEPOSIT to write to memory (try entering the sample loader). Figure 2's slider lets you climb the bootstrap staircase. "See the answer" opens each solution.