A mechanical state machine

For modern eyes DIGI-COMP looks quite confusing (as most mechanical calculation devices). So what exactly is it? A bit automata theory is helpful here.

Original marketing praised DIGI-COMP as "The first real operating digital computer in plastic".

Well, yes. More realistic, it is a 3 bit finite state machine. But sure, made from plastic.

Core element are 3 clocked mechanical flip flops, implemented as 3 horicontal sliders which can sit in "0" or in "1" position.

Flip flop "outputs" can be combined via some mechanical AND and OR conditions, the resulting values are used to "set" or "clear" flip flop sliders in the next clock cycle. So one set of flip flop states generates the next one via a combinatorical function. The Wikipedia article on Moore machines has a nice diagram of such a machine. DIGI-COMP's flavor is the simpler "Medvedev machine":

Medwedew Automat digicomp

Such a state machine combines "combinational logic" (whose state is defined only by current inputs) with "sequential logic" (whose outputs depends on input history).

For DIGICOMP, the Flip-Flop count "n" is 3, and the combinatoric logic function "δ" has 3 inputs and 3 outputs. For the "binary counter" example we have no user inputs, all 3 flip-flop outputs drive to logic function inputs. The combinatory logic for a counter is evident here: for every input 000...111, the next count value is returned (the 3 flip flops are labled "A", "B" and "C"):

 inB   inA 
 outB   outA 
0 0 0  =>  0 0 1
0 0 1  =>  0 1 0
0 1 0  =>  0 1 1
0 1 1  =>  1 0 0
1 0 0  =>  1 0 1
1 0 1  =>  1 1 0
1 1 0  =>  1 1 1
1 1 1  =>  0 0 0

The combinatory logic function "δ" which calculates the next 3-bit state from the current one is "programmed" by settings various white "tubes" onto "pegs" in the mechanical logic.

This makes DIGI-COMP quite versatile. For example, it can run through any sequence of the numbers 0..7, which are 8! = 40320 different.

As the original package claims: "See how a computer adds, subtracts, shifts, complements, multiplies, memorizes, compares, play challenging games, solve problems, process data, answer riddles, do the missile count down, satellite re-entry, missile checkout and many other problems". And yes, the manual has many programming examples to implement all this.


To understand DIGI-COMP, we now better separate the Architecture from its Implementation:
Architecture is a timeless Medvedev state machine, consisting of storage flip flops and a combinatoric logic feedback.
And it is implemented with 1960s toy technology: manual clock, plastic sliders, wire rods and tubes and pegs.


Programming? with tubes and pegs?

Key element to DIGI-COMPs ongoing success is its programmability. The combinatoric logic function "δ" can be setup by placing dozends of small white plastic tubes onto flip flop pins ... called "pegs".


digicomp1 tube on peg

Despite it surely does not look so, programming DIGI-COMPs logic with these white tubes is also quite current technology (more or less).

DIGI-COMP has a pre-construced logic pattern (slider and rods) with variable elements (tubes on pegs). These tubes enable or disable certain mechanical AND and OR terms. Their state for a given application is to be documented in a "coding sheet", here shown for the "binary counter".

coding sheet original

Modern Programmable Logic Devices work the same way: you have a generic logic structure etched into silicon, the actual function is giving at programming time by setting or burning some "fuses" in the silicon. So: "pegs"= "fuses".

FPGA chips work similar: they also consist of standard blocks of logic and flip flops, often called "logic cell" or "macrocell". A FPGA may have millons of macrocells, each a few 10s nanometers in size. For technical reasons the logic array is not implemented by logic gates and "fuses", but as a small RAM area holding a thruth table, called "Lookup table" (LUT). Wikipedias example adds an optional ALU element here:

FPGA cell example

So think of DIGI-COMP as a "3-bit macrocell", with the "tubes" as visible LUT content.


In contrast to modern nano-meter-sized and GHz-clocked silicon, DIGI-COMPs operation is visible to the naked eye.
So it makes a great tool for teaching logic design!