Programs Used to Be Wiring
The first large electronic machines were built to do calculations, and giving them a new job was a physical task. ENIAC, completed in 1945, is the usual example. To set up a problem, operators connected cables and set switches on its panels, so that the units of the machine passed results to each other in the right sequence. The machine was fast at arithmetic, but arranging it for a new problem could take a long time, sometimes days, according to common accounts.
This is a reasonable way to build a calculator. It is a less comfortable way to build a general tool, because the program and the machine are effectively the same object.
The Basic Idea
The stored-program concept changes this. Instead of wiring in the sequence of steps, the instructions are written as numbers and kept in the machine’s memory, in the same place as the data they work on. The processor fetches one instruction at a time from memory, carries it out, and moves on to the next.
Because instructions are just stored patterns, loading a different program means putting different contents into memory. The hardware stays the same. A single machine can therefore switch from one job to another in the time it takes to load the new instructions, without anyone touching a cable.
Programs Treated as Data
Keeping instructions and data side by side had a further consequence. If both are numbers in memory, then a program can create or modify other programs. This opened the door to assemblers and to the compilers and interpreters that translate human-readable text into machine instructions. It also made possible operating systems, which load and manage other programs.
The same property has drawbacks. If a program can write over its own instructions, a mistake or a deliberate attack can alter its behavior, which is a long-standing source of computer security problems. Some later designs keep instructions and data in separate memories, or mark regions as not executable.
Where the Idea Came From
Credit for this concept is shared, and historians continue to discuss exactly who contributed what.
- Alan Turing described in 1936 an abstract machine that reads its instructions from a tape, and showed that a single universal machine could imitate any other by reading a description of it. This was a mathematical idea about computation, not a design for a physical computer, but it is closely related in spirit. In the mid-1940s he also wrote a detailed design for a stored-program machine called the ACE.
- J. Presper Eckert and John Mauchly, who worked on ENIAC, were reported to be discussing storing programs in memory while a successor, EDVAC, was being planned.
- John von Neumann joined discussions around the EDVAC project and in 1945 wrote a draft report describing the logical organization of such a machine. The report circulated widely under his name alone, which is a main reason the design is often called the “von Neumann architecture.” Many writers feel this has overshadowed the contributions of others on the team.
- Konrad Zuse and other pioneers had developed program-controlled machines in other places, and Zuse’s work is sometimes discussed in this context, although these machines were not stored-program computers in the later sense.
It is safest to say that the idea developed from several people’s work in the mid-1940s and that its authorship cannot be given to one person fairly.
The First Working Machines
Putting the concept into practice took a few more years. A small experimental machine at the University of Manchester ran its first stored program in 1948, and it is commonly described as the first electronic stored-program computer to work, though claims depend on how the term is defined. In Cambridge, EDSAC began running programs in 1949. Other groups in the United States and elsewhere had stored-program machines operating around the same time or shortly afterward. ENIAC itself was later modified, in about 1948, to run instructions from stored tables, so that it behaved partly in this way.
Why It Mattered
The change is easy to underestimate. Once the program lives in memory, software becomes something that can be written, copied, shared and improved separately from hardware. That separation laid the foundation for the early software industry, for the idea of programming languages, and for the personal computer era, in which one machine runs whatever software the user chooses.
It also explains a practical feature of the modern world: a phone or laptop can gain new abilities without any change to its circuitry.
A Point About Terms
The phrase “stored program” can sound odd, since all computer programs are stored somewhere. It means specifically that the instructions are held in the machine’s own working memory, available to the processor directly, as opposed to being fixed in wiring or fed in from outside one step at a time. That one change, more than any single piece of hardware, is what made computers general-purpose.