Von Neumann’s first computer program

What would you do with a brand-new computer of unprecedented capabilities? Ada Lovelace demonstrated the theoretical capabilities of Babbage’s Analytical Machine with a program to compute Bernoulli numbers (1843). J. Presper Eckert and John Mauchly’s first program for ENIAC was a ballistics calculation (1946). Alan Turing used the Manchester Mark 1 to compute Mersenne primes (1949). When John von Neumann had the chance to explore the abilities of ENIAC’s successor, EDVAC, he focused on something quite different: data sorting.

Donald Knuth wrote a fascinating 1970 paper, “Von Neumann’s First Computer Program,” which analyzes the original 23-page handwritten document where von Neumann recorded his planned program. Von Neumann conceived of a merge sort algorithm and wrote out an implementation of the merge part of it, which Knuth examined and reported on. Knuth noted the insights von Neumann achieved and then respectfully, humbly, pointed out places where von Neumann’s code could be optimized as well as an unfortunate bug in the program. As Knuth noted, not bad for programming without having the actual machine yet to test it! (I do not know how Knuth found the error, whether by hand-examination or by running the program through a simulator.)

There were some very pressing reasons why ballistics and numerical simulations were the top priorities for the electronic computers just coming into existence in the late 1940’s. Von Neumann’s foray into “a nonnumeric application for computers” foreshadowed the generation and growth of information processing and a landslide of other associated activities and applications in use throughout the world today.

3 Comments
3 of 3 people learned something from this entry.

  1. Terran said,

    October 18, 2011 at 12:45 pm

    (Learned something new!)

    Nifty! I always think that I’d like to go back and read some of the original, fundamental papers in the field, but I never get around to it. It’s cool to hear about such a foray. Thanks!

  2. Susan said,

    October 18, 2011 at 3:48 pm

    (Learned something new!)

    Cool! The first sort was a merge sort, eh?

  3. :) said,

    December 15, 2016 at 11:12 am

    (Learned something new!)

    The full Donald Knuth paper “Von Neumann’s First Computer Program” is available for free at http://public.callutheran.edu/~reinhart/CSC521MSCS/Week5/KnuthVonNeumann.pdf

Post a Comment

I knew this already. I learned something new!