`ENIAC U. S. Army`

# A Logical Coding System Applied to the ENIAC

## SECTION III: DETAILED DESCRIPTION OF THE SIXTY ORDERS

We have seen that there are five kinds of storage places used in the ENIAC. Numbers may moved between these places but not arbitrarily. From a card in the reader numbers may only be sent to the constant transmitter; from the constant transmitter numbers may only be sent to 1 of the 20 accumulators; likewise numbers in the function tables can only go to the accumulators; numbers in accumulators may be sent to other accumulators or from certain special accumulators to the printer; from the printer the numbers may only be taken by carrying away the IBM cards. It is accordingly clear that a considerable number of the 60 available orders must provide for moving numbers about. In fact there are 50 orders used for this purpose. Before describing them we should remark that actually 67 orders are set up on the ENIAC making 2 sets of orders possible; 53 are common to both sets. Of the dual orders we shall name those of the first set 73, 74, 91, 92, 93, 94, 95, and those of the alternate set 73a, 74a, 91a, 92a, 93a, 94a, 95a.

The order which sends the 8 10-digit numbers from the reader to the constant transmitter we call the read order, order 62 (code name: Rd). It requires a little over a half second to complete.

### CONSTANT TRANSMITTER TO ACCUMULATORS 11 AND 15

Since there are 10 10-digit numbers in the constant transmitter (In addition to the 8 coming from the reader, there are 2 fixed 10-digit numbers set with switches.) and 20 accumulators, 200 orders would be required to make it possible to send any number immediately to any accumulator. It would be possible to have 1 order which caused all 10 numbers to go to a specific set of 10 accumulators. However, this would mean that all 10 accumulators had to be clear before the order could be given. The compromise agreed upon for these 2 sets of 60 orders is a set of 5 "constant transmitter" orders, 80-84 (code names: AB, CD, EF, GH, JK), each of which sends 2 numbers, A&B, C&D, E&F, G&H, or J&K to accumulators 11 and 15 respectively. J&K store the 2 10-digit arbitrary constants.

Consider order 80 for example: From Table 2.I we see that order 80 starts with pulse D-7 which via the pulse amplifiers blossoms into pulses D-4, B-3, C-5, J-3, D-6, J-2, and E-1.

Figure 3.2

From Figure 3.2 we see that pulse D-7 causes the constant transmitter to send out B, then A on digit tray one (see digit tray hook-up). B-3 causes accumulator 15 to receive B from digit tray 1, adding it to its previous contents; J-3 causes accumulator 11 to clear, then receive A from digit tray 1. C-5 causes the basic sequence for the next order to start while A and B are moving from the constant transmitter to accumulators 11 and 15. This is a 7 add-time order.

### ACCUMULATOR TO ACCUMULATOR

There are, in the first and alternate sets of 60 orders, 39 and 38 orders respectively which move numbers from one accumulator to another. We shall discuss first the 34 orders in this category common to both sets.

There are 16 orders 01, 02, 03, 04, 05, 10, 11, 12, 13, 14, 15, 21, 22, 23, 24, 25, controlling accumulators 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 14, 15, 17, 18, 19 respectively which we may name "accumulator X listen", "X[l]", orders. Of these, order 0.1 is typical. Order 01 starts (see Tables 2.I and 2.II) with S-1, which leads to C-1, C-5, D-6, J-2, and E-1. S-1 (see Figure 3.3) causes accumulator 1 to clear and then receive from digit tray 2; C-1 stimulates a dummy in the constant transmitter whose only purpose is to delay J-1 which causes accumulator 15 to transmit positively onto digit tray 2 then clear; C-5, of course, starts the basic sequence for the next order. The effect, then, or order X is for accumulator X to clear, then receive from accumulator 15 which then clears.

Figure 3.3

Order 20 (code name: 13[l]) differs from these orders in that accumulator 13 does not clear before receiving from accumulator 15.

