body.has-navbar-fixed-top { padding-top: 4.5rem; }

Von Neumann's First Computer Program

date Oct 17, 2018
authors Donald E. Knuth
reading time 2 mins
category research paper

History of instruction codes

An analysis of the two earliest sets of instruction codes planned for stored program computers, and the earliest extant program for such a computer, gives insight into the thoughts of John yon Neumann, the man who designed the instruction sets and wrote the program, and shows how several important aspects of computing have evolved.

Sorting data

Instead, it deals with what was considered at that time to be the principal example of a nonnumeric application for computers, namely, the problem of sorting data into nondecreasing order.

Why choose sorting?

The key question was whether or not the proposed instruction set provided a satisfactory means of logical control for complex processes, and so he felt that a sorting program would be a most instructive test case. Furthermore, the existence of IBM’s special purpose machines for sorting gave him a standard against which he could measure the proposed computer’s speed.

Other historical records of computer programs

We have Lady Lovelace’s description of a program for calculating Bernoulli numbers that Babbage wrote for his Analytical Engine ; A. M. Turing’s construction of his abstract Universal Machine, which involves many important programming concepts; Eckert and Mauchly’s first sample program for the ENIAC; and a collection of numerical programs, dating from 1944, written by H. H. Aiken, G. M. Hopper, R. V. D. Campbell, R. M. Bloch, B. J. Lock- hart, and others, for the Harvard Mark I.

Example of electromechanical calculators

Several electromechanical calculators were essentially operational in the late 1930s and early 1940s: those of Stibitz and Aiken in America, and Zuse in Germany.

ENIAC

The ENIAC was a highly parallel computer; weighing over 30 tons, it involved over 19,000 vacuum tubes, 1500 relays, etc. Because of its electronic circuitry, it was considerably faster than any computing machine previously built. But it had only 20 words of internal memory, and it required complicated manual operations for setting up a program on plugboards.

Von Neumann’s use case

Von Neumann begins his memo by defining the idea of sorting records into order, and of merging two strings of records that have been sorted separately into a single sorted sequence. Then he states the purpose of the program: “We wish to formulate code instructions for sorting and for meshing [i.e. merging], and to see how much control-capacity they tie up and how much time they require.”

The continuing research into computer programs after the War

The veil of secrecy surrounding electronic computers was lifted when ENIAC was dedicated, and the great potential for high speed computing was gradually realized by more and more people. The principles of EDVAC’s design were very strong influences on all of the computers constructed during the next decade