The ENIAC, finished in 1945 at the University of Pennsylvania, was the fastest electronic computer in the world: it did five thousand additions a second with almost eighteen thousand valves. But to change calculation one had to rewire cables and switches on a panel, a job of days done by a team of programmers.

Two programmers operating the ENIAC's control panel, at the Moore School of the University of Pennsylvania, around 1946.
Two programmers operating the ENIAC’s control panel, at the Moore School of the University of Pennsylvania, around 1946.United States Army · Wikimedia Commons · public domain

The ENIAC’s engineers, J. Presper Eckert and John Mauchly, were already planning the next machine, the EDVAC, in which the program would be kept in memory. Von Neumann began attending the meetings and, in June 1945, wrote a text that organised the group’s ideas in an abstract, almost biological language, speaking of “organs” and “neurons”.

The title page of the *First Draft of a Report on the EDVAC*, dated 30 June 1945.
The title page of the First Draft of a Report on the EDVAC, dated 30 June 1945.John von Neumann · Wikimedia Commons · public domain

The parts of a computer

The First Draft of a Report on the EDVAC describes a computer with:

  1. an arithmetic unit, which does the calculations;
  2. a control unit, which reads the instructions one by one and has them carried out;
  3. a memory, which holds at the same time the numbers and the instructions, all written as strings of binary digits;
  4. input and output devices.

The decisive novelty is item 3. Since the program is kept in the same memory as the data, changing the calculation means changing numbers in memory, not wires. And the program can even compute and modify its own instructions. It is the idea of Turing’s universal machine, of 1936, put into valves and mercury delay lines.

A program in four lines

Imagine a memory of eight positions, numbered from 0 to 7, and a register called the accumulator:

position contents meaning
0 LOAD 5 put the number in position 5 into the accumulator
1 ADD 6 add the number in position 6 to the accumulator
2 STORE 7 store the accumulator in position 7
3 HALT end
5 40 data
6 2 data
7 0 result

The control unit starts at position 0, executes and moves to the next. After three steps, position 7 contains $42$. Instructions and data live side by side: nothing stops an instruction STORE 1 from writing over the second instruction, and that is what allows one program to generate another.

The EDVAC installed at the US Army's Ballistic Research Laboratory in Aberdeen, where it began running in 1951.
The EDVAC installed at the US Army’s Ballistic Research Laboratory in Aberdeen, where it began running in 1951.United States Army · Wikimedia Commons · public domain

Who invented it?

The report was meant to circulate only among the participants, but Herman Goldstine distributed it widely, with only von Neumann’s name on the cover. Eckert and Mauchly, who had discussed stored-program memory before von Neumann arrived, felt robbed; and, since the text was considered published, they lost the chance to patent the idea. The quarrel poisoned the group, which split up in 1946. Historians today agree that the idea was collective and that von Neumann’s merit was to describe it clearly and generally, which spread it around the world.

J. Robert Oppenheimer and John von Neumann in front of the Institute for Advanced Study machine on 10 June 1952, when the computer was presented to the public.
J. Robert Oppenheimer and John von Neumann in front of the Institute for Advanced Study machine on 10 June 1952, when the computer was presented to the public.Jeremy Norman Collection of Images · Wikimedia Commons · CC BY 4.0
Exercise: follow the program

Replace the contents of positions 5 and 6 with $17$ and $25$, and the instruction in position 1 with SUBTRACT 6. What ends up in position 7?

The accumulator receives $17$, then $17 - 25 = -8$, which is stored in position 7. The same circuit did another calculation just because numbers changed in memory, without touching a single wire.

Exercise: a program that modifies itself

Add, before HALT, an instruction that makes the program also add position 7 to itself the next time it runs. Why is this only possible with a stored program?

For example, STORE 1 with the accumulator holding the code for ADD 7 would rewrite the second instruction. The next time the program runs, position 1 will say ADD 7. This only works because instructions are numbers kept in the same memory as data; in the ENIAC the program was in the wires and could not be written by the program itself.

Sources: John von Neumann, First Draft of a Report on the EDVAC (1945) · Herman Goldstine, The Computer from Pascal to von Neumann (1972) · George Dyson, Turing’s Cathedral (2012) · John Backus, “Can programming be liberated from the von Neumann style?”, Communications of the ACM (1978).


All topics on John von Neumann · ← Quantum mechanics in a Hilbert space · Merge sort: sorting by joining →

Image credits.