There are likewise 16 orders, 31, 32, 33, 34, 35, 40, 41, 42, 43, 44, 45, 51, 52, 53, 54, and 64 controlling accumulators 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 14, 15, 17, 18, and 19 respectively, which we may name "accumulator X talk" or "X[t]" orders. The effect of X[t] is for accumulator X to send its number positively to accumulator 15 with both accumulators holding. This leads to addition in accumulator 15.

Order 50 (code name: 13[t]) is similar except that accumulator 13 clears after sending.

In the alternate set of orders, orders 91a, 92a, 73a and 74a (code names: 20[l], 20[t], 6[l], and 6[t]) are used for accumulator 20 listen, accumulator 20 talk, accumulator 6 listen, and accumulator 6 talk respectively.

In the first set of orders, accumulator 6 is treated essentially like 4 smaller accumulators: respectively digits 1,2,3; digits 4,5,6; digits 7,8; and digits 9,10,11. Order 92 (code name: 6(11,10,9)) adds the numbers in accumulator 6(11,10,9) and accumulator 15(11,2,1) and leaves the sum in both. Order 93 (code name: 6(8,7)) adds the numbers in accumulator 6(8,7) and accumulator 15(2,1), leaving the sums in accumulators 6(8,7) and 15(2,1). All these accumulator orders take 7 add-times. To control accumulator 20, order 91 (code name: 18 <--> 20) is provided which takes 9 add-times and interchanges the numbers in accumulators 18 and 20 via accumulator 15.

### THE TRANSFER ORDERS IN THE FIRST SET

Any order which sends a number to accumulator 6(3,2,1) we shall call (with J. von Neumann) a transfer order because the next order will automatically be taken from a different part of the function table, i.e., the control is transferred from one address to another. Order 73 (code name: 6R3) is the simple transfer for the first set. It causes accumulator 6(3,2,1) to clear and receive the number in accumulator 15(3,2,1) and then clears accumulator 15. We might call order 74 (code name: 6R6) the transfer with a rider. It causes accumulator 6(6,5,4,3,2,1) to clear, then receive the number in accumulator 15(6,5,4,3,2,1) and then clears accumulator 15. The purpose of this order is to make it possible to store an extra address in accumulator 6(6,5,4). Both of these transfer orders take 13 add-times.

### FUNCTION TABLE TO ACCUMULATOR ORDERS

The first system has four function-table-to-accumulator orders and the alternate system has five, of which two are transfers. Two of these orders are common to both sets. The first is order 72 (code name: FT). Accumulator 11 is cleared, then the function table transmits 12 digits and 2 signs as F (address stored in accumulator 8(3,2,1)). Accumulator 11 receives the left sign and the left 6 digits at far left, and accumulator 15 receives the right sign and the right 6 digits at far left. The argument in accumulator eight is then increased by one. The time consumed is 13 add-times.

Order 70 (code name: N2D) we call the next 2 digits order. It operates to send accumulator 15(2,1) the two digits following the order 70 in the function table. Fourteen add-times are required.

In the first system the orders 94 and 95 (code names: N4D, N6D) operate similarly to send the next 4 and next 6 digits to accumulator 15 in 20 and 26 add-times respectively.

The alternate system contains an order 93a (code name: N3D8) which sends, in 20 add-times, an address from the next 2 order positions in the function table to accumulator 8(3,2,1) to be used as address for order 72. The first digit in the next 2 order positions is added to the digit in accumulator 8(4); accumulator 8(3,2,1) is cleared before receiving.

In the alternate system the transfers 94a and 95a (code names: N3D6, N6D6) send in 20 or 26 add-times 1 or 2 addresses from the next 2 or 3 order positions in the function table to accumulator 6. In order 94a, as in 93a, the first digit in the next 2 order positions is added to accumulator 6(4).

### ACCUMULATORS TO PRINTER

The last transmission order, order 61 (code name: Pr), causes the next IBM card to move into position in the printer and then the numbers in accumulators 1, 2, 15-20 to be printed on the card and held in the accumulators. One second is required.

