Play free

1948 · University of Manchester

Manchester Baby

On 21 June 1948 a machine in Manchester ran a program it held in its own memory. Nothing had done that before. The program was 17 instructions long and it took 52 minutes to find one number.

3 min read · Updated

Built byFrederic C. Williams, Tom Kilburn, Geoff Tootill (University of Manchester)
First program21 June 1948
Word size32 bits
Memory32 words on one Williams–Kilburn cathode-ray tube
RegistersAccumulator, control instruction (CI, the program counter), present instruction (PI)
Instructions7 (no addition: it subtracts and negates)
Speedabout 1,100 instructions per second
Built fromabout 550 valves (vacuum tubes)

Why it was built

The Baby was not built to calculate anything in particular. It was built to test a memory. In the late 1940s the hard part of building a stored-program computer was not the arithmetic but somewhere to keep the program and data that the machine could both read and rewrite at electronic speed. Freddie Williams and Tom Kilburn had found a way to store bits as charged dots on the face of an ordinary cathode-ray tube. The Small-Scale Experimental Machine, soon nicknamed the Baby, was the smallest complete computer they could build around that tube to prove it worked.

How it worked

Everything in the Baby is one 32-bit word wide. The store holds 32 of them, and each word can be read as a number or as an instruction. Of an instruction’s 32 bits, only a handful matter: five bits pick one of the 32 memory lines and three bits pick the operation.

There are only seven operations:

InstructionWhat it does
JMP SJump to the address stored in line S (an indirect jump)
JRP SJump forward or back by the amount stored in line S (relative)
LDN SLoad the negated contents of line S into the accumulator
STO SStore the accumulator into line S
SUB SSubtract line S from the accumulator
CMPSkip the next instruction if the accumulator is negative
STPStop

There is no ADD. To add two numbers, the Baby loads one negated, subtracts the other, and negates the result: −(−a − b) = a + b. That takes more steps, but it saved hardware, and saving hardware was the whole point. It is a good reminder that an instruction set is a set of trade-offs, not a law of nature (see designing your own instruction set).

The program counter has another quirk: it is incremented before each instruction is fetched, so jumps land one line after the address you give. Programmers simply stored the target minus one.

The first program

Kilburn’s first program searched for the highest proper factor of 218 (262,144) by trying every number below it. The Baby had no divide instruction, so it divided by repeated subtraction. The program ran for 52 minutes and executed about 3.5 million instructions before stopping with the answer, 131,072, glowing on the display tube. The program was a stress test as much as a calculation: a memory that could survive 52 minutes of constant rewriting was a memory you could build a real computer on.

What came next

The Baby grew into the Manchester Mark 1, and the Mark 1 became the Ferranti Mark 1, one of the first computers sold commercially, in 1951. The Williams tube itself was used in several early machines, including IBM’s 701, before magnetic-core memory replaced it. A working replica of the Baby, built by volunteers, is on display at the Science and Industry Museum in Manchester.

The Baby in NANDSIM

The museum version is rebuilt from NAND gates and runs real Baby programs. Its store is drawn as a dot matrix, as on the original display tube, so you can watch the program rewrite its own memory. Open it up and you will find the same parts you build in the campaign: an accumulator, a subtractor and a counter, all made of NANDs.

Run the Baby live