ENIAC
How the first general-purpose electronic computer was programmed: first by wiring cables and setting thousands of switches, and from April 1948 by a two-digit order code stored in its function tables. According to historians Haigh, Priestley and Rope, it made ENIAC the first computer to run a program written in the modern, EDVAC-style code paradigm.
Created by Machine designed by J. Presper Eckert and John Mauchly (Moore School, University of Pennsylvania); original set-up method worked out by Herman and Adele Goldstine and the six ENIAC programmers; 1948 order code planned by Adele Goldstine, John von Neumann, Richard Clippinger and Jean Bartik's group, and implemented by Nick Metropolis and Klara von Neumann
ENIAC, the Electronic Numerical Integrator and Computer, was the first general-purpose electronic digital computer. It was built at the University of Pennsylvania’s Moore School of Electrical Engineering between 1943 and 1945 and announced to the public in February 1946. It never had a programming language in the modern sense. For its first two years, a program was a configuration of the machine itself: cables plugged between dozens of separate units and thousands of rotary switches set by hand. In 1948 it was converted to read instructions, as two-digit numeric codes, from its switch-based function tables. That conversion made ENIAC, according to historians Thomas Haigh, Mark Priestley and Crispin Rope, the first computer to run a program written in the style von Neumann had described for EDVAC. This page covers both ways of programming ENIAC: the original plugboard set-up and the 1948 order code.
History and Origins
Project PX
In the early 1940s the U.S. Army Ordnance Department’s firing tables for artillery were being calculated at the Moore School by human “computers” working with desk calculators and a differential analyzer. John Mauchly proposed an electronic calculating machine in August 1942. With J. Presper Eckert he drafted a design, and the construction contract was signed on 5 June 1943. Work began the following month under the code name Project PX, with John Grist Brainerd as principal investigator and Herman Goldstine as the Army’s liaison. The design engineers included Arthur Burks (multiplier), Harry Huskey (reader and printer), Jeffrey Chuan Chu (divider and square-rooter), Robert F. Shaw (function tables), Thomas Kite Sharpless and Frank Mural (master programmer), and Jack Davis (accumulators).
The design was frozen early so that the machine could be finished during the war. That freeze is why ENIAC could not store a program in memory: by the time Eckert, Mauchly and von Neumann were working out the stored-program idea for its successor, EDVAC, ENIAC’s architecture was already fixed.
The programmers
Goldstine chose ENIAC’s first programmers, whom he called operators, from the roughly two hundred women employed as computers at the Moore School. Kay McNulty, Jean Jennings, Betty Snyder, Marlyn Wescoff, Fran Bilas and Ruth Lichterman worked out how to set up problems from block diagrams and the machine’s wiring, because no programming manual existed. They learned the machine well enough to trace a fault to an individual failed tube. Snyder and Jennings developed the trajectory program shown at the public announcement on 14 February 1946, yet none of the six was invited to the dedication dinner the next day. For decades, press photographs of them were assumed to show models posing with the machine. Their work was recovered through Jennifer Light’s 1999 article “When Computers Were Women” and through Kathy Kleiman’s ENIAC Programmers Project, which produced the 2014 documentary The Computers and the 2022 book Proving Ground.
First problems and the move to Aberdeen
ENIAC’s first real problem came from Los Alamos rather than from the ballistics work it had been funded for. A team from the laboratory took over the machine for several weeks from December 1945 to run calculations for the hydrogen-bomb programme. The Army formally accepted ENIAC in July 1946. It was shut down on 9 November 1946, moved to the Ballistic Research Laboratory at Aberdeen Proving Ground in Maryland, and switched back on on 29 July 1947. Haigh, Priestley and Rope note that it recovered slowly and did little useful work for the rest of that year.
Programming the Original ENIAC (1945-1948)
A machine made of units
ENIAC was a collection of separate units that all worked in decimal:
| Unit | Role |
|---|---|
| 20 accumulators | Each held a signed ten-digit decimal number and could add or subtract |
| Multiplier | Used four accumulators to multiply |
| Divider/square-rooter | Used five accumulators |
| 3 function tables | Banks of ten-position rotary switches holding constants and lookup tables |
| Constant transmitter | Fed constants, including values from punched cards |
| Master programmer | Ten “steppers” that counted repetitions to build loops and branches |
| Initiating and cycling units | Started the machine and supplied the timing pulses |
| Reader and printer | IBM punched-card input and output |
The cycling unit generated a 100 kHz pulse train. One “addition time” was 20 of those pulses, or 200 microseconds, so a single accumulator could do 5,000 additions or subtractions per second. According to the Wikipedia summary of the original reports, multiplying two ten-digit numbers took 14 addition times (2.8 ms) and a ten-digit division or square root up to 143 (28.6 ms). Because every accumulator could work at once, a carefully planned set-up could do several operations in parallel.
Programs as wiring
There was no instruction stream. Units were joined by two kinds of cable:
- Program cables carried control pulses. When a unit finished an operation it emitted a pulse, and wherever that pulse was routed, the next operation started.
- Digit cables carried numbers between units. Each decimal digit travelled as a train of zero to nine pulses on its own wire, so a ten-wire cable moved a whole accumulator in one addition time.
Each accumulator had twelve program controls. As Zoppke and Rojas describe them, every control had a switch selecting which of five input connectors to receive a number from, settings for whether to send the accumulator’s contents out through its A (add) output, its S (subtract) output or both, and, on eight of the twelve, a dial for how many times (1 to 9) to repeat the operation. A step in a program was therefore a physical thing: a pulse arriving on a particular input of a particular accumulator, whose switches had been set beforehand.
Conditional branching was improvised: an adapter and a “dummy program” turned the digit output of a comparison into a control pulse, which a master-programmer stepper then used to route control down one path or another. Haigh, Priestley and Rope point out the costs. Each conditional test used up one of the master programmer’s ten steppers and one of the accumulator’s outputs, and the number of operations of each type a program could contain was limited by the number of controls on that kind of unit (240 across all the accumulators, 24 on the multiplier). W. Barkley Fritz of BRL wrote that setting up a problem was “analogous to the design and development of a special-purpose computer out of ENIAC component parts for each new application.”
Programs were planned on paper as block diagrams and then wired, which could take days. After that came testing, helped by single-step operation and a variable clock, while neon lamps on each accumulator showed its contents.
The 1948 Order Code
From wiring to instructions
In the spring of 1947 von Neumann saw that ENIAC’s parts could be wired once to fetch and decode a fixed set of instructions, which could then be stored as numbers in the three function tables. Clippinger later claimed the idea, but his own 1948 report credited von Neumann with suggesting it in spring 1947. The approach was documented by Adele Goldstine in a plan dated 10 July 1947, cited by Haigh, Priestley and Rope as Control Code for ENIAC. She applied the structure of von Neumann’s 1945 First Draft of a Report on the EDVAC to ENIAC’s hardware:
- Accumulator 15 became the central “accumulator” in the modern sense, with accumulator 13 as an auxiliary arithmetic register.
- Other accumulators were assigned to the multiplier, divider and the function-table interface. One held the function-table address used to fetch instructions.
- Most of the remaining accumulators became data storage. For each one there was a “talk” order that copied it into accumulator 15 and a “listen” order that did the reverse.
- Each instruction was a two-digit code, and up to six could be packed into one line of a function table.
Planning went through several versions, which the planners named after the number of instructions: a 51 order code that would have worked on the unmodified hardware, drawn up from mid-1947 with help from a five-person group in Philadelphia led by Jean Bartik, and then a 60 order code worked on during the second half of 1947 by the ENIAC team at Aberdeen and Bartik’s group. The operations log shows the 60 order code was never actually installed. Clippinger presented the planned conversion at the Association for Computing Machinery meeting at Aberdeen on 11-12 December 1947, and it was announced at a press conference at Aberdeen on 12 December.
The conversion
When Nick Metropolis arrived from Chicago in early 1948, he found a newly delivered converter unit that could decode all 100 possible two-digit codes. Using it allowed a larger instruction set. The ENIAC operations log, as reconstructed by Haigh, Priestley and Rope, gives the sequence:
| Date | Event |
|---|---|
| 15 March 1948 | Converter fitted to ENIAC |
| 29-31 March | Metropolis begins setting up the new instruction set and gets “the basic sequence & 2 or 3 orders working” |
| 6 April | A 79 order code is implemented |
| 12 April | A demonstration for Applied Physics Laboratory students is “the first adequate demonstration using the new coding techniques” |
| 17 April | First production run of the Los Alamos Monte Carlo program |
| 28 April | Metropolis reduces the clock from 100 kHz to 60 kHz, and reliable running becomes the norm |
| 10 May | Monte Carlo production work completed |
| 6 July | Specification of the “100 order code” completed (it provided 84 distinct instructions) |
After 12 July 1948, when two more of its instructions were implemented, the instruction set stayed essentially unchanged for five years. Every later ENIAC application was written in the new style, and by August 1952 about 75 problems had been run in it.
In this form ENIAC read its program from approximately 3,600 digits of function-table switches, which also held constants. Programs could read but not modify these switches. Haigh and colleagues estimate room for roughly 1,460 instructions at an average of 2.6 digits each. Some instructions carried an address or data digits after the two-digit operation code. One example is N3D6, which loaded a three-digit argument into accumulator 6. The Monte Carlo “second run” program contained 840 instructions.
The cost was speed. The machine now did one thing at a time instead of running many accumulators in parallel. Wikipedia’s ENIAC article says the conversion slowed it by a factor of about six. In exchange, according to the same article, set-up time fell from days to hours, and most real problems were limited by the speed of the punched-card reader and punch anyway.
Was It a Stored-Program Computer?
This is still argued. The Manchester Baby, which ran its first program on 21 June 1948, is usually called the first stored-program computer, and it held its program in rewritable memory. 1948 ENIAC kept its program in read-only switches, so it could not modify its own instructions. It got around that with instructions that took addresses from accumulators at run time. For years the question seemed settled by date: Herman Goldstine’s 1972 book The Computer from Pascal to von Neumann said the new system first ran on 16 September 1948, after the Baby. Haigh, Priestley and Rope showed from the operations log that it ran in April 1948. They avoid the “stored program” label and describe ENIAC instead as the first computer to execute a program in the modern code paradigm: operation codes with arguments, conditional and computed jumps, and addresses calculated at run time. On that basis they argue it was the only computer doing useful work in that style from April 1948 until EDSAC started taking regular users in early 1950.
Notable Computations
- Los Alamos Monte Carlo (1948-1949). The first program run in the new code, the first computerised Monte Carlo simulation, and the start of an important use of computing. Stanislaw Ulam wrote to von Neumann that “the miracle of the Eniac really took place.”
- Pi to 2,037 places (1949). Von Neumann asked in June 1949 whether ENIAC could compute pi and e to many places so the digits could be tested for randomness. The pi run took about 70 hours.
- Numerical weather prediction (1950). Four 24-hour forecasts, each taking about 24 hours to compute. In Peter Lynch’s account, the team’s problems were made worse by “the primitive machine language,” manual switch setting, fixed-point scale factors and about 100,000 punched cards.
Later Changes and Retirement
According to Wikipedia’s ENIAC article, a high-speed shifter was added in early 1952, and in July 1953 a 100-word magnetic-core memory built by Burroughs was attached, along with three new orders to use it. A register panel meant to add electronic storage was finally installed on 27 May 1949 but, Haigh and colleagues report, proved unusable. ENIAC was switched off for good at 11:45 p.m. on 2 October 1955.
Current Relevance
No original ENIAC program can run on modern hardware without a simulator. The best-known is the Java simulation by Till Zoppke and Raúl Rojas (Freie Universität Berlin, 2004), which now lives on GitHub as kinnla/eniac under the GPL-3.0 licence. It models the original plugboard machine: users drag virtual cables between units and step through a computation. Large parts of ENIAC survive in museums, including four panels and a function table at the University of Pennsylvania. Since 2014, historical work has moved away from arguments about who was first and towards how ENIAC was actually used. Haigh, Priestley and Rope reconstructed the Monte Carlo code from surviving manuscripts in their 2014 articles and expanded the work into the book ENIAC in Action (MIT Press, 2016).
Why It Matters
ENIAC is where electronic programming started, in two senses. Its original form showed that a large electronic machine could be reconfigured for unrelated problems, from firing tables to thermonuclear physics. It also showed that reconfiguring by wiring did not scale, which is the problem the stored-program design was meant to solve. Its 1948 form was the first working test of that design’s programming model. The people who programmed it carried what they learned into the industry. Betty Snyder Holberton and Jean Jennings Bartik went on to work on BINAC and UNIVAC, and Holberton later wrote the UNIVAC Sort-Merge generator, one of the first programs that generated other programs. Programming as a skill separate from building the hardware largely began with the six women who first worked out how to set up ENIAC.
Timeline
Notable Uses & Legacy
Los Alamos thermonuclear calculations (1945-1946)
ENIAC's first problem was a Los Alamos calculation for the hydrogen-bomb programme, run by a team from the laboratory that took over the machine for several weeks from December 1945, before it had been declared fully operational
Ballistic Research Laboratory firing tables
ENIAC was funded by Army Ordnance to compute artillery trajectories and firing tables for BRL, work previously done by human 'computers' using desk calculators and a differential analyzer. The trajectory program shown to the press in February 1946 came from this work
Los Alamos Monte Carlo neutron simulations (1948-1949)
John and Klara von Neumann and Nick Metropolis used ENIAC for Monte Carlo simulations of neutron chain reactions. According to Haigh, Priestley and Rope, the April-May 1948 'first run' was both the first computerised Monte Carlo simulation and the first program written in the modern, EDVAC-style code paradigm to be executed on any computer
First numerical weather forecasts (1950)
Charney, Fjørtoft and von Neumann's group integrated the barotropic vorticity equation on ENIAC in March-April 1950. Each 24-hour forecast took about 24 hours to compute, and about 100,000 punched cards were produced during the month-long expedition
Computation of pi and e (1949)
George Reitwiesner and colleagues at BRL computed pi to 2,037 decimal places in about 70 hours, and e to more than 2,000 places, so that von Neumann could test whether the digits behaved statistically like random numbers