The DEUCE (Digital Electronic Universal Computing Engine) was one of the earliest British commercially available computers, built by English Electric from 1955. It was the production version of the Pilot ACE, itself a cut-down version of Alan Turing's ACE.

Hardware description The DEUCE had 1450 thermionic valves, and used mercury delay lines for its main memory; each of the 12 delay lines could store 32 instructions or data words of 32 bits each. It adopted the then high 1 megahertz clock rate of the Pilot ACE. Input/output was via Hollerith 80-column punch-card equipment. The reader read cards at the rate of 200 per minute, while the card punch rate was 100 cards per minute. The DEUCE also had an 8192-word magnetic drum for main storage. To access any of the 256 tracks of 32 words, the drum had one group of 16 read and one group of 16 write heads, each group on independent moveable arms, each capable of moving to one of 16 positions. Access time was 15 milliseconds if the heads were already in position; an additional 35 milliseconds was required if the heads had to be moved. There was no rotational delay incurred when reading from and writing to drum. Data was transferred between the drum and one of the 32-word delay lines.

The DEUCE could be fitted with paper tape equipment; the reader speed was 850 characters per second, while the paper tape output speed was 25 characters per second. (The DEUCE at the University of New South Wales {UTECOM} had a Siemens M100 teleprinter attached in 1964, giving 10 characters per second input/output). Decca magnetic tape units could also be attached. The automatic multiplier and divider operated asynchronously (that is, other instructions could be executed while the multiplier/divider unit was in operation). Two arithmetic units were provided for integer operations: one of 32 bits and another capable of performing 32-bit operations and 64-bit operations. Auto-increment and auto-decrement were provided on eight registers from about 1957. Array arithmetic and array data transfers were permitted. Compared with contemporaries such as the Manchester Mark 1, DEUCE was about ten times faster.

The individual words of the quadruple registers were associated with an auto-increment/decrement facility. That facility could be used for counting and for modifying instructions (for indexing, loop control, and for changing the source or destination address of an instruction).D. G. Burnett-Hall & P. A. Samet, "A Programming Handbook for the Computer DEUCE", Royal Aircraft Establishment, Ministry of Aviation, London (England), April 1959, Technical Note M.S.38.

Being a bit-serial machine, access time to a single register was 32 microseconds, a double register 64 microseconds, and a quadruple register 128 microseconds. That for a delay line was 1024 microseconds.

Instruction times were: addition, subtraction, logical operations: 64 microseconds for 32-bit words; double-precision 96 microseconds; multiplication and division 2 milliseconds. For array arithmetic and transfer operations, time per word was 33 microseconds per word for 32 words.

Floating-point operations were provided by software; times: 6 milliseconds for addition and subtraction, 5.5 milliseconds average for multiplication, and 4.5 milliseconds average for division.

In the early machines, all instructions involving the magnetic drum were interlocked while an operation was in progress. Thus, if the read heads were moved, any subsequent magnetics operation such as to read a track or write a track, were prohibited from proceeding until the first had completed. From about 1957, a new unit, called "rationalised magnetics" was made available. This unit eliminated unnecessary interlocks. Thus, it was possible to execute an instruction that moved the read heads: if followed by an instruction to move the write heads, or to write a track, such instructions were not interlocked, and could proceed in parallel with moving the read heads.The DEUCE at NPL was intentionally not upgraded, and the DEUCE at the University of new South Wales was not upgraded until 1963.

The front panel of the DEUCE featured two CRT displays: one showed the current contents of registers, while the other showed the content of any one of the mercury delay line stores.

From about 1958, seven extra delay lines could be attached, giving 224 more words of high-speed store. An IBM 528 combined reader–punch could be substituted for the Hollerith equipment, giving the same input/output speeds, in which case the machine was called Mark II. Automatic conversion of alphanumeric data to BCD was provided on input, and the reverse operation on output, for all eighty card columns. On this equipment, reading and punching could proceed simultaneously, if required, and thus could be used for reading in a record, updating it, and then punching an updated record simultaneously with reading in the next record. With the seven extra delay lines, the DEUCE was denoted Mark IIA.

Software The principal high-level programming languages were GEORGE (General Order Generator), ALPHACODE, STEVE, TIP, GIP, and ALGOL.Brian Randell & L. J. Russell, "DEUCE ALGOL", Report W/AT 844, Atomic Power Division, English Electric Co., Whetstone, Leicester, England, Feb. 1962. Assembler language translators included ZP43 and STAC.DEUCE Library Service, "DEUCE STAC Programming Manual", English Electric Co., Ltd, Kidsgrove, Staffs, England, c. 1960.

