Hackaday Prize 2023: Building A Relay ALU

There’s much truth in the advice that, to truly understand something, you need to build it yourself from the ground up. That’s the idea behind [Christian]’s entry for the Re-engineering Education category of the 2023 Hackaday Prize. Built as an educational demonstrator, this is a complete arithmetic-logic unit (ALU) using discrete relays — and not high-density types either — these are the big honking clear-cased kind.

The design is neatly, intentionally, partitioned along functional lines, with four custom PCB designs, each board operating on 4-bits. To handle a byte-length word, boards are simply cascaded, making a total of eight. The register, adder, logic function, and multiplex boards are the heart of the build with an additional two custom boards for visualization (using an Arduino for convenience) and IO forming the interface. After all, a basic CPU is just an ALU and some control around it, the magic is really in the ALU.

The fundamental logical operations operating upon two operands, {A, B} are A, ~A, B, ~B, A or B, A and B, A xor B, can be computed from just four relays per bit. The logic outputs do need to be fed into a 7-to-1 bit selector before being fed to the output register, but that’s the job of a separate board. The adder function is the most basic, simply a pair of half-adders and an OR-gate to handle the chaining of the carry inputs and generate the carry chain output.

3D printed cable runs are a nice touch and make for a slick wiring job to tie it all together.

For a more complete relay-based CPU, you could check out the MERCIA relay computer project, not to mention this wonderfully polished build.

 

Mysterious Adder From 1960s Bendix G-20

[David Lovett] aka Usagi Electric is taking a dive into yet another old computer design, this one from the early 1960s. He recently obtained eight mystery circuit boards on-loan for the purpose of reverse engineering them. It turns out these came from an old mainframe called the Bendix G-20, a successor to the 1965 G-15 vacuum tube model. The cards are:

  • Full Adder
  • AND Gate
  • OR Gate
  • Emitter Follower
  • Flip Flop
  • Quad Inverting Amplifier
  • DLO Amplifier
  • Gated CPA

Most of these are pretty straightforward to figure out, but he ran into some troubles trying to understand the full adder board. The first issue is there is some uncertainty surrounding the logic level voltages. This system uses negative voltages, with -3.5 V representing a logic 1 … or is it a logic 0? And even taking into account this ambiguity, [David] is having a hard time deciphering how the adder works. It uses a bunch of diodes to implement a logic lookup table of an adder — except he is not able to make it match any known addition scheme. [David] has called out to the community for help on this one, and if you have any ideas how this adder works, visit his wiki linked above for more information and give him shout.

We don’t know how [David] squeezes in the time for these side projects, when he is so busy on the Centurion mini-computer restoration and the monstrous single-bit vacuum tube computer he is building.

Continue reading “Mysterious Adder From 1960s Bendix G-20”

Virtual Eurorack Based CPU Computes To The Beat Of A Different Drum Module

In Arthur C. Clarke’s 1972 story “Dial F for Frankenstein”, the worlds first global network of phone exchanges was created by satellite link, and events happened that caused the characters in the story to wonder if the interconnected mesh of machinery had somehow become sentient. And that’s what we wondered when we saw this latest virtual CPU construction built by GitHub user [katef] and made from a virtual analog synthesizer software called VCV Rack.

Analogous to a Redstone computer in Minecraft, there’s no physical hardware involved. But instead of making crazy synth sounds for a music project, [katef] has built a functioning CPU complete with an Arithmetic Logic Unit, an adder, and other various things you’ll find in a real CPU such as registers and a clock.

While no mention is made of whether the construct is sentient, [katef] fully documented the build on their GitHub page, and so go check that out for animated pictures, links to more information, and more. It’s quite impressive, if not just a little bonkers. But most good hacks are, right?

We love unique CPU builds, and you might get a kick out of this one made from- that’s right- 555 timers. Thanks to [Myself] on the Hackaday Discord server for the tip, and be sure to send in your favorite outrageous projects to the Hackaday tip line!

Hackaday Podcast 066: The Audio Overdub Episode; Tape Loop Scratcher, Typewriter Simulator, And Relay Adder

