Computing History · Early Computing

Ring-Counter Accumulators and the Cost of Rewiring ENIAC

How ten flip-flops per digit hold a decimal number and count incoming pulses, how cables and switch banks define a program, and what function-table coding changed in 1948.

The ENIAC accumulator does not add so much as count. Ten decade counters, one per decimal place, each advance one position for every pulse arriving on their input wires, and the carry out of a place is one more pulse handed to the counter on its left. Addition takes one addition time, 200 microseconds, because every digit’s pulses land inside that window, not because a carry chain resolves quickly. A digit is a position in a ring of ten flip-flops rather than four bits, numbers move as counted pulse trains, and a program is cable connections and switch positions.

Ten flip-flops to hold one decimal digit

Goldstine and Goldstine in 1946 describe an accumulator as ten decade counters plus a binary sign counter, with carry from each decade to the one on its left and from the tenth decade into the sign counter. A decade counter is ten Eccles-Jordan flip-flops of two triodes each, and Weik’s 1961 rule is that exactly one is reset at any moment, a pulse advances it one stage, the last stage couples back to the first so the count recirculates, and passing the nine position sends a pulse to the next ring.

One-hot decimal storage has a price that is a multiplication: ten flip-flops per decade times ten decades is 100 flip-flops per ten-digit number before the sign counter, so twenty accumulators hold 200 digits in 2,000 flip-flops. A decimal digit carries about 3.32 bits, so a binary-coded digit needs four flip-flops; the ring spends ten, two and a half times as many active devices for the same digit.

The premium buys the absence of machinery a binary register needs: no conversion at input or output, since the stored form is the printed form; no compare-against-nine and no lookahead, since the count wraps; no separate carry network, since the carry is a pulse on a wire. The cost is an invariant, exactly one stage hot: a lost pulse leaves the ring one position behind and a spurious pulse one ahead, neither visible in the digit’s value, so every flip-flop state was brought out to a neon lamp.

A digit arrives as a count of pulses

A digit tray carries eleven wires and a ground. Ten correspond to the decimal places, and to send digit n in a place the transmitting unit emits n pulses on that wire. The eleventh carries sign: no pulses for plus, nine for minus. All eleven conductors are driven simultaneously, so a ten-digit number with sign crosses in one addition time and the receiving counter counts what arrives. Only one number may be on a trunk at any instant, though any number of units may listen.

The oscillator emits 100,000 pulses per second, so one pulse time is 10 microseconds and one addition time is 20 pulse times, 200 microseconds; 5,000 additions per second is the reciprocal. The 1948 Ballistic Research Laboratory report gives 14 addition times for a ten-digit multiply, which is 2.8 milliseconds or about 357 per second. Weik gives 2.6 milliseconds for two ten-digit numbers, about 385 per second. The two figures differ by about 7 percent, and neither is a measured rate for a mixed workload.

def transfer(digits, sign, pulses, sign_pulses):
    """Add one pulse-train transfer to an accumulator.

    digits[i] holds the ring position for decimal place i, units first.
    pulses[i] is the pulse count arriving on that place's wire.
    The sign counter is binary, so an odd pulse count toggles it.
    """
    carry = 0
    for i in range(10):
        total = digits[i] + pulses[i] + carry
        digits[i], carry = total % 10, total // 10
    sign ^= (sign_pulses + carry) % 2   # carry out of the tenth decade toggles sign
    return digits, sign

This models the arithmetic result, not ENIAC timing; on the machine the carries ripple through the rings inside the addition time rather than being summed in a loop.

Complement arithmetic on a counter that cannot count backwards

A counter that advances only forwards cannot subtract, so the ENIAC never subtracts. The negative of a number is its complement with respect to 10^10, and subtraction adds the complement of the subtrahend: nine pulses on the sign wire plus the digit pulses for 10^10 minus the number.

The sign wire is what makes this work. Nine pulses on a binary counter is an odd count, so it flips plus into minus, and if the digits then carry out of the tenth decade that carry enters the sign counter and flips it back. Adding the complement of 3 to 5 sends units-first digits 7, 9, 9, 9, 9, 9, 9, 9, 9, 9 with nine sign pulses: the digits sum to 10,000,000,002, the low ten places hold 2, and the sign flips twice, leaving +2.

Wraparound is silent: a sum past 10^10 drops its top carry into the sign counter and returns with the wrong sign and magnitude. The documented range restrictions are that burden made visible: the divide order requires the numerator not to exceed the denominator by more than a factor of 100, and the square-root order requires a radicand no greater than 0.2499999999.

The program is the cable, and the schedule is its order

Each unit carries program controls, either repeat or non-repeat. A non-repeat control has an input and a receiver, a repeat control an output and a transceiver. A program input sets the receiver abnormal, which makes the unit perform its configured operation, and completion resets the control and emits a central programming pulse. That pulse comes from the cycling unit in pulse time 17 of each addition-time cycle, so units starting together finish together or a whole number of addition times apart.

