Optimized ALU for computers with 4PDT relays

StefanoStefano wrote 09/26/2019 at 03:49 • 2 min read • Like

Taking inspiration from Roelh's "Simple Relay ALU" and from JHallen's one found in the "Single Board Relay Computer" I designed a version that is providing 10 functions (1 addition, 6 bitwise logics, 1 shifter and 2 trivial ones) with the same 16 relays for 8bit as in Konrad Zuse's one, and keeping the fast carry feature. And with just 12 relays it is possible to have ADD, AND, OR and even SHR (shift right), and SHL using the addition, for me the sweet spot to be used. The NOT (useful also for the subtractions) in my case is coming from the A registry relays.

The diagrams below show the connections of the bit slice with full adder and logic outputs, and the functionalities available. 

The fixed numbers 0 and 1 are coming from the instruction.decoding, while a multiplexer 4:1 (done with 6 4PDTs) selects for F0 among instruction values, A, not A, or An+1 (for the shift right). A 2:1 multiplexer (done with 2 4PDTs) is added at the end to select among ADD or bitwise logic function result



Stefano wrote 10/05/2019 at 20:28 point

This page is kept just as an old reference. The updated proposal with better graphic and designs are at

  Are you sure? yes | no

roelh wrote 09/26/2019 at 16:26 point

Nice design, Stefano !  Your signal A comes from a register... do you have spare contacts there ?

  Are you sure? yes | no

Stefano wrote 09/26/2019 at 18:02 point

thank you! :)

regarding register contacts: yes, but probably just one of the 4 pairs of contacts is available. The others are used for the value, the inverse of the value and the zero circuit used in the jump counter

ps: if needed I can free up one more pair of contacts and use the zero circuit of the ALU result register, where I should still have 2 free pairs of contacts for each bit also there if needed

curious to know what you have in mind!

  Are you sure? yes | no

roelh wrote 09/27/2019 at 20:34 point

I have a suggestion for you, see it here:

Provided that you already have the A register, it will cost just 2 relays per bit. Only 2 contacts of the A register are used, and the A and B relays can be controlled with a simple on-off switch. I don't think this can be done any simpler.

  Are you sure? yes | no

roelh wrote 10/06/2019 at 11:46 point

Stefano, did you also look at my relay computer, ? That also has a relay ALU, but it is more complicated because it can do decimal (BCD) arithmetic as well as straight binary.

The recent RR6 relay computer may also interest you.

  Are you sure? yes | no

Stefano wrote 10/08/2019 at 06:01 point

Both Risc Relay CPU an RR6 are very nice designs, but I'm more interested in "minimal" ones: I bought 60 relays for 50eur and hope to be able to build an 8 bit ccomputer (and spare some of them), with the help of a punched card reader device that I think is the perfect fits in such builds!

I'm writing down the page to describe it and as the relays arrive (shipping was for free so you cannot pretend speed) I will also start to build it!

Stay tuned :)

  Are you sure? yes | no