Computing History · Early Computing

The Stored-Program Idea and the Disputed First Execution

How one writable memory holding both numbers and orders changes machine design, and why Manchester, Cambridge, and the ENIAC teams each claimed the first run.

A stored program is not a programming style. It is a wiring decision: whether the sequence a machine executes lives in the same addressable memory as the numbers it operates on, or whether that sequence is a property of the machine, expressed as cables, switch settings, or holes in paper tape. Until the second half of the 1940s the sequence was almost always physical. The alternative appeared in a 101-page document circulated in June 1945, with a memory budget, an address layout, and a word format attached.

An order in memory has an address field, and a word in memory can be computed. Address arithmetic modifies instructions, which makes self-modifying code normal rather than a trick; a subroutine written once can be entered from several call sites if the caller adjusts the address fields inside the copy. None of that is available when the program is a cable.

Six subdivisions and a word split three ways

The First Draft of a Report on the EDVAC was written by John von Neumann and distributed on 30 June 1945 by Herman Goldstine, security officer on the ENIAC project; twenty-four copies had gone out on 25 June. It divides the machine into five parts plus an external total of six: a central arithmetic unit, a central control unit, a memory unit, input, output, and slow external memory. The claim sits in the first three: orders received by central control come from memory, the same place where numerical material is stored.

Numbers are binary, and the unit of storage is a 32-bit word called a minor cycle: a 30-bit number, a sign bit, and one bit distinguishing a number from an order. Arithmetic is two’s complement. The design target is 8,192 minor cycles, with 2,048 treated as still useful, and a few hundred minor cycles estimated as enough to hold a program.

The distinguishing bit is the concession that shows the idea’s cost. Hardware fetching from one store cannot know, from an address alone, whether the 32 bits just read are an order or an operand, so the report spends a bit of every word on the question. Numbers end up 30 bits wide, and every result must be squeezed back into a field two bits narrower than its cell.

8,192 words as 256 organs of 32

The first memory candidate is a delay line built as 256 delay-line organs of 1,024 bits each. Each holds 32 minor cycles, and one full circulation is a major cycle. Eight address bits select the organ out of 256, five select the minor cycle within its 32, and thirteen bits in total; the arithmetic closes exactly, since 256 times 32 is 8,192, and 8,192 is $2^{13}$.

An address is therefore a pair, and the second element only means something relative to the circulating stream, so the cost of reaching a word depends on where the stream is. The second candidate, an iconoscope tube, stores one bit as charge on a capacitor at each scan point; the report notes that scanning must be extremely precise, that retention might be as little as a second, and that periodic refresh is required. Both candidates are dynamic memories, so the writable store arrives carrying a maintenance obligation.

Three stores and three prices for changing a program

MachineWhere the order sequence livedCost of a change
ENIAC, before July 1947Cables between units and switch banksThe Manchester account describes reconfiguration as taking days
ENIAC, from July 1947Function tables, banks of ten-position switchesInstructions coded into switches previously holding function values
EDSAC, 1949Mercury delay lines, 1,024 words of 17 bitsPaper tape read by 31 words of read-only initial orders
Manchester Baby, 1948Charge on a Williams-Kilburn tube, 32 wordsKeyboard reset of part of the store

The ENIAC’s move is often mistaken for a stored-program conversion. From July 1947 coded instructions were placed in function tables, the banks of ten-position switches that had held function values. That gave the machine a coded order stream without a writable store: the orders lived in switches set by hand, so a program remained a physical configuration. The ring-counter accumulators and rewiring stayed the arithmetic substrate.

EDSAC’s store was a different compromise. Its 1,024 17-bit words sat in mercury delay lines, thirty-two tanks of about five feet each holding thirty-two numbers. Because the whole line had to circulate before the next order could be fetched, the fastest rate for consecutive instructions was 500,000 divided by $(32+1) \times (17+1)$, or 841 per second; average order time was about 1.5 ms, with multiplication at 4.5 ms. The delay-line timing discipline is part of the instruction set’s cost model, not a detail beneath it.

Manchester’s store was the third option: charge written and read at a scanned point on a cathode ray tube phosphor. The charge leaks away in the order of a second, so every bit is read and rewritten continuously at electronic speed, a process called regeneration. Williams demonstrated a single bit with the anticipation pulse method in early October 1946 and provisionally patented the system that December. By 1 December 1947, 2,048 bits were being stored on a standard six-inch tube, and Kilburn’s internal report described the dot-dash and defocus-focus methods of operation. The Computer History Museum gives the capacity of electrostatic tubes in this class as 512 to 2,048 bits.

The Baby’s sixteen significant bits

The Small Scale Experimental Machine ran its first program on 21 June 1948, written by Kilburn with Freddie Williams and Geoff Tootill. It had a 32-bit word, serial binary arithmetic in two’s complement, a single-address order code, and a random-access main store of 32 words in a 32 by 32 bit Williams-Kilburn tube array, extendable to 8,192 words. Two further tubes held the accumulator and the control and present instructions, a fourth could display any tube’s contents, and speed was about 1.2 ms per instruction.