Invented by Charles Leonard Hamblin in 1957, GEORGE was closest to present-day programming languages. It used Reverse Polish Notation. For example, to evaluate e = ay2 + by + c, one wrote a y dup × × b y × + c + (e). where "dup" duplicates the previous entry, being the same as using "y" here.

GEORGE provided a 12-position accumulator as a push-down pop-up stack. Using a variable name in a program (e.g., 'd') brought the value of variable 'd' into the accumulator (i.e., pushed d onto the top-of-stack), while enclosing a name in parentheses {e.g., (d) } assigned to variable 'd' the value at the top of the stack (accumulator). To destroy (pop and discard) the value at the top of the stack, the semicolon (;) was used. The following GEORGE program reads in ten numbers and prints their squares: 1, 10 rep (i) read dup × punch

] In the above program, the "dup" command duplicated the top of the stack, so that there were then two copies of the value at the top of the stack.

GIP (General Interpretive Programme) was a control program for manipulating programs called "bricks". Its principal service was in the running of programs from the several hundred in the DEUCE linear algebra library. Preparation of such a program involved selecting the required bricks (on punch cards), copying them and GIP in a reproducing punch, and assembling the copies into a deck of cards. Next, simple codewords would be written to use the bricks to perform such tasks as: matrix multiplication; matrix inversion; term-by-term matrix arithmetic (addition, subtraction, multiplication, and division); solving simultaneous equations; input; and output. The dimensions of matrices were never specified in the codewords. Dimensions were taken from the matrices themselves, either from a card preceding the data cards or from the matrices as stored on drum. Thus, programs were entirely general. Once written, such a program handled any size of matrices (up to the capacity of the drum, of course).Deuce Library Service, "DEUCE General Interpretive Programme", 2nd Ed., The English Electric Company Limited, Kidsgrove, Staffs, England, c. 1963. A short program to read in a matrix from cards, to transpose the matrix, and to punch the results on cards requires the following codewords: 0, 0, 5, 1 5, 0, 120, 2 120, 0, 0, 3 In each of the codewords, the fourth number is the brick number. The first codeword specifies that the matrix is read from cards and stored at drum address 5; the second codeword specifies that the matrix at drum address 5 is transposed, and the result is stored at drum address 120; and the third punches that result on cards.

STAC was a macro-assembler. Most instructions were written in the form of a transfer, in decimal, such as 13-16, meaning to copy the word in register 13 to register 16. The location of the instruction was not specified. STAC allocated an instruction to a word in a delay line, and computed the six components of the binary instruction. It allocated the next instruction to a location that was optimum, to be executed as soon as the previous instruction was complete, if possible.

The following program reads in a value, n, and then reads in n binary integers. It punches out the integer and its square. Comments in lower case explain the instruction. 1.0 12-24 start the card reader. The location of the program is specified as 1.0. 0-13X read one number (n) from the card reader. The letter X causes the computer to wait until the first row of the card has arrived at the reading station. R2 12-24 start or re-start the card reader. 0-16X read one number to be squared, store it in the multiplier register. 9-24 stop the card reader. 16-21.3 copy the number to the multiplicand register. 30-21.2 clear the low-order bits of the multiplicand register. MULT 10-24 start the card punch. 21.2-29X send the square to the card punch. 9-24 stop the card punch. 27-26 decrement n. 13-28 R1 test for zero. Branch on zero to R1; branch on not zero to R2. R1 1-1X halt; the program is complete. STAC would produce the following instructions (in addition to the binary program). The memory location of each instruction is shown at the left. 1.0 12-24 1.2 0-13X 1.4 12-24 1.6 0-16X 1.8 9-24 1.10 16-21.3 1.13 30-21.2 1.16 0-24 wait 1 1.18 1-1 wait 1 1.20 10-24 1.22 21.2-29X 1.24 9-24 1.26 27-26 1.28 13-28 1.3 1.3 1-1X Wait and timing numbers are not shown, except for the multiplication.

Programming Programming the DEUCE was different from other computers. The serial nature of the delay lines required that instructions be ordered such that when one instruction completed execution, the next one was ready to emerge from a Delay Line. For operations on the single registers, the earliest time that the next instruction could be obeyed was 64 microseconds after the present one. Thus, instructions were not executed from sequential locations. In general, instructions could transfer one or more words. Consequently, each instruction specified the location of the next instruction. Optimum programming meant that as each instruction was executed, the next one was just emerging from a Delay Line. The position of instructions in the store could greatly affect performance if the location of an instruction was not optimum.

Reading data from the card reader was done in real-time – each row had to be read as it passed the read brushes, without stopping. Similarly for the card punch; the word for a particular row was prepared in advance and had to be ready when a given row of the card was in position under the punch knives. The normal mode of reading and punching was binary. Decimal input and output was performed via software.