Est. 1946 Advanced

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

Paradigm Hardware configuration (plugboard dataflow, 1945-1948); one-address order code read from function tables (1948-1955)
Typing None (untyped). All data were signed ten-digit decimal numbers held in accumulators
First Appeared 1946 (public unveiling 14 February 1946; first production problem, for Los Alamos, ran from December 1945)
Latest Version 100 order code, specified 6 July 1948 (it actually provided 84 distinct instructions); essentially unchanged until ENIAC was retired on 2 October 1955

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:

UnitRole
20 accumulatorsEach held a signed ten-digit decimal number and could add or subtract
MultiplierUsed four accumulators to multiply
Divider/square-rooterUsed five accumulators
3 function tablesBanks of ten-position rotary switches holding constants and lookup tables
Constant transmitterFed constants, including values from punched cards
Master programmerTen “steppers” that counted repetitions to build loops and branches
Initiating and cycling unitsStarted the machine and supplied the timing pulses
Reader and printerIBM 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:

DateEvent
15 March 1948Converter fitted to ENIAC
29-31 MarchMetropolis begins setting up the new instruction set and gets “the basic sequence & 2 or 3 orders working”
6 AprilA 79 order code is implemented
12 AprilA demonstration for Applied Physics Laboratory students is “the first adequate demonstration using the new coding techniques”
17 AprilFirst production run of the Los Alamos Monte Carlo program
28 AprilMetropolis reduces the clock from 100 kHz to 60 kHz, and reliable running becomes the norm
10 MayMonte Carlo production work completed
6 JulySpecification 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

1943
The U.S. Army Ordnance construction contract is signed on 5 June 1943. Secret work begins the following month at the University of Pennsylvania's Moore School of Electrical Engineering under the code name Project PX, with J. Presper Eckert and John Mauchly leading the design
1945
A Los Alamos team takes over the machine for several weeks from December 1945, before ENIAC has been declared fully operational, to run calculations for the hydrogen-bomb programme. This is ENIAC's first real problem
1946
ENIAC is announced to the public on the evening of 14 February 1946, with a trajectory demonstration program developed by Betty Snyder and Jean Jennings, and formally dedicated the next day. It is shut down on 9 November 1946 to be moved to the Army's Ballistic Research Laboratory (BRL) at Aberdeen Proving Ground, Maryland
1947
ENIAC is switched on again at Aberdeen on 29 July 1947. A 10 July 1947 document, 'Control Code for ENIAC', associated with Adele Goldstine, documents a plan to drive the machine from instructions stored as two-digit codes in its function tables. The conversion is announced at a press conference at Aberdeen on 12 December 1947
1948
The converter unit is fitted on 15 March. Nick Metropolis reconfigures ENIAC for a 79-order code, which is complete by 6 April. On 12 April a demonstration 'using the new coding techniques' runs without problems, and the first production run of the Los Alamos Monte Carlo program, coded largely by Klara von Neumann, follows on 17 April. By 6 July a '100 order code' is specified
1949
ENIAC computes pi to 2,037 decimal places in about 70 hours of machine time, a run requested by John von Neumann to study the statistical distribution of the digits. George Reitwiesner's account appears in January 1950
1950
Starting on 5 March 1950, Jule Charney, Ragnar Fjørtoft, John Freeman, George Platzman and Joseph Smagorinsky spend 33 days at Aberdeen and make four 24-hour weather forecasts on ENIAC, the first computer weather forecasts. They are reported in Tellus that year by Charney, Fjørtoft and von Neumann
1955
ENIAC is switched off for the last time at 11:45 p.m. on 2 October 1955
1997
The six original ENIAC programmers (Kay McNulty, Jean Jennings, Betty Snyder, Marlyn Wescoff, Fran Bilas and Ruth Lichterman) are inducted into the Women in Technology International Hall of Fame
2004
Till Zoppke's diploma thesis at the Freie Universität Berlin, supervised by Raúl Rojas, produces a Java simulation of ENIAC. It lets users wire units together with virtual cables and run the machine step by step
2014
Thomas Haigh, Mark Priestley and Crispin Rope publish articles in IEEE Annals of the History of Computing that use the ENIAC operations log to date the 1948 conversion to April 1948, earlier than the 16 September 1948 date given in Herman Goldstine's 1972 history. Kathy Kleiman's documentary 'The Computers' about the six programmers is released the same year

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

Language Influence

Influenced By

EDVAC (First Draft order code) IAS machine order code

Running Today

Run examples using the official Docker image:

docker pull
Last updated: