The Pilot ACE.

Last updated: 5 March 2018: David Green

1. Introduction.

This web page describes the Pilot ACE computer, which first ran on 10th May 1950.

Pilot ACE now

Anyone revisiting this page will find it much altered. It started life as a way for me to document a Pilot ACE emulator I was writing. Since then I have spoken to many people and peered into many archives and accumulated a good deal of information.

The page is now reborn as a resource for the Pilot ACE. Assembled here is all the software and information I have been able to find. The emulator has been relegated to one section.

So far as possible, my Windows based emulator it is an historically correct representation of the Pilot ACE, a 'virtual' Pilot ACE computer. The original Pilot ACE is in a glass case in the Science Museum in Kensington, London (see above). Don't touch. But you can still program and play with a replica of the Pilot ACE on your PC, using the emulator. While this page is under construction the original emulator page can still be viewed at the old web-site.

2. Contents

This document contains the following sections (or aims to - it is very much a work in progress):

1. Introduction.
2. Contents.
3. Some History.
  3.1 The Evolution of the Pilot ACE.
  3.1 10 May 1950.
  3.2 November 29th - December 1st 1950.
  3.3 1951-1956.
  3.4 Thereafter.
4. The Pilot ACE Structure.
  4.1 The Computer Console.
  4.2 The Multiplier.
    4.2.1 Detailed Operation of the Multiplier.
    4.2.2 Multiplication Subroutines.
    4.2.3 Unorthodox Uses of the Multiplier.
    4.2.4 Example: Counting the non-zero bits in a word.
    4.2.5 Circuit Diagrams.
  4.3 The Drum.
5. The Pilot ACE Instruction Code.
  5.1 Some Notes about Interpreting the Pilot ACE Documentation.
  5.2 The Final Code.
6. Pilot ACE Emulators.
  6.1 Donald Davies' "Pilot ACE Simulaton Program", 1999.
  6.2 A Java version of Donald Davies' Simulator, 2001.
  6.3 A Windows-based Emulator, 2006-2019.
7. Programs.
  7.1 Program Input.
    7.1.1 Initial Card.
    7.1.2 Aligning the Scope.
    7.1.3 Card Headers.
  7.2 Demonstration Programs
    7.2.1 The 'Successive Digits' program.
    7.2.2 The 'Day of the Week' program.
    7.2.3 The 'Smallest Factor' Version 1.
    7.2.4 The 'Smallest Factor' Version 2.
    7.2.5 The 'Smallest Factor' Version 3.
    7.2.6 The 'Bouncing Ball' program.
    7.2.7 DEUCE Program ZV02 - Easter Day.
    7.2.8 e to 306 decimal digits.
  7.3 Aircraft design.
    7.3.1 John Denison's Drag Program.
    7.3.2 Mike Woodger Programs?
  7.4 Matrix Algebra.
  7.5 Other Production Programs.
    7.5.1 John Denison's Shafts Program.
    7.5.2 Program P56.
  7.6 Music.
  7.7 Games.
    7.7.1 Nim.
    7.7.2 Draughts.
  7.8 Donald Davies' other programs,
    7.8.1 Squares and cubes of 1 to 1625.
    7.8.2 Fourth powers, cubes and squares of numbers up to 255.
    7.8.3 Smallest factor using double speed division.
    7.8.4 All Factors saved in DL 10.
    7.8.5 Cubes saved in DL 10.
    7.8.6 Table of sin(x) in DL9.
    7.8.7 Table of cos(x) on Drum.
    7.8.8 The Sixth Powers in DL10 program.
    7.8.9 Three Programs Not Implemented.
8. Subroutines
  8.1 Use of Subroutines
  8.2 Subroutine Library
  8.3 Multiplication
Fast Signed Multiplication subroutines M01-M04.
    8.3.2 Double Length Multiplication M09.
  8.4 Division
Non-restoring division Version 1.
    8.4.2 Non-restoring division Version 2.
    8.4.3 Non-restoring division (extracting two digits per cycle).
    8.4.4 Integer division.
  8.5 High accuracy (e.g. Double length arithmetic)
Double length signed division (H1).
    8.5.2 Double length multiplication (H2).
  8.6 Floating arithmetic
Floating Binary Point.
    8.6.2 Prepare in Floating Form.
    8.6.3 Floating Addition and Subtraction.
    8.6.4 Floating Multiplication.
    8.6.5 Floating Division.
  8.7 Read, Card Input
Subroutine R1.
    8.7.2 Subroutine R2.
  8.8 Output, punched cards
Subroutine P1, Punch Decimal Number
  8.9 Power series
Subroutine K1.
    8.9.2 Using K1 to calculate ln(1+X), (0 ≤ X ≤ 1).
  8.10 Square Root.
9. References
  9.1 Pilot ACE
  9.2 DEUCE
  9.3 General
  9.4 Sources
    9.4.1 The NPL Archive.
10. Notes
  10.1 The Initial Card.
  10.2 Wilkinson's 1955 non-recurring Division Code.
  10.3 Donald Davies' "Pilot ACE Simulaton Program".
  10.4 A Java version of Donald Davies' simulator.
11. The Fine Print - Permissions
12. More Fine Print - Disclaimer

3. The Evolution of the Pilot ACE.

The ACE Pilot Model was designed and built at the National Physical Laboratory, Teddington in England. According to Donald Davies, "The main honours for the design and construction of the Pilot Model ACE are shared by Alan M. Turing, James H. Wilkinson and Edward A. Newman, aided by a sharp nudge from Harry D. Huskey, who really started the Pilot Model idea rolling." [CJ05 ix]

The ACE computer was Alan Turing's brainchild. You can find a lot more about Alan Turing in the web-site maintained by Jack Copeland and Diane Proudfoot. Turing started to design the machine in 1945 after the close of the Second World War. He envisaged a large, sophisticated computer. In 1947 the visiting American mathematician Harry Huskey proposed building a small Test Assembly to prove the concept. This project, designed to be as simple as possible while still producing a functioning computer, started in the spring of 1947 but was abandoned. The idea was revived in 1949, renamed as the Pilot model ACE, and was completed in 1952.

The full story of the conception and construction of the Pilot ACE can be found in Copeland's book "Alan Turing's Automatic Computing Engine" [CJ05]

