My 4-bit electronic binary calculator using transistors and how I came about building it

The computer history museum has a video in which computer pioneers recall how they stumbled upon the idea to use relais (electronic switches) to do boolean operations. One of the first was George Stibitz in 1938. Stibitz noticed that relais can be chained together to express boolean logic. Luckily he was a doctor of mathematics and as such he had heard of binary numbers. This was an important leap because calculations on binary numbers can be expressed as boolean operations. So he went ahead and built a one-bit adder based on relais. Here's a replica of this machine built by himself at a later time:

Stibitz full-adder built out of relais. In his 5 min talk he recalls even more about this time.

Seeing how he did this in 1938 on his kitchen table using bulky relais, I got the idea to use transistors to build my own electronic calculator for binary numbers. I found a great tutorial on how to build a 4-bit adder by WaitingForFriday. It helped me understand how to build the logic gates out of transistors. The full-adder used in WaitingForFriday's project is nice and easy to understand but requires 23 transistors for each adder. This is his full-adder design, which maps quite nicely to the actual boolean logic derived from the logic table. It's all very well explained in his post.

Full-adder design with 23 transistors by WaitingForFriday

But the cleanliness has a price: 23 transistors for one adder is a lot. I need four-adders for four bits, so that's 92 transistors. I dug a bit further and found out that the boolean logic of the adder can be simplified to 9 NOR-gates. And most conveniently, a NOR-gate can be built out of one transistors: so we are down from 23 to 9 transistors per adder.

Full-adder using only 9 transistors, designed by jock on stackexchange

The trick of using NOR-gates to build up complex circuits isn't new. NASA used NOR-gates extensively for the Apollo computers in the 1960s as one of their integrated circuits. Here's a NASA design for their dual NOR-gate chip:

NASA dual NOR-gate schematic

Simon's full adder

In total I built four full-adders based on the NOR-gate design and chained them together to get 5 bits of output. Here's a photo of one full-adder. If you look closely, you can see the 9 NOR-gates: each NOR-gate has two resistors leading into it (left-side of transistor) and one output above each transistor:

Full-adder board. The wiring on top is mostly the connection between the NOR-gates

It's easier to see the individual gates without the wiring on top. So here's another shot highlighting the NOR-Gates:

one full-adder board without wiring between NOR-gates

And an even closer look at a single NOR-gate mapped to the schematic:

single NOR-gate with matching schematic

It took me about 90 minutes to place, wire and solder one full-adder and a few more hours to build the simple wood case and wire up the lights and switches. I thought about adding a 7-segment display to output the result in decimal but it turns out this would use more transistors then the whole adding machinery. And after all: why would you use a binary calculator if you can't read binary.

More pictures

Top of calculator open to show three full-adders inside, and one pulled out for demonstration. I wrapped each adder in plastic to avoid pulling out cables.

Simons Elektronischer Binärrechner (4 Bit)

Simon Oberhammer, 28. May 2017