This DIY Calculator Contains Zero Transistors
See how YouTuber WillsBuilds was able to build a calculator using 1940s-era technology that can add and subtract 8-bit numbers with relays.
Before the age of the transistor
Decades before transistors were invented and around the same time as the advent of the vacuum tube, some of the earliest computing machines were created from a complex web of wires, relays, and mechanical linkages. They worked on the principle of sending a lower-voltage signal into one side of the relay in order to energize an electromagnetic coil and then cause the other side to close the circuit. With this basic premise, many relays could be connected to perform logical operations and, perhaps most importantly, mathematical functions.
Adding numbers
In all digital computers, binary data is passed through logic gates that, when combined in certain ways, are able to negate, subtract, multiply, store values, and much more. And after coming across this 10-bit relay adder, YouTuber WillsBuilds wanted to make his own version that could add and subtract 8-bit numbers without having to use a single transistor.
Each addition/subtraction unit operates on a single bit position across the two operands in the calculation, along with a carry bit from the previous unit in the chain. Similar to how we "carry the 1" when adding base-10 numbers, a unit will carry a 1 if at least two of the three inputs are a 1. By flipping the bits of the second number and adding a 1, the result of the calculation will be the second number subtracted from the first.
Circuit assembly
Because each of the eight total bit positions needed its own full adder circuit, Will had to assemble two boards that held four adders per-board. Given that the inputs utilize buttons instead of toggle switches, additional relays were required to hold the input data in-memory. Lastly, the bank of outputs and other miscellaneous control circuitry also needed their own boards. All-in-all, this 8-bit addition computer required 61 relays split across eight hand-soldered boards.
Generating a clock signal
One of the most challenging hurdles to overcome was the question of synchronization, as latching and propagating data between relays needed a source for time-keeping. Modern timers and crystals use transistors, which just left capacitor and motor-based approaches available. The former turned out to not fully work even after troubleshooting, which left the latter as the most viable option. With only a motor and a 3D-printed CAM attached to its output shaft, regular pulses could be sent to latch/clear bits across the system.
The case, lights, and finishing touches
After verifying that his computer was working correctly, Will created a housing from several wood sheets. The top panel had several recesses for the LEDs and buttons to poke through along with space for two mode switches at the top. As seen in his build log video, the two operands can be entered via their respective rows of buttons before hitting "Enter" to perform the calculation and then "Del" to clear the inputs and outputs. This relay-based calculator even includes a small bell internally to signal when the output is finalized.