The Pilot Ace evolved through several stages and the instruction codes and console layout changed several times. The changes to the console can be seen in the succession of photographs displayed in the emulator picture gallery.

The console layout used in the emulator depicts the console now preserved in the Science Museum in London and the instruction code is the version described by Wilkinson in [WJ55].

Pilot ACE console

It is convenient to start our story with the eventful day when the machine first ran a program.

3.1 10 May 1950.

"Towards the end of the day on 10th May 1950 we had all the basic pulse circuits working, the control unit, one long delay line and a short delay line fitted with an additive and subtractive input. However, our only method of inserting instructions was via a set of 32 switches on which we could set up one instruction at a time in binary; our only method of output was a set of 32 lights to which a binary number could be sent".

"Unfortunately the amplifier on the delay line was barely adequate and the probability of remembering a pulse pattern for as long as a minute was not very high. We concocted a very elementary program consisting of a few instructions only; this took the number on the input switches, added it into the short delay line once per millisecond and put on the next light on the set of 32 output lights when the accumulator overflowed. The lights therefore came on at a speed which depended on the size of the number on the input switches. We laboriously fed this program again and again into the computer but each time the memory would fail before we could finish. On about the twentieth occasion we finally succeeded in inserting the whole program and all the lights flashed up instantaneously. We reduced the input number and they came on slowly one by one; we doubled it and the lights came on at twice the rate and we switched off for the day knowing the computer was working." [WJ05 99]

If you would like to relive the events of that day (but with a more reliable delay line), see the 'Successive Digits' program.

"The first Pilot ACE program became known as 'Suc Digs'. It was designed to test out the loading and operation of instructions, the single length accumulator TS16, input and output of a simple kind, both kinds of jump instruction and shifting in TS26. This simple program became the last resort when testing the machine after a failure. If it couldn't do 'Suc Digs', it was in a poor state, so 'Suc Digs' became an institution." [DD2].

3.2 November 29th and 30th and December 1st 1950.

By November, the ACE Pilot Model was working well enough for N.P.L. to risk a grand public demonstration. Day 1 for the popular press produced stories about the 'electronic brain'. Day 2 was for the technical press and day 3 for invited guests including F.C.Williams, Tom Kilburn and Maurice Wilkes.

"Most early computer builders have a 'hard luck story' for their first demonstration day. Ours was a good luck story. For the demonstration we had three main programs, two popular and one serious. Of the popular programs the first [the 'Day of the Week' program] took a date in decimal from input keys and gave out the corresponding day of the week on a cathode-ray tube while the second [the 'Smallest Factor'] took a six-figure decimal number and gave its highest factor. Popular programs provide a merciless test since the slightest error is readily apparent. The serious program traced the path of rays through a complex set of lens; it was virtually impossible for anybody not intimately connected with the computer to know for certain whether this was working correctly. In the event the Pilot ACE worked virtually perfectly for the whole of the demonstration period." [WJ05 100]

"The 'popular' program took in a six figure decimal number and 'gave its highest factor'. Since the output allowed only numbers up to 999, I think it was actually the smallest factor. A bottle of beer was offered to the press for finding any six figure prime. Whenever a multiple of three or seven was called out, Wilkinson responded 'divisible by 3' or 'divisible by 7' before it was entered. This amazed the press more than the machine itself." [DD2]

3.3 1951-1956.

"The Pilot ACE had been designed purely as an experimental machine with the object of demonstrating the competence of the team as computer engineers. It was originally intended that when it was successfully completed a full-scale computer would be built. In the event it did not work out like this. At the time when it was successfully demonstrated it was the only electronic computer in a government department and indeed the only other working computers were EDSAC at Cambridge, SEAC at the National Bureau of Standards and an early version of the Manchester machine. We naturally came under very heavy pressure to use the Pilot ACE for serious computing. We accordingly embarked on a small set of modifications which included the addition of an automatic multiplier and improvements to the control unit which made programming a little less arduous. The computer was then put into general use and did yeoman service for a number of years." [WJ05 100]

In February 1952 the Pilot ACE was moved to the Mathematics Division of N.P.L. and put into continuous service. By March 1954 it had been enhanced by the addition of a magnetic drum memory.

Although not intended to be used for large-scale computation, it was in active operation until 1956.

3.4 Thereafter.

The final version of the Pilot Ace now stands in a glass case in the British Science Museum in London, for all to see.

"During the period when the Pilot ACE was being built the English Electric Company became interested in electronic computers and a small group from the company joined us at N.P.L. ... After the success of the Pilot machine English Electric decided to gain experience by building engineered versions of this computer." [WJ05 102]

"DEUCE (Digital Electronic Universal Computing Engine) is a machine built by the English Electric Co. Ltd., from a design used by N.P.L. for the ACE Pilot Model (Automatic Computing Engine). The differences between DEUCE and the ACE Pilot Model concern certain rationalisations of design and the size of store." [EE59 7]

The first DEUCE was delivered in the spring of 1955. It is fortunate that early DEUCE models were very similar to the Pilot ACE because some documentation for the DEUCE 'Version 0' survives, and provides a valuable guide to undocumented features of the Pilot ACE.


Thereafter, English Electric upgraded DEUCE in several ways. Within a few months they introduced the Automatic Instruction Modifier (AIM). Later they made it possible to read 64 columns of each card rather than 32 (and hence two instructions per row rather than the orignal one instruction per row). Later still, they made it possible to utilise all 80 columns of a card and also increased the memory size by the addition of seven extra delay lines.

The successive models were called the Mark 0, Mark I, Mark II and Mark IIA. By September 1961 there were two Mark 0, 19 Mark 1, five Mark 2 and four Mark 2A machines in service.

Meanwhile, work finally began on the 'Big' ACE in the autumn of 1954. It was completed in late 1958 and remained in service until 1967. Only one was made. [CJ05 77]

Return to Contents

4. The Pilot ACE Structure.

4.1 The Computer Console.

4.2 The Multiplier.

The multiplier on the Pilot ACE was only partly automatic. It produced the product of two numbers which it treated as positive integers. To multiply two numbers, a and b, together, a was sent to TS20, b to DS14 odd, zero to DS14 even and a transfer (source irrelevant) made to destination 19. The product was then produced in DS14 in about two milliseconds.