Hackaday editors Elliot Williams and Mike Szczys stomp through a forest full of highly evolved hardware hacks. This week seems particularly plump with audio-related projects, like the thwack-tackular soldenoid typewriter simulator. But it’s the tape-loop scratcher that steals our hearts; an instrument that’s kind of two-turntables-and-a-microphone meets melloman. We hear the clicks of 10-bit numbers falling into place in a delightful adder, and follow it up with the beeps and sweeps of a smartphone-based metal detector.

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (60 MB or so.)

Continue reading “Hackaday Podcast 066: The Audio Overdub Episode; Tape Loop Scratcher, Typewriter Simulator, And Relay Adder”

A DIY 10-bit Relay Adder

When it comes to understanding computers, sometimes it’s best to get a good understanding of the basics. How is data stored? How does the machine process this information? In order to answer these questions a bit more and start learning programming, [Nakazoto] built a 10-bit binary adder with relays.

The build is designed from the ground up, including the PCBs, which are milled using a CNC machine. There are six boards: the input board, sequencer board, 2 sum register boards, a carry register board and a 1-bit ALU board. The input board has 32 LEDs on it along with the switches to turn on each bit on or off. In total, 96 relays are used and you can hear them clacking on and off in the videos on the page. Finally, there is a separate switch that sets the adder into subtraction mode.

Usually, [Nakazoto]’s website is mostly about cars, but this is a nice diversion. The article has a lot of detail about both the design and build as well as the theory behind the adder. Other articles on binary adders on the site include this one which uses bigger relays, and this 2-bit adder which uses 555 timers.

Continue reading “A DIY 10-bit Relay Adder”

Paper Circuit Does Binary Math With Compressed Air

Most of us can do simple math in our heads, but some people just can’t seem to add two numbers between 0 and 3 without using paper, like [Aliaksei Zholner] does with his fluidic adder circuit built completely of paper.

Pneumatic AND gate

There’s some good detail in [Aliaksei]’s translated post on the “Only Paper” forum, a Russian site devoted to incredibly detailed models created entirely from paper. [Aliaksei] starts with the basic building blocks of logic circuits, the AND and OR gates. Outputs are determined by the position of double-headed pistons in chambers, with output states indicated by pistons that raise a flag when pressurized. The adder looks complicated, but it really is just a half-adder and full-adder piped together in exactly the same way it would be wired up with CMOS or TTL gates. The video below shows it in action.

If [Aliaksei]’s name seems familiar, it’s because we’ve featured his paper creations before, including this working organ and a tiny working single cylinder engine. We’re pleased with his foray into the digital world, and we’re looking forward to whatever is next.

Continue reading “Paper Circuit Does Binary Math With Compressed Air”

Relay Computer Starts With An Adder That Makes A Racket

Computers built using discrete logic chips? Seen it. Computers from individual transistors? Impressive, but it’s been done. A computer built out of electromechanical relays? Bring on the ozone!

The aptly named [Clickity Clack]’s new YouTube channel promises to be very interesting if he can actually pull off a working computer using nothing but relays. But even if he doesn’t get beyond the three videos in the playlist already, the channel is definitely worth checking out. We’ve never seen a simpler, clearer explanation of binary logic, and [Clickity Clack]’s relay version of the basic logic gates is a great introduction to the concepts.

Using custom PCBs hosting banks of DPDT relays, he progresses from the basic AND and XOR gates to half adders and full adders, explaining how carry in and carry out works. Everything is modular, so four of his 4-bit adder cards eventually get together to form a 16-bit adder, which we assume will be used to build out a very noisy yet entertaining ALU. We’re looking forward to that and relay implementations of the flip-flops and other elements he’ll need for a full computer.

And pay no mind to our earlier dismissal of non-traditional computer projects. It’s worth checking out this discrete 7400 logic computer and this all-transistor build. They’re impressive too in their own way, if a bit quieter than [Clickety Clack]’s project.

Continue reading “Relay Computer Starts With An Adder That Makes A Racket”