### THE 10 OPERATIONS

It is not quite true that each of the 50 transmission orders we have just described accomplishes transmission only. All the "X[t]" orders, for example, are also addition orders; the transfer orders perform the important operation of shifting the control. The following 10 orders, however, are more explicitly operative.

• Order C. Order 00 (code name: C) simply clears accumulator 15 and takes 7 add-times.
• Halt. Order 71 stops the ENIAC. It is only order which does not stimulate the basic sequence for the next order.
• M. Order 63 replaces the number in accumulator 15 by its complement via accumulator 13 in 7 add-times; for example, to form a-b, send b to accumulator 15, use order 63, then send a to accumulator 15.
• D.S. Order 65 replaces the plus or minus sign in accumulator 15 by the plus sign. This is not the same as the change sign order 63 even if the number is negative since it does not affect the first 10 digits. This order is added to facilitate the use of accumulators to hold two numbers: an arbitrary number and a number of known sign. This order takes seven add-times.
• X. Order 30 is the multiplication order. To use it, the multiplier must have been previously put in accumulator 11, the multiplicand in accumulator 15, and any number to be added to the product in accumulator 13. After multiplication the product plus the contents of accumulator 13 are placed in accumulator 15 and the multiplier and multiplicand remain in accumulators 11 and 12; accumulator 13 clears. This order takes 15 add- times. The factors are treated as if they had 10 digits each. Only 10 places of the partial products are kept. It follows that the answer may be incorrect in the 10th place from the left, by 14 for maximum error or 7 for the average error.
• "Div" Order 55 causes the number in accumulator 15 to be divided by the number in accumulator 7. During this process the number in accumulator 5 is replaced by the remainder and the quotient goes to accumulator 15. Accumulator 13 must be previously cleared. Assuming that the decimal point in the numerator and denominator is at the extreme left, the quotient has its decimal point 2 places to the right, and therefore the numerator must not exceed the denominator by more than a factor of 100. Order 55a is arranged so that the quotient is not shifted and therefore the numerator must not exceed the denominator. The time required for division is variable but is of the order of 130 add-times.
• "SQRT" Order 60 differs from order 55 only in that the operation is different and accumulator 4 is not involved formally. The radicand must not exceed .2499999999.
• Sh and Sh' Order 90 and 85 are called shift and shift' respectively. Each takes two order positions in the function tables and requires 20 add-times to complete. The shift order causes the number in accumulator 15 to be shifted as indicated by the two digits in the next order position. The first of these 2 digits is 0 or 9 according as the shift is to the left or right and the second digit defines the magnitude of the shift, from 1---5 inclusive. In the shift' order 85, the number in accumulator 15 is shifted as in order 90, but also the complementary amount in the complementary direction and put in accumulator 12. Thus 85 04 would replace a in accumulator 15 by 10**4a and put 10**-6a in accumulator 12.
• C.T. The most important order, from the point-of-view of control, is order 75, the conditional transfer. The effect of the order is to shift the control from the address in accumulator 6(3,2,1) to accumulator 6(6,5,4) if the number in accumulator 15 is positive or zero. If the number is negative, the program continues with address in accumulator 6(3,2,1). Sensing the sign of the number in accumulator 15 is accomplished by sending the pulses from the P-M line of the add output socket of accumulator 15 to a two-stage stepper called P-M discriminator no. 2. Shifting the control is accomplished by sending the number from accumulator 6 to accumulator 10 through a shifter which shifts 6, 5, 4 to 3, 2, 1, clears 3, 2, 1, and leaves the other digits alone; the number is then returned to accumulator 6. In section 6 we shall consider more carefully the use of this order. It is immediately clear that because of it the machine can make any choice of sequences of operations that can be made to depend on the sign of a number. Most computations involve more or less simple inductions which in turn depend on decisions based on the sign of a number.

UP | PREV | NEXT