Corrections had to be made to the answer if a and b were signed numbers. To make multiplication fast, it was made possible to perform other operations while multiplication was proceeding. Thus the corrections necessary if a and b were signed numbers could be built up in TS20 during multiplication, and signed multiplication took only a little over two milliseconds. It was, therefore, a subroutine but a fast one.

Because the multiplier calculated in parallel with other operations it was possible to access D20, S14, D14, S13, and D13 during multiplication, and to modify TS20 by transfering numbers to it from DL10, using TCA on. This made possible rapid conversion from binary-coded decimal to binary; conversion of card row patterns to binary; re-arrangement of word patterns; and the counting of digits in a word. These procedures are described in DEUCE News 36. [DN36]

Whether any of these procedures was implemented on Pilot ACE or all were developed later on DEUCE is an open question. In describing his emulator Davies mentions "A strict simulation would allow the programmer to interfere with [the multiplier's] operation by accessing DS14, though this was very rarely used." [DD1]. Not never. And DEUCE News 36 mentions that "It is believed that the use of TCA during multiplication was first suggested by B. Munday (then at N.P.L.)", but also that "So far as is known the detailed coding was first done at N.R.L."

In 1980 Martin Campbell-Kelly visited Mike Woodger at N.P.L., researching the history of the Pilot ACE. He found "... a notebook entitled "ACE News", which was circulated among Pilot ACE programmers for them to record and pass on interesting programming tricks they had discovered. Over a period of years, a whole folklore of programming for the Pilot ACE was recorded in this book" [MC81 p137].
No doubt it would cast light on this topic. Sadly, it seems to be lost.

4.2.1 Detailed Operation of the Multiplier.

Boothroyd appendix

4.2.2 Multiplication Subroutines.

Documentation of these multiplication subroutines has survived.

4.2.3 Unorthodox Uses of the Multiplier.

DEUCE News 36 [DN36] describes "various techniques which exploit the logical structure of the DEUCE multiplier and divider for purposes other than straightforward multiplication and division." Pilot ACE did not have an automatic divider, but the techniques listed for the multiplier were equally applicable on Pilot ACE.

Whether any of them were used is an open question. However the following example, derived from the DEUCE code, shows how it might have been done.

4.2.4 Example: Counting the non-zero bits in a word.

Recasting DEUCE News, page 11: the counting can be done in one or two ways. The method used here produces, separately

Use is made of the ability to extract information from S14 while the multiplication is in progress.

The digits of the input word are sensed in the odd minor cycles starting at P32. If P32 is present, add P1 into 140 in the next even minor cycle. If P31 is present, add another "one" to the count in 140. The original digit in 140 has moved up one place since it was inserted and the units position of the counter is now in the P2 position. The "one" which scores the presence of a P31 has to be a P2.

In this example, counting is performed at two places in 140, P1 and P17. Both counters move up and half way through MULT we have the sum of the more significant 16 digits, SM, at the P16 and P32 positions in 140. At the end of MULT we have the sum of the least significant 16 digits, SL, at P16 in 140, the sum of all digits SA at P32 in 140,1 and SM has now moved up to P16 and P32 positions in 140 (most of the P32 part has been lost). SM at P16 and P32 positions is extracted half way through MULT, and subtracted from 140 at the end of MULT.

DL10 contains

10m      P1 + P17
10m+2    P2 + P18
10m+4    P3 + P19
10m+30   P16 + P32

and the instructions are

  0  - 21 TCA on
  n  - 141 n into accumulator 141
 28  - 140 clear 140
  0  - 19 start multiply (m.c. m)
 140 - 26 (m.c. m+33)
 19  - 26 multiply by 2
 14  - 13 double (multiply by 2)
 141 - 27
 22  - 141 (TS26) OR (TS27) into 141

The result is

SA at P1 in DS141
SL at P17 in DS140
SM at P17 in TS26

4.2.5 Circuit Diagrams.

Five circuit diagrams of the multiplier have also survived but it is not known if the latest one is the final version. They were preserved by Betty Curtis and are now held at Bletchley Park.

The five diagrams were designed by G C Alway and drawn by A Roberts. They are reproduced here, courtesy Bletchley Park:

4.3 The Drum.

5. The Instruction Code

5.1 Some Notes about Interpreting the Pilot ACE Documentation.

The documents that survive are mostly undated. This matters because the instruction set changed several times during the development of the ACE.

A further complication occurs in Wilkinson's paper for the Royal Society written in 1955 [WJ55]. There he avoids the confusion caused by having the least significant digit on the left and describes the Pilot ACE as though the least significant digit of numbers is on the right, where people commonly encounter it. He also refers to digit positions P1 to P32 as P0 to P31. So care is needed in relating the paper to other descriptions of the machine.

6. Pilot ACE Emulators.

6.1 Donald Davies' "Pilot ACE Simulaton Program" 1999.

I can no longer find a reference to the simulator on the Web so I have provided a mirror here.

"The simulation is programmed in Visual Basic, Version 1, which is no longer available as a product, but the program can be copied and distributed together with enough software to run it in a Windows environment. It should be easy to adapt it for a current Visual Basic system."

Davies simulator screen shot

He notes several "deficiencies of the simulation":

"1) The multiplier. Used in the correct way, the multiplier of the simulation gives the correct result but the time it occupies is ignored. A strict simulation would allow the programmer to interfere with its operation by accessing DS14, though this was very rarely used. The ability to run programs in parallel with the multiplier makes it quite difficult to include the multiplier's effect on total time. It could simply occupy 2 major cycles as a rough estimate, but this would misrepresent the parallelism. In the simulation, a check is made that TCB is off and DS14 even is cleared, though the real machine did not do this, it would simply make errors.

2) The drum. No attempt is made to account for the delay imposed for head shifting and the 9 ms taken by transfers. This could be done if the time allowed for head shifts was known as well as the precise nature of the interlock (what things the interlock prevents).

(The simulation gives the elapsed time of the real machine accurately from the entry into a program to its completion if the multiplier, drum or cards are not used within the program.)

3) Strange instructions. The simulation has been tested with instructions such as are commonly found in programs. The example of TS20 when TCA=1 showed how easy it was to make a mistake which affected only a few kinds of instruction (in that case 20-10). It is possible that some unusual instructions exist which are not properly covered. No attempt was made to deal with 'pathological' use of instructions.

