4-bit Adder Built From Mechanical Relays

relay-adder-register-memory

Would you consider this to be doing math the old-fashioned way? Instead of going with silicon-based switching (ie: transistors) this 4-bit adder uses mechanical relays. We like it for its mess of wires (don’t miss the “assembly” page which is arguably the juiciest part of the project). We like it for the neat and tidy finished product. And we like it for the clicky-goodness which surely must bloom from its operation; but alas, we didn’t find a video to stand as testament to this hypothesis.

The larger of the two images seen above is from the register memory stage of the build. The black relay in the bottom right is joined by a ring of siblings that are added around the perimeter of the larger relays before the entire thing is planted in the project box.

Sure, simulators are a great way to understand building blocks of logic structures like an adder. But there’s no better way to fully grip the abstraction of silicon logic than to build one from scratch. Still hovering on our list of “someday” projects is this wooden adder.

[Thanks Alex]

 

20 thoughts on “4-bit Adder Built From Mechanical Relays

    1. Google:- “Relay based computer called Simple Simon”. In the 1950’s it fascinated me beyond the moon and stars. I had great fun with the gift of an ex phone exchange rack full of ‘normal’ plus slow to make and slow to release relays.
      It taught me about binary, bi-quinary and Boolian logic. Babbage and Lady Lovelace were my boy hood hero’s and the book: “Faster than Thought” a prized posession.

    1. An adder (or a half-adder, as it’s called), is just a XOR gate in parallel with an AND gate. The AND detects two ‘1’s and is used as the carry. If either two or zero inputs have a ‘1’, then the XOR, the output, gives ‘0’.

      Then you need something to take in the carry, and add the next bits… anyway it’s not rocket science to work out. You could deduce it yourself with a bit of paper and some time, you know what the outputs need to be for each input. You know you need to carry over a ‘1’ if two ‘1’s are added together. Work it out on paper. Do a truth table for a 2 or 3-bit adder, including the carry lines, which are output from one adder, and input to the next.

      Or just cheat and look it up. Try deducing it first tho, it’s more rewarding.

      Relays are really good for logic like this cos they’re very obvious and simple, you can literally see them working. Have a try yourself, make a 4-bit adder. Start off with two 2-bit adders, then join ’em together!

      1. What is interesting is that while it does seem “very obvious and simple” – that’s only with hindsight.

        Think about this:

        Charles Babbage worked on his computing machinery up until his death in 1871.

        George Boole published his thoughts on what we know today as “boolean algebra” in the mid-1850s.

        The Morse telegraph was hitting it fairly big starting in the mid-1850s, being mainly used by the railroads.

        Everything was there, in place in the middle of the 19th century – all the people, all the technology – for someone to have built a relay-based computer. But it didn’t happen. The closest thing to such a machine would be Herman Hollerith’s tabulation system for the 1890 census; however, such a machine was more like a large adding machine, and not a general purpose computer.

        There were many reasons why it didn’t happen, but the main one was that it would be many decades until someone realized that boolean logic could be represented by electrical elements, and that it wasn’t just another mathematical abstraction. Again, it seems like a “duh” moment, but that is only the viewing of history with hindsight.

        It makes one wonder where things would be had Babbage, who had to have known of Boole (and likely of telegraphy as well), had instead decided to employ and develop the relay technology of his era, instead of mechanical technology. Could we have had the equivalent of the ENIAC (which, keeping to the theme of how Babbage was thinking, was a decimal-based machine with ring-counters) in relay form, 60-70 years ahead of time? Or would have Babbage went with a fully binary system for number representation (albeit at the cost of many more relays needed)?

        This and everything else, though, is pure speculation. But for many sundry decisions made by a few men of history, much could have been different (which leads one to wonder about what we are missing today that could have ramifications for the future – is there something out there, some other “method” or “technology” which – if applied to another problem in a slightly different – or wholly different! – domain, would reap a major leap in capabilities for humanity?)…

        1. I meant relays are simple and obvious, in how they work.

          Your point though is interesting. I think that’s why things like the telephone, light bulb, parts of the television, etc, are often invented by 2 people in different countries who didn’t know of each other. Certain existing technologies and knowledge imply further advances, and they hang around waiting until someone sees it, thinks “ahh!”, and a little while later we get the light bulb.

          You’re right about Babbage too I think, who will presumably have known about the Pascaline and the like. It wouldn’t occur to him to use anything other than base 10 for mathematics. Whoever invented the idea of binary maths, and physical logic gates, made modern computers possible. Him, and Von Neumann, at least. I think when Boole invented his logic he was thinking more along the lines of philosophical proofs, rather than actual devices.

  1. If only he could attach an Arduino to it and write a sketch to measure the maximum speed of this baby (the maximum calculations per second or minute which gives the correct answer) it would be great.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.