The order format is tiny: a 3-bit function field in bits 13 to 15, a 13-bit store address in bits 0 to 12, and 16 unused bits. Seven orders were defined, leaving one encoding unassigned. The model below packs and unpacks that layout; it describes the documented format, not the machine’s behaviour on any run.

# Model of the documented Manchester Baby order format.
OPCODES = {
    0b000: "A = -S",
    0b001: "A = A - S",
    0b010: "S = A",
    0b011: "if A < 0 then skip next",
    0b100: "CI = S",
    0b101: "CI = CI + S",
    0b110: "halt",
}

def encode(func: int, address: int) -> int:
    assert 0 <= func < 8 and 0 <= address < (1 << 13)
    return (func << 13) | address        # function in bits 13-15, address in 0-12

def decode(word: int):
    func = (word >> 13) & 0b111
    address = word & 0x1FFF
    return OPCODES.get(func, "unassigned"), address

for f in range(8):
    op, addr = decode(encode(f, 0b1010101010101))
    print(f"{f:03b}  {op:26} S={addr}")

The format has no operand-size field, no addressing mode, no register number beyond the implied accumulator, and no branch condition beyond the sign of the accumulator; sixteen of the thirty-two bits are wasted, affordable only because the store is small and the machine an experiment.

The experiment tested whether a cathode ray tube could serve as a main store, and the first program chosen for it determined the highest factor of a number. A later run on $2^{18}$ found the answer in 52 minutes, after about 2.1 million instructions and about 3.5 million store accesses; at 1.2 ms each, 2.1 million instructions account for roughly 42 minutes of that total. Within two months the order code was widened to four bits, adding $A = S$, $A = A + S$, and $A = A \mathbin{&} S$. The 32-word store was never a general-purpose facility.

What EDSAC added: relocation and a read-only bootstrap

EDSAC ran its first program on 6 May 1949, with 1,024 17-bit words of mercury delay-line store, and the Computer History Museum describes it as the first full-size stored-program computer. The detail separating it from the Baby is the bootstrap: initial orders of 31 words of read-only store hard-wired on uniselectors, a mechanical read-only memory that assembled symbolic programs from paper tape into the main store and started them.

The second release, installed in August 1949, occupied 41 words and added relocation, called coordination, to make subroutines usable; the Cambridge account attributes that invention to David Wheeler. Relocation is the practical payoff: if a subroutine’s address fields are adjusted when it is placed, one copy serves many call sites and the assembler carries the bookkeeping. The first programming textbook, by Wilkes, Wheeler, and Gill in 1951, documents the practice. A machine whose control flow was physical had no equivalent: the Harvard Mark I instruction format encoded operations for a paper-tape reader, and the tape’s position, not a computed address, decided what came next.

Why the three claims do not collide

The disputes survive because the claimants answer different questions. Manchester ran a stored program first, on 21 June 1948, on a machine with a 32-word main store built to test CRT storage. Cambridge calls EDSAC the first full-size stored-program computer, running on 6 May 1949. The ENIAC acquired coded instructions in switch banks from 1947 and 1948 without a writable store. Konrad Zuse’s 1936 patent application has also been cited as an earlier statement of a stored-program idea.

The report carries its own dispute. Publication of the report caused acrimony on the EDVAC team: it was said to be a public disclosure more than a year before the EDVAC patent application, which would render the patent unenforceable. Some team members contended that the stored-program concept had evolved in Moore School meetings predating von Neumann’s involvement as a consultant, and that the report chiefly translated those discussions into formal logic. Because von Neumann and Goldstine did not list the others, credit attached to von Neumann alone, and the label “von Neumann architecture” is disputed for that reason, with John Mauchly and J. Presper Eckert’s role contested alongside it.

What survives is the constraint. A store that holds orders must be writable, and every writable high-speed store of the period was dynamic: charge on a phosphor leaking away in about a second, or a stream of acoustic pulses that had to keep circulating. Programmability arrived as a maintenance loop, and that recurring refresh cost, not the priority claim, is what later designs had to engineer around.

References

  1. First Draft of a Report on the EDVAC — John von Neumann; Moore School of Electrical Engineering, University of Pennsylvania, 30 June 1945
  2. Manchester Baby Computer (Small Scale Experimental Machine) — University of Manchester, 50th Anniversary computer pages
  3. Some EDSAC statistics — University of Cambridge Computer Laboratory, EDSAC 99
  4. Williams-Kilburn Tubes — Computer History Museum, Memory and Storage exhibit
  5. The Preparation of Programs for an Electronic Digital Computer — Maurice V. Wilkes, David J. Wheeler, and Stanley Gill; Addison-Wesley, 1951