4) Card reading and punching. The operator's work of selecting and assembling a pack of cards for the reader cannot be simulated. In the simulation, the card images for input must be assembled in the files devoted to cards (numbers 128 to 383 in our scheme) and the number of the first card given in a text box. Punching produces card images with numbers in the range 256 to 383. This may overwrite existing 'punched' cards. Manual operations to copy sets of 32 words between delay lines and cards make useful card manipulations possible, but it is very different from the real thing.

The T.I.L. source will work correctly only if it is tested after the stop instruction which reads or punches a card row. Outside the time of card operations it usually gives ones.

5) Realism. Because a programmed display of all the store is necessarily very slow, the useful facility of looking at memory during running is lost. Only the output register can be seen during a run. Initial input does give a glimpse of progress, however.

At present, Visual Basic makes it impossible to have a clean halt from a running program.

The controls look nothing like the real machine. This could be remedied with extensive use of graphics, but not by me. Some Pilot model facilities such as stopping on partially specified instructions, are missing.

The simulation has manual features not present in the real machine, such as loading words into delay lines and registers and transfers between delay lines and drum tracks or card images. Words cannot be seen in 'backwards binary' form but are available in hexadecimal, decimal and instruction format. In practice, program preparation, loading and testing and changes during testing are very easy with this simulation."

6.2 A Java version of Donald Davies simulator.

In 2001, two graduates - Shih-Yun (Athena) Huang and Nick Rugai - at the Department of Computer Science, University of San Francisco, CA. completed a Master's Project, PACES (Pilot Model Automatic Computing Engine Simulation).

They updated Davies' simulator from Visual Basic to a Java application (and also a Java applet). While doing so, they "improved two functions from [the] VB simulator: (1) Run simulator in real pACE time. (2) Display all the delay lines". It seems there is no longer any reference to this project on the Web.

Java simulator screen shot

6.3 Windows-based Emulator, 2006-2018.

6.3.1. Getting Started

The current version of the emulator can be downloaded as EP20110808.ZIP.

Emulator - Main panel

Quick Operating Instructions to see the emulator work.

   To Install the emulator:

If you haven't already done so, create a folder C:\PILOTACE using Windows Explorer. Unzip the contents of the Emulator Package into this folder. The emulator and its support files should all be in C:\PILOTACE. The emulator expects to find its files in that folder and it puts output files there.

   To Start the emulator:

The menu bar offers several options, including more pictures of Pilot ACE at various stages of its development and some useful information.

   To Run the emulator:

   To Run the Demonstration Program 'Successive Digits':

'Successive Digits' was the first program to run on the Pilot ACE, back in 1950.

This program can be run from the card deck SUCDIGS.CRD, as follows:

