A stored-program computer is a computer that stores program instructions in electronically or optically accessible memory. This contrasts with systems that stored the program instructions with plugboards or similar mechanisms.
The definition is often extended with the requirement that the treatment of programs and data in memory be interchangeable or uniform.
In principle, stored-program computers have been designed with various architectural characteristics. A computer with a von Neumann architecture stores program data and instruction data in the same memory, while a computer with a Harvard architecture has separate memories for storing program and data. However, the term stored-program computer is sometimes used as a synonym for the von Neumann architecture. Jack Copeland considers that it is "historically inappropriate, to refer to electronic stored-program digital computers as 'von Neumann machines'". Hennessy and Patterson wrote that the early Harvard machines were regarded as "reactionary by the advocates of stored-program computers".
The concept of the stored-program computer can be traced back to the 1936 theoretical concept of a universal Turing machine. Von Neumann was aware of this paper, and he impressed it on his collaborators.
Many early computers, such as the Atanasoff–Berry computer, were not reprogrammable. They executed a single hardwired program. As there were no program instructions, no program storage was necessary. Other computers, though programmable, stored their programs on punched tape, which was physically fed into the system as needed.
In 1936, Konrad Zuse anticipated in two patent applications that machine instructions could be stored in the same storage used for data.
The University of Manchester's Baby is generally recognized as world's first electronic computer that ran a stored program—an event that occurred on 21 June 1948. However the Baby was not regarded as a full-fledged computer, but more a proof of concept predecessor to the Manchester Mark 1 computer, which was first put to research work in April 1949. On 6 May 1949 the EDSAC in Cambridge ran its first program, making it another electronic digital stored-program computer. It is sometimes claimed that the IBM SSEC, operational in January 1948, was the first stored-program computer; this claim is controversial, not least because of the hierarchical memory system of the SSEC, and because some aspects of its operations, like access to relays or tape drives, were determined by plugging. The first stored-program computer to be built in continental Europe was the MESM, completed in the Soviet Union in 1950.
Several computers could be considered the first stored-program computer, depending on the criteria.
The concept of using a stored-program computer for switching of telecommunication circuits is called stored program control (SPC). It was instrumental to the development of the first electronic switching systems by American Telephone and Telegraph (AT&T) in the Bell System, a development that started in earnest by c. 1954 with initial concept designs by Erna Schneider Hoover at Bell Labs. The first of such systems was installed on a trial basis in Morris, Illinois in 1960. The storage medium for the program instructions was the flying-spot store, a photographic plate read by an optical scanner that had a speed of about one microsecond access time. For temporary data, the system used a barrier-grid electrostatic storage tube.