Reconstruction of mechanical logic gates and memory element of the Zuse Z1 programmable calculator using a 3D-printer

Introduction

In the pre-war years 1935 to 1938 Konrad Zuse designed and build the Z1 mechanical calculator. The Z1 had eight instructions, four for the basic calculating operations, two for memory operations and two for I/O. The Z2 was a recreation with the arithmetic section recreated with electric relays. The Z3 was a completely relay based machine, while the Z4, the first commercial machine, reverted to a larger mechanical memory. The Z3 added a square root instruction.

The Z1 to Z3 use 24 bits wide memory, 64 words long. It was used to store floating point numbers; a sign bit, 7 bits exponent and 16 bits mantissa. The Z4 memory is 32 bits wide, 1024 words long. The CPU had two registers, R1 and R2. Instructions are 8 bits wide and stored on punched 35mm film.

The mechanical elements operate using a two-phase mechanical clock. The basic cycle starts with a movement in the vertical direction by the control plates, followed by a horizontal movement by the moving/moved plates. Then first the horizontal movement is reversed. Finally the verical movement is reversed, returning the element to the base state. More complex operations will include more phases, as the clock phase of the first element is the input phase of the second element. The principle remains; a vertical movement controls the following horizontal movement. It is the movement or lack of movement of the final moved plate that creates the output signal. This is the equivalent of the 0 or 1.

To describe it on another level; the input is a vertical movement, the control plates. the horizontal moving plates are just the second phase clock and the moved plate, also horizontal, is the output.

Reconstruction

The reconstructions are based on the patent text and annotations from the book "Die Rechenmachinen von Konrad Zuse" by R. Rojas (editor). In no way I claim these look anything like the original Z1 or the replica in the in Berlin.

The 3D-designes are available from Thingiverse as .STL and original OpenSCAD files. Here you can also find short movies on how to assemble the elements.

The colors used in the 3D-parts are not real, but it is more fun to watch and play with. The original Z1 parts are probably just plain gray. The reconstructions also include a bottom and top plate, not part of the original. Their role is to keep the element together. And because they don't move, gray seems the appropiate color.

Simple switching elements

The function of the simple switching element is to connect or disconnect an input signal to an output signal, controlled by a control signal. This is the basic NOT gate.

The first switching element, shows plates a to e stacked together
patent drawing
typical movement if the switching element parts
operation
shows the parts next to each other
disassembled element
a - blue: moving plate (clock)
b - green: moved plate (output)
c - yellow: control plate (input)
d - gray: base or fixed plate
s - red: switching pin

The function of the variant is that of a relay - a signal is routed one of two ways, depending on the state of a third signal. In practice, an input element is connected to one of two output elements, controlled by the position of the control element.

The main difference between the basic simple switching element are the possible posititions the connecting pin can have and as a result the number of outputs it can operate. Note that the basic element and the variant share most elements, but their role is different.

Variant of the first switching element, shows plates a to e stacked together
patent drawing
typical movement if the switching element parts
operation
shows the parts next to each other
disassembled element
a - green: moving plate (clock)
b, c - blue: moved plates (outputs)
d - yellow: control plate (input)
d - gray: base or fixed plate
s - red: switching pin

The element at Thingiverse

Logical switching element

The logical switching element as described in the patent is actually an XNOR. But it appears that with only small modifications, the more generic AND, OR and XOR can be made. The doubling of the floating plates for OR and XOR is not documented AFAIK, but it seemed an elegant solution to the problem.

The drawing of the XNOR element
patent drawing
typical movement if the switching XNOR parts
XNOR operation
shows the parts next to each other
disassembled XNOR
Truth table for the XNOR plates e, f (control plates, both yellow), and b (output, left blue).
Zuse uses 0 and L as logic levels
efb
00a
0L0
L00
LLa
typical movement if the switching AND parts
AND operation
shows the parts next to each other
disassembled AND
a - blue: moving plate (right, clock)
b - blue: moved plate (left, output)
c - green: floating plate
e, f - yellow: control plate (inputs)
g - gray: base or fixed plate
s1, s2 - red: switching pins
typical movement if the switching OR parts
OR operation
shows the parts next to each other
disassembled OR
a - blue: moving plate (left, clock)
b - blue: moved plate (right, output)
c, d - green: floating plates
e, f - yellow: control plates (inputs)
g - gray: base or fixed plate
s1, s2 - red: switching pins
typical movement if the switching XOR parts
XOR operation
shows the parts next to each other
disassembled XOR
a - blue: moving plate (left, clock)
b - blue: moved plate (right, output)
c, d - green: floating plates
e, f - yellow: control plates (inputs)
g - gray: base or fixed plate
s1, s2 - red: switching pins

By rotating the floating plates 180 degrees for the AND and OR gate, one gets a NOR and NAND gate respectively.

The element at Thingiverse

Memory element

The mechanical memory element was used in the Z1, Z2 and Z4. The Z3 used relay memory, but this appeared to be less ecomomical or reliable.

grayscale drawing of the storage element with plates a, b and c in situ
patent drawing
typical movement if the bit storage element parts
operation, in this case reading a 0
shows the parts next to each other
disassembled element
a - yellow: control resp. moving plate
b - blue: control resp. moved plate
c - gray: base of fixed plate
s - red: switching pin
typical movement if the bit storage element parts
operation, in this case reading a 1
During reading and writing the vertical
movement of the a plate (yellow) enables the bit.
The horizontal movement is the read pulse.
The b plate (blue) is the output
typical movement if the bit storage element parts
operation, in this case writing a 0
During writing, the b plate (blue)
movement is the write pulse. Obviously
writing a 0 differs from writing a 1,
thus the movement direction differs.
typical movement if the bit storage element parts
operation, in this case writing a 1

The element at Thingiverse

3-to-8 decoder

Elements like a decoder are essential for any type of address decoding, so must be a part of at least the memory unit.

addressing all eight addresses possible with three address bits in sequence

There is nothing in the documentation that dictated this particular layout, but it shows how address decoding could be implemented with mechanical parts.

The yellow plates are inputs, blue plates are output. Black is the clock, green are intermediate plates. Red are switching pins.

The element at Thingiverse

References:

Adder

Based on the Wikipedia full adder diagram I designed a variant using the Zuse technique. This is the most compact design I came up with so far:

It contains two AND, two XOR, one OR and a 90 degrees shift element. The latter is the simple element described above. This can be used as a NOT or a 'NOT-NOT', effectively rotating the signal 90 degrees, using a clock cycle.

An additional 'passive' element for a right-angle shift could simplify the circuit.


This text, the 3D-printer SCAD and STL files and the animations are licensed under the Creative Commons - Attribution license.

fjkraan@xs4all.nl, 2019-08-24