1. 'Load' SUCDIGS.CRD (in the Menu, click 'Card Handling' > 'Load an Input Card Deck' > 'Open...', select SUCDIGS.CRD (single click on it) and press the 'Open' button.

2. Press (click just below) the 'Initial Input' key in the Card Reader Insert. The cards will read in and the program will stop with {1 25-26} on the Input Statisicer lights (that is to say, NIS = 1; SOURCE = 25; DEST = 26, remembering that the numbers have their least significant digit on the left)

Suc Digs

3. Set P22 to one on the ID. (Press the corresponding black key near the bottom of the screen)

Suc Digs

4. Press the 'ONE SHOT' key. The OS lights will gradually turn on in sequence.

5. The program will stop on (1 25-26}, ready to repeat the calculation.

Suc Digs

6. To go again, press the 'CLEAR OPS' key to clear the OS, then return to step 3.

P22 works well on my computer but you may wish to try different speeds by choosing different P values. The larger the number, the faster the OS neons will light up; the lower, the slower; so you can experiment to find a speed that suits your computer. The P numbers can be altered while 'Suc Digs' is running. To turn off a bit on the ID, raise the corresponding black key (click just above it).

   To quit the emulator:

Return to Contents

6.3.2 Limitations.

7. Programs

"Problems dealt with during 1952 included bomb trajectories, aircraft flutter calculations, a gravimetric survey, reduction of aerial survey data, pressure distribution on aircraft wings and testing a theory on geomagnetism." "During 1953 the work for aircraft firms continued to expand, and the final stage of the flutter problem - the calculation of critical speeds - was programmed. Solutions of stereograms (in the analytical treatment of photogrammetry) were undertaken for the Ordnance Survey Office; the machine was used in a investigation into the optimum setting of traffic signals under varying traffic conditions; an investigation was undertaken into the stability of particle orbits in the proposed synchrotron of C.E.R.N at Geneva." And many more projects followed. None of this material has survived, except for the following:

Several basic subroutines are held in the Science Museum archives and a few more can be found scattered through other records. They are reproduced in Section 8.

Donald Davies, who was a member of the original Pilot ACE team, rewrote several programs in 1999 for his emulator, so these are 'almost' original. I have written a few more, mainly by 'reverse coding' DEUCE programs or coding Wilkinson's flow charts. Many of the early DEUCE programs were simply transcribed from Pilot ACE code into DEUCE code, often at N.P.L., so reverse coding them produces routines that are probably very close to the originals.

Recently, John Denison's papers have come to light. They relate mostly to DEUCE but also contain documentation of two programs he wrote for Pilot ACE in 1952 and 1953. Denison worked for English Electric and was one of their employees seconded to NPL while EE was developing DEUCE.

The first of his programs, written between December 1952 and March 1953, is particularly well documented, with flow charts, coding sheets and a worked example. It calculates the drag on the fuselage of an airplane and most likely contributed to the design of the English Electric Lightning fighter jet (the first English airplane to exceed the speed of sound in level flight). It is reviewed here in Section 7.7.

His second program, written in mid-1953, relates to the critical speed of machinery. The file is labeled "Part A: Theory and Programmes" suggesting there may have been examples in a Part B, but if so that is now lost.

His records also contain a single sheet of documentation for a program he wrote for DEUCE to play music on an external loudspeaker. There is no other information. There is no indication he wrote similar code for the Pilot ACE but it would have been possible. I have attempted to do this and my code is in Section 7.7. The result sounds like this:

The solution of Linear Equations. The Science Museum has File T/1956-152 - for ACE pilot model. In it is a brown foolscap envelope: "Linear Equations and Matrix Inversion ... please return to B Curtis". It contains flow charts and code, all hand-written, for
... Linear Equations fast Apr-May 1953
... Matrix Inversion (fast) n<=13

The papers in the NPL Archive in Wroughton were documents kept by Mike Woodger so they quite possibly include some of the programs he wrote. Thus

Program P56. Science Museum inventory number 2010-95 is a tray of punched cards. They are mostly subroutines but include cards labeled P56. The pilot ACE naming convention is that P includes "Print or Punch, Output", and "subroutines in each class will be numbered from 1 to 50. The library will also contain main routines numbered 51 upwards". So P56 is probably some sort of data handling program, to read a bunch of cards and print out the contents as some sort of useful report, perhaps after some preprocessing. Maybe payroll, or survey results? Infuriatingly, card 17, for position 7/2, is missing from my copy. (Is it really missing or just finger trouble on my part?) There is no supporting documentation so working out what it did will be very difficult.

In his 1958 paper, Woodger notes "The superiority of digital over analogue machines as regards accuracy was demonstrated by a programme to calculate e to 306 decimal figures, treating the contents of one delay line as a single number of 1024 binary digits."


Christopher Strachey wrote a draughts program for Pilot ACE in his spare time while teaching at Harrow School. Strachey heard of the work on the Pilot ACE machine on 22 January 1950; by 23 February 1951 he had devised a program for the machine using eight delay lines (its full capacity). The program was tried out on 30 July 1951 at the National Physical Laboratory. Thereafter, Strachey continued to develop the program on the Ferranti Mark I machine at Manchester University. His Pilot ACE code was later reconstituted by B. Munday at N.P.L. in 1958 to be run on DEUCE. There is no record of whether or not this was successful.

7.1 Program Input.

On the Pilot ACE, the procedure to read in a new program was to select the appropriate deck of cards, place the cards in the hopper of the card reader, and then press the 'Initial Input' key.

7.1.1 The Initial Card.

"The machine is started by operating a switch [the Initial Input key] which clears all the registers and artificially operates the read feed." [WJ51B 33]

An Initial Card is needed because there is no reason to call any particular minor cycle m.c.0. When the Initial Input key is pressed the computer is able to align with the start of a word, but that word may be in an even or an odd m.c. The machine can always distinguish between even and odd because of the structure of DS14. The delay lines need to be in sync with DS14.

Pilot ACE initial card

On DEUCE, "When the Initial Input key is pressed the memory store is cleared, i.e. every word is zero. For some reason connected with the circuitry TSCOUNT is not completely cleared; instead the word {0, 0-0, 0, W, T, X} is left in it." [**EE59 87]

There is no record of whether the English Electric engineers introduced this 'error' with their circuit changes or if it was already present in the Pilot ACE. Quite possibly it was in the Pilot ACE, because it would not have caused a problem.

Fortunately two actual cards exist in the Science Museum archives. They are identical.

The initial card has this content:

rowY    {0  0-23    0  0 X}
rowX    {0  0- 0    0  0 X}
row0    {0 29-14    0  1 X}
row1    {0  0- 0    0  0 X}
row2    {0 25-13    0  0 X}
row3    {0  0- 0    0  0 X}
row4    {0 14-25    0  1 X}
row5    {0  0- 0    0  0 X}
row6    {0  0-21    0  1 X}
row7    {0  0- 0    0  0 X}
row8    {0 28-14    0  2 X}
row9    {0  0- 0    0  0 X}

Assume the worst case: after initial input, TSCOUNT contains {0 0-0 W T X}

  • When rowY reaches the read head, it sends a single shot that allows the instruction to proceed. Suppose this occurs at minor cycle m. The computer waits until m.c. m+W+2, then sends rowY to TSCOUNT for each m.c. until m.c. m+T+2, then stops with TSCOUNT containing {0 0-23 0 0 X}

  • When rowX is ready, it sends a single shot and in m.c. m+T+4 TCB is turned OFF (0-23), and the next instruction is taken from DL0 (which is DL11), that is, DL11(m+T+4) is selected as the next instruction. TSCOUNT becomes {0 0-0 0 0 X} because DL11 was set to zero by the initial input key.

  • When row0 is ready, {0 29-14 0 1 X} is read into TSCOUNT in m.c. m+T+6

  • When row1 is ready, all ones are sent to DS14(0) and DS14(1) by (29-14) and the next instruction is DL11(m+T+9), i.e. {0 0-0 0 0 X} is sent to TSCOUNT in m.c. m+T+9

  • When row2 is ready, {0 25-13 0 0 X} is read into TSCOUNT in m.c. m+T+11

  • When row3 is ready, P1 is added to DS14 during the one m.c. m+T+13 and the next instruction is DL11(m+T+13), i.e. {0 0-0 0 0 X} is sent to TSCOUNT

      If P1 is added to DS14(1), DS14(1) will become zero and there will be a carry of 1, which will be lost. So DS14(0) will remain equal to -1. Thus DS14 is non-zero if m+T+13 is odd.

      If P1 is added to DS14(0), DS14(0) will become zero and there will be a carry of 1. The nature of double length arithmetic using DS14 is that a single length transfer to DS13(0) will automatically extend the carry to DS14(1). Thus the carried 1 will be added to DS14(1), setting DS14(1) equal to zero also. Thus DS14 is zero if m+T+13 is even.

  • When row4 is ready, {0 14-25 0 1 X} is read into TSCOUNT in m.c. m+T+15

  • When row5 is ready, DS14 is tested to see if both DS14(0) and DS14(1) are zero. If so, the next instruction is DL11(m+T+18), which is odd, and {0 0-0 0 0 X} is sent to TSCOUNT in m.c. m+T+18. Set n=m+T+18. n is odd.

      If DS14 is non-zero, the next instruction is DL11(m+T+19), which is odd, and {0 0-0 0 0 X} is sent to TSCOUNT in m.c. m+T+19. Set n=m+T+19. n is odd.

  • When row6 is ready, {0 0-21 0 1 X} is read into TSCOUNT in m.c. n+2

  • When row7 is ready, TCA is turned OFF and the next instruction is DL11(n+5), i.e. {0 0-0 0 0 X} is sent to TSCOUNT in m.c. n+5.

  • When row8 is ready, {0 28-14 0 2 X} is read into TSCOUNT in m.c.n+7

  • When row9 is ready, DS14 is cleared by (28-14) and the next instruction is DL11(n+11), i.e. {0 0-0 0 0 X} is sent to TSCOUNT in m.c. n+11. As n was odd, this instruction is even. It is convenient to regard it as m.c.0.

    The machine is now in a standard condition to read the remaining cards - TCA and TCB are OFF, {0 0-0 0 0 X} is in TSCOUNT and m.c.0 is even.

    However, m.c.0 may not be aligned with the top of the scope.

    P35 is also present on row9, and this stimulates the reader to read another card.

    Return to Contents

    7.1.2 Aligning the Scope.

    7.1.3 Card Headers.

    7.2 Demonstration Programs

    7.2.1 The 'Successive Digits' program.

    As mentioned earlier, this was the first program to run on the Pilot ACE, on 10 May 1950. The original version of the program is lost and would anyway have used the instruction codes current in 1950.

    In 1999, Donald Davies recreated the code using the 1955 instruction set. "This first program became known as 'Suc. Digs'... The output was a single binary digit, running along the lamps which showed the output register. The rate of travel was adjusted by choosing an input number which was added to the accumulator until it spilled into the sign digit, then making one shift of the output digit. ... There was no record of the [code] we used on the real machine, but [my version of Suc. Digs.] does the same thing - as far as I can remember." [DD2]

    I think this is not entirely correct. The nature of the OS is that "If several words are sent to D28, the number set up on the lights will be equivalent to a number which has a one in every position where at least one of the words had a one" [WJ51A #7.2] and "The lights can only be cleared, that is the number registered in them returned to zero, by operating a manual switch" [WJ55 270]. So the output would not have shown a single digit but rather a line of ones gradually building from left to right. And Wilkinson states "we finally succeeded in inserting the whole program and all the lights flashed on instantaneously." [WJ05 99]

    This program can be run from the card deck SUCDIGS.CRD (Section 4).

    Alternatively, you can repeat the events of 10 May 1950 as follows:

    1. Press 'Clear Store' key
    2. Enter the instruction {0 0-1 s 16 17 X} on the ID keys. (Recall that the computer uses 'backwards binary' so that, for example, 16 is 00001, not 10000. And that a neon is off for 0 and on for 1. And that X indicates that P32 has the value 0 and the absence of X means P32 = 1. And that s indicates that P15 = 1. )
    3. Press the 'One Shot' key (single shot).
    4. Repeat 2. and 3. for the following instructions
    5.  {1 15-15 s  0 20  }
    6.  {0  0- 1   17 26 X}
    7.  {1  0- 1 s 30 31 X}
    8.  {1 15-15 s  0 19  }
    9.  {1 25-26    0  0 X}
    10. {1 28-29 s  0 31  }
    11. {1  0-17    0  0  }
    12. {1 28-16    0  0  }
    13. {1 16-24 s  0 28  }
    14. {1 26-28    0  0  }
    15. {0  0- 0    0  0 X} ie. zero: clear the ID keys by pressing the 'Clear ID' key.
    16. {1 19-26    0  0  }
    17. {0  0- 0    0  0 X} ie. zero.
    18. {1 26-25 s  0 21  }
    19. At this stage the computer will halt with {1 25 26} on the IS neons. Clear the last instruction from the ID, set a value on the ID neons, say P22, and press 'One Shot'. The program will slowly light up the OS neons from left to right, then stop on {1 25 26} again, ready to repeat the program.
    20. To repeat the program, a) clear the OS neons by pressing the 'Clear OPS' key, b) set a new value on the ID neons, and c) press 'One Shot'.

    The code in steps 2 and 5-8 is a small boot-strap I have written. (15-15 is a dummy instruction. It does not change the content of memory but the timing number allows the program to put the subsequent code into the correct stores.) This is one way to get the program into the computer, but I don't know if Wilkinson used this code. The code in steps 9-18 is Donald Davies' 'Suc Digs' program.

    If you tune the monitor to Delay Line 1 you will see the delay line updated as each instruction is entered.

    7.2.2 The 'Day of the Week' program.

    This was one of the three programs presented at the N.P.L. public demonstration on 29th November 1950. We don't yet have the full code for this program.

    "For the demonstration we had three main programs, two popular and one serious. Of the popular programs the first [this Program] took a date in decimal from input keys and gave out the corresponding day of the week on a cathode-ray tube while the second [Smallest Factor] took a six-figure decimal number and gave its highest factor. The serious program traced the path of rays through a complex set of lens; it was virtually impossible for anybody not intimately connected with the computer to know for certain whether this was working correctly." [WJ05 100]

    This is the only Pilot ACE program for which some original cards survive. Six original input cards are held in the archive at the Imperial College Library, London. Sadly the deck is not complete: the first card is a special card to initialise the computer and the last two cards are part of an incomplete triad. It seems possible that just one card is missing, and if so, it might be possible to resurrect the original code.

    A similar program was written for DEUCE (Calendar, ZV06) but that code is also lost.

    Code is available for a later DEUCE version ZV06T/1. However this is a more sophisticated program coded for a much upgraded version of DEUCE and so not a useful guide to what ZV06 might have been. "This demonstration program reads a date (A.D. only) set on the I.D., calculates the day of the week on which it falls and displays the answer in the scope. ... allowance is made for the change from the Julian to the Gregorian Calendar on 3rd - 13th September, 1752. Except on Mark 0 machines this program supersedes ZV06 (No. 5) because it is ... not restricted to the 19th and 20th centuries."

    7.2.3 The 'Smallest Factor' Version 1.

    Donald Davies, who was present at the demonstration in November 1950, later recalled that "The program took in a six figure decimal number and 'gave its highest factor'. Since the output allowed only numbers up to 999, I think it was actually the smallest factor. A bottle of beer was offered to the press for finding any six figure prime. Whenever a multiple of three or seven was called out, Wilkinson responded 'divisible by 3' or 'divisible by 7' before it was entered. This amazed the press more than the machine itself."

    This code in PROG07DD.CRD was developed by Donald Davies in 1999. "I have tried to reproduce the popular demonstration. ... I have made it to treat any odd number less than 232. Given a number in the input register, it tries division by 3, 5, 7,... until the quotient is smaller than the test divisor. If the remainder is zero, it signals a prime by the buzzer. If not, it outputs the smallest factor of the given number [on the OPS] and returns to the start in either case."

    To run the program:

    1. Load the program cards PROG07DD.CRD
    2. The program stops with (1 0-15) on the IS lights
    3. Enter a number on the ID lights (for example, the illustration below).
    4. Press 'ONE SHOT'. The computer calculates the smallest factor and puts it on the OS lights.
    5. To make another calculation, press 'CLEAR OPS', press 'CLEAR ID' and go to step 3.

    "A useful number for demonstration is 999,997 which is 757 x 1321". The result for this calculation is shown below.

    Smallest Factors of 999997

    This would not have been a very usable demonstration. Inputting a six digit decimal number in backwards binary and reading a three digit result in backwards binary would have been incomprehensible to most people. Davies provided input and output in decimal in his emulator but not in the Pilot ACE code.

    One way to enter the numbers as decimals is to use 4-bit binary-coded decimal in the ID, and to display the smallest factor in the same way in the OS. I have developed some code to do this in Version 2 below.

    7.2.4 The 'Smallest Factor' Version 2.

    Davies noted that "the program took in a six figure decimal number" but there is no record of how this was done.

    I have extended the code to allow the decimals to be entered as individual 4-bit binary codes in the ID, and to display the smallest factor in the same way in the OS. This is PROG07DG.CRD.

    To run the program:

    1. Load the program cards PROG07DG.CRD
    2. The program stops with (2 0-26) on the IS lights
    3. Enter a number on the ID lights (for example, the illustration below).
    4. Press 'ONE SHOT'. The computer calculates the smallest factor and puts it on the OS lights.
    5. To make another calculation, press "CLEAR OPS', press 'CLEAR ID' and go to step 3.

    Smallest Factor of 999997 in decimal

    The numbers in this screen are hexadecimal (four bits separated by a space), reading in the normal way (least significant digit on the right and least significant bit on the right). The silver switches have been adjusted to highlight the position of the separating spaces and do not play an active role in the program. The ID shows the number 999997 and the OS shows its smallest factor 757. The calculation takes about 12 seconds on my computer.

    7.2.5 The 'Smallest Factor' Version 3.

    Further investigation reveals that there is a DEUCE program ZV03 'Million Factors Slow', "a demonstration programme [which] reads a number less than a million from the I.D., computes its smallest factor, if any, and displays this, or the word PRIME, in the scope". It is another very early program, DEUCE Program Number 7, so it was almost certainly derived from a similar Pilot ACE version.

    For input, "On the I.D. set successively the digits of the number commencing with the most significant; the convention used is for the P1 - P10 keys to represent the digits 0-9. If the number has less than 6 digits set a P32 after the last one.

    The "Programme stops on 1, 30-21 X with the smallest factor or the word PRIME displayed in the scope".

    ZV03 is a candidate for reverse engineering, as we have the code, but it is not yet implemented.

    7.2.6 The 'Bouncing Ball' program.

    After the Lord Mayor's Show comes the dust cart. BOUNCE.CRD is a bouncing ball demonstration program. The program was written in 2011 and has no historical significance. However, it is authentic Pilot ACE code. It depicts a ball (in DL 8) bouncing within the confines of the monitor.

    Bouncing Ball

    To run the program:

    1. Load the program cards BOUNCE.CRD
    2. Switch the scope to DL 8.
    3. The program runs until interupted.

    Notice that the ball stays within the vertical boundaries but may run through the top or bottom of the monitor screen. This is perfectly normal (see Note 10.1).

    There is no speed control. What you see is what you get.

    7.2.8 e to 306 decimal digits.

    And a tray of cards (NPL I2) in the Woodger/NPL papers in the Science Museum Archives in Wroughton contains cards output by this program and dated December 1951. There is no more documentation but I have reprogrammed the problem and more details are here.

    8. Subroutines

    8.1 Use of Subroutines

    Noting that 'tables' or 'tables of instructions' are what we now call 'programs' ...

    "The coding of a large problem is considerably simplified by the use of standard tables of instructions which have been coded previously. Such tables of instructions are known as subroutines and it is important that they should be organised in such a manner that their incorporation is as simple as possible.

    "When a subroutine is used at several different points in the main table, one copy only is employed and arrangements are made by means of which the main table enters and obeys the subroutine instructions when required, but before doing so, it takes steps to ensure that when the subroutine is completed the machine returns to the appropriate place in the main table. The main table does this by planting an instruction called the LINK into a fixed position for each subroutine. The LINK instruction is obeyed on completion of the subroutine, and ensures returning to the correct place in the main table.

    "A subroutine may itself make use of further subroutines. A subroutine which makes use of no subroutines is called a subroutine of first order. A subroutine which makes use of subroutines of the first order only is called a subroutine of the second order. In this way subroutines of any order may be defined. The link instructions of all first order subroutines are planted in 130 and in general the link instructions of all subroutines of order n are placed in 129+n.

    "The main table plants a link in a TS and the subroutine itself plants that link in 129+n." [WJ51B #18]

    8.2 Subroutine Library

    Initially, subroutines were numbered in an ad hoc way. By the time 19 had been written, it became clear that a rational numbering system was needed, and the following directive was issued. The directive was not dated.

    "The classification of the subroutines in the Library has been revised. The subroutines in each class will be numbered from 1 to 50. The library will also contain main routines numbered 51 upwards.

    "The classes will be denoted by initial letters as follows:

       A  Floating arithmetic
       B  Complex numbers
       C  Checking
       D  Division
       E  Exponential
       F  General routines relating to functions (e.g. Interpolation)
       G  Differential equations
       H  High accuracy (e.g. Double length arithmetic)
       J  Special functions
       K  Power series
       L  Logarithms
       M  Multiplication
       P  Print or Punch, Output
       Q  Quadrature
       R  Read, Input
       S  nth root
       T  Trigonometrical functions
       V  Vectors, Matrices, Linear equations
       X  Demonstration programmes (Exposition)
       Z  Miscellaneous

    "Existing subroutines D1, E1, M1, M2, M3, M4, M5, T1, V1 will retain their present numbers. The others will be renumbered:

       Old     New  
       D.D.1    H1
       D.M.1    H2
       D.S.1    H3
       D.Sq.1   H4
       F        A1
       P.D.1    P1
       R.D.1    R1
       R.D.2    R2
       S.1      K1
       Sq.R.1   S1 "

    The original code for subroutines M1, M2, M3, M4, M5 and M9; F (i.e. A1); K1 (the old S1); H1 (was D.D.1); R1 (was R.D.1) and R2 (was R.D.2); P1 (was D.P.1) and V1 is preserved in the NPL archive at Wroughton and is reproduced below.

    9. References.

    9.1 Pilot ACE.

    Information about Pilot ACE is limited to the following few documents, and even these tend to repeat the same basic information.

    [DD1] Davies, D. W., ACE Pilot Model Simulation Program, August 1999.

    [DD2] Davies, D. W., How to Demonstrate the ACE Pilot Model Simulation, November 1999.

    [CJ05] Copeland (ed.), B. Jack (2005). "Alan Turing's Automatic Computing Engine". Oxford: Oxford University Press. ISBN 0-19-856593-3. OCLC 56539230 224640979 56539230.

    [WJ51A] "Logical Design of the Pilot Model", J Wilkinson, September 1951.
    Available from

    [WJ51B] "Programming and Coding the Pilot Model", J Wilkinson, November 1951. (Report Ma. 22/1024)?
    Available from

    [WJ53] "The Pilot ACE", J. H. Wilkinson, Chapter 11 (page 193ff) of "Computer Structures: Readings and Examples", C. Gordon Bell, McGraw-Hill Book Company

    [WJ54] "Appendix to 22/1024", J Wilkinson, 1 March 1954.
    Available from

    [WJ55] Wilkinson, J. H., "An assessment of the system of optimum coding used on the pilot automatic computing engine at the National Physical Laboratory." Proc.Roy.Soc. Volume A 248, pp.253-281, 1955.

    [WJ05] Wilkinson, J. H., "The Pilot ACE at the National Physical Laboratory", Chapter 4 in [CJ05]

    [MC81] Campbell-Kelly, Martin. "Programming the Pilot ACE: Early programming activity at the National Physical Laboratory.", Annals of the History of Computing Volume 3, No.2, pp.133-162, 1981.
    (available at but at a cost of $19.00).

    [NPL82a] The Pilot Ace (Part One) (Recollections of the early development work carried out by the team at N.P.L. on the construction of the Pilot ACE computer. This N.P.L. film is told by Dr J Wilkinson and Mr M Woodger, in 1982 by two members of the team. NPLdigital Sep 3, 2008)
    (This film was on but is no longer available there.)

    [NPL82b] The Pilot Ace (Part Two)
    (Once at but no longer available there.)

    [WM58] Woodger M., "The History and Present Use of Digital Computers at the National Physical Laboratory." Process Control and Automation, November 1958

    Return to Contents

    9.2 DEUCE.

    The following documents explaining how to use DEUCE are available on the Internet:

    [BA57A] "Standard Operating Instructions for DEUCE", Report NS y 78, Birchmore Miss A., 21 November 1957, here.

    [BA57B] "DEUCE Control Panel Manual", Report NS y 79, Birchmore Miss A., 21 November 1957, here.

    [EE56A] "English Electric DEUCE Programming Manual", Report NS-y-16, May 1956, here.

    "English Electric DEUCE Logical Design Manual Part 1 - General Description", here.

    "English Electric DEUCE Logical Design Manual Part 2 - Drawings", here.

    [EE59] "A Programming Handbook for the Computer Deuce", Burnett-Hall D.G. and P.A.Samet, Tech.Note MS.38, April 1959, RAE Farnborough, here.

    [DN36] "DEUCE News No 36. April 1959; Report NS y 141; "Multiplier and Divider Techniques", J. Boothroyd, here.

    Return to Contents

    9.3 General.

    [HAS55] Cecil Hastings, Jr. "Approximations for Digital Computers", Princeton University Press, Princeton, N.J., 1955.

    [EAU78] ELECTRONICS Australia, November, 1978.

    [JPPC] John Parks, private correspondence.

    Return to Contents

    9.4 Sources.

    9.4.1 The NPL Archive in the Science Museum Library.

    The Science Museum Library & Archives, at Wroughton in Wiltshire (, contains the "NPL archive". This is a collection of documents "left [by Mike Woodger] in Room 113, Bldg 93, NPL, Teddington on his retirement on 31 March 1983". The very extensive collection includes a small group of documents relating to Pilot ACE, especially the source code and flow charts for several early subroutines (see Section 8.2).


    The Turing Archive for the History of Computing ( is the "Largest web collection of digital facsimiles of original documents by Turing and other pioneers of computing. Plus articles about Turing and his work, including Artificial Intelligence."

    It contains many documents relating to the Automatic Computing Engine (ACE) and in particular, several descriptions of the Pilot ACE.

    Return to Contents

    10. Notes.

    10.2 Wilkinson's 1955 non-recurring Division Code.

    I hesitate to question a central example in a refereed paper by an emminent mathematician like Wilkinson. However, I cannot get his code to work correctly as it stands.

    For example, P30/(P29+P30) = (1/4)/(3/8) = 2/3 causes a 29-29 error, despite having |a|<|b|

    It seems that we should conform to |a|<|b/2|

    But then P30/(P30+P31) = (1/4)/(3/4) = 1/3 is calculated as 2/3.

    Wilkinson says "As is the case with many of the most fundamental subroutines, a very sophisticated use of the code is made." [WJ55 274] So I may well be missing something. Work in progress!

    Wilkinson's original code is included in program PROGJW01.CRD. The subroutine, extended to plant a return link supplied in TS16, is in DL2 and a trivial main program is in DL1. To run it, proceed as in Section 8.2.2

    Return to Contents.

    11. Some Fine Print - Permissions:

    Individuals are welcome to use this package without charge for their own private enjoyment. The only proviso is that if they give it to others they are asked to pass on the complete package.

    Organisations or individuals who wish to use the emulator for business purposes or in a fee paying environment should contact the Author to negotiate a royalty to share the benefits of the many hours invested in this project.

    12. More Fine Print - Disclaimer:

    The emulator is used entirely at the risk of the user. The Author has tried hard to eliminate faults from the programs but does not claim that the emulator is free of faults. No claims are made regarding its correctness, reliability or fitness for any particular purpose. The Author shall not be liable for errors contained herein or for incidental or consequential damages or loss of data resulting from the use of this program.

    ©2010-2018 David Richard Green. All rights reserved.