Program trays match digit trays at eleven wires and a ground, with terminals every two feet instead of end connectors. Each wire is a program line. Wiring a control’s input to a line means it starts when that line carries a pulse; wiring a repeat control’s output to a second line starts everything on that second line when the first routine completes. The computation’s temporal order is the topology of that graph, and all controls on one line start simultaneously. A setup is planned on a table of about 27 columns, one per unit, and parallel work needs its own digit trunk as well as its own program line.

Reconfiguration cost is where accounts diverge: the University of Manchester’s account of its Mark 1 gives days for reconfiguring the ENIAC, against resetting part of a stored-program machine’s memory from a keyboard, while Weik, writing of the Aberdeen years, gives weeks of checking and setup. The Mark I’s instruction format is the electromechanical answer to the same problem: a program fixed on paper tape and plugboard, stable at the price of inflexibility.

What the 1948 switch-bank program moved into hardware

From July 1947 coded instructions lived in the function tables, the banks of ten-position switches that had previously held function values. The 1948 report describes the result as a fixed vocabulary of complex orders compounded by local programming, with the sequence determined by switches on a central organ. Sixty orders were available.

The conversion machinery shows what a two-digit code costs without an instruction register. A twelve-digit function-table row is transmitted six times to an order selector, twelve gates controlled in pairs by a six-stage ring that releases one pair per transmission and then advances the argument. Each pair drives a converter: a ten-stage stepper set to stage alpha and ten six-stage steppers set to stage beta yield one of 60 pulses an addition time later, since alpha runs 0 to 9 and beta 0 to 5. Reading a code and starting the next takes seven addition times.

A function table holds 100 twelve-digit values, one per argument from 0 to 99, so six codes per row times 100 arguments gives 600 instruction codes per table, matching Weik on 600 two-decimal-digit instructions per table, and 1,800 across three.

The price is stated plainly: sacrificing parallel scheduling is what leads to the advantages of the coded system. A bare addition occupies one addition time, a coded order seven, so the order stream runs near 714 per second against 5,000 raw additions, an interpreter tax paid per operation for a setup that no longer needed recabling. Order 75 shifts control to an address held in a digit group of accumulator 6 when the number in accumulator 15 is positive or zero, and order 71 halts the machine. The program now sits in switch banks the machine can read and cannot write, which separates it from the shared writable store of a stored-program machine.

Where the decimal ring stops paying

The data paths do not generalize. Numbers move from the card reader to the constant transmitter, from there or a function table to an accumulator, and between accumulators, and reach the printer only from the eight accumulators wired to it. Addressing is positional: accumulator 6 serves as four smaller accumulators covering digits 1 through 3, 4 through 6, 7 and 8, and 9 through 11, and its groups hold addresses the shift order rearranges. The card reader takes about 2,500 addition times and the printer about 1,500, but neither is bound to an exact count, so each signals completion with a central programming pulse, and the reader waits for an interlock pulse from a unit working in parallel.

The master programmer, ten six-stage ring counters called steppers, does fixed repetition and loops whose trip count is known in advance, but not a bound computed at run time, which came with the conditional transfer order in 1948.

Published counts differ: 17,468 vacuum tubes is commonly quoted, the Computer History Museum rounds it to about 18,000, and Weik wrote 19,000 tubes, 1,500 relays, and over thirty tons across thirty units. The museum also records a tube failure roughly every day or two under continuous operation, so the density penalty of the ring encoding was paid in maintenance as well as power. The first-computer claim carries its own qualification: the museum’s account of the 1973 litigation records that the ENIAC patent was invalidated after the court found Mauchly had derived ideas from Atanasoff’s earlier work.

What the ring counter bought, at that price, was arithmetic with no conversion layer. A digit went in as a count of pulses and came out as a decimal place on a printed card, and the carry between places was a wire rather than an algorithm.

References

  1. A Logical Coding System Applied to the ENIAC (Ballistic Research Laboratory Report No. 673) — R. F. Clippinger; U.S. Army Ballistic Research Laboratory, 1948
  2. A Third Survey of Domestic Electronic Digital Computing Systems (Ballistic Research Laboratory Report No. 1115) — Martin H. Weik; U.S. Army Ballistic Research Laboratory, March 1961
  3. The Electronic Numerical Integrator and Computer (ENIAC) — Herman H. Goldstine and Adele Goldstine; Mathematical Tables and Other Aids to Computation, Vol. 2 No. 15, 1946
  4. ENIAC in Action: Making and Remaking the Modern Computer — Thomas Haigh, Mark Priestley, and Crispin Rope; MIT Press, 2016
  5. Programming the ENIAC: an example of why computer history is hard — Computer History Museum blog