# Relay Computing

Recently, [Manuel] did a post on making logic gates out of anything. He mentioned a site about relay logic. While it is true that you can build logic gates using switch logic (that is, two switches in series are an AND gate and two in parallel are an OR gate), it isn’t the only way. If you are wiring a large circuit, there’s some benefit to having regular modules. A lot of computers based on discrete switching elements worked this way: you had a PCB that contained some number of a basic gate (say, a two input NAND gate) and then the logic was all in how you wired them together. And in this context, the SPDT relay was used as a two input multiplexer (or mux).

In case you think the relay should be relegated to the historical curiosity bin, you should know there are still applications where they are the best tool for the job. If you’re not convinced by normal macroscopic relays, there is some work going on to make microscopic relays in ICs. And even if they don’t use relays to do it, some FPGAs use mux-based logic inside.  So it’s worth your time to dig into the past and see how simply switching between two connections can make a computer.

## Mux Mania

How do you go from a two input mux to an arbitrary logic gate? Simple, if you paid attention to the banner image. (Or try it interactive). The mux symbols show the inputs to the left, the output to the right and the select input at the bottom. If the select is zero, the “0” input becomes the output. If the select is one, the “1” input routes to the output.

# Yes, You Can Reverse Engineer this 74181

[Ken Shirriff] is the gift that keeps on giving this new year. His latest is a reverse engineering of the 74181 Arithmetic Logic Unit (ALU). The great news is that the die image and complexity are both optimized for you to succeed at doing your own reverse engineering.

We have most recently seen [Ken] at work explaining his decapping and reverse engineering process at the Hackaday SuperCon followed soon after by his work on the 8008. That chip is crazy with complexity and a die-ogling noob (like several of us on the Hackaday crew) stands no chance of doing more than simply following along with what he explains. This time around, the 74181 is just right for the curious but not obsessed. Don’t believe me? The 8008 had around 3,500 transistors while the friendly 74181 hosts just 170. We like those odds!

A quick crash course in visually recognizing transistors will have you off to the races. [Ken] also provides reference for more complex devices. But where he really saves the day is in his schematic analysis. See, the traditional ‘textbook’ logic designs have been made faster in this chip and going through his explanation will get you back on track to follow the method behind the die’s madness.

[Ken] took his own photograph of the die. You can see the donor chip above which had its ceramic enclosure shattered with a brisk tap from a sharp chisel.

# Fallout 4 Gets Logic Gates, Is Functionally Complete

Fallout 4, the latest tale of post-apocalyptic tale of wasteland wanderers, got its latest DLC yesterday. This add-on, Contraptions Workshop, adds new objects and parts to Fallout 4‘s settlement-building workshop mechanic. This add-on brings more building pieces, elevators, and most importantly logic gates to Commonwealth settlements.

The Fallout logic gates are used in conjunction with electric generators, lights, and automated sentries used to build settlements. Although a simple NAND would do, there are several types of logic gates including AND, OR, XOR, NOT, NAND, NOR, and XNOR.

The in-game explanation for these gates is very, very weird. AND, OR, and XOR “transmit power or not depending on the combination of power to their inputs”. NOT, NAND, NOR, and XNOR are apparently different, “only transmitting power if their inputs are connected directly to the output of other logic gates”. The reason for this arbitrary distinction between different sets of gates is currently unknown except to a few programmers and project leaders at Bethesda. It should be noted {AND, OR, XOR} is not functionally complete.

With implementations of logic gates in video games comes some very interesting if useless applications. Already Fallout 4 has light boxes, allowing for huge animated billboardsFallout speakers, the wasteland’s equivalent of Minecraft’s note block, can be used to play simple melodies. You can do anything with a NAND, so we would expect automated, sequenced versions of animated billboards and monophonic synthesizers to appear in short order.

Functional completeness can add a lot to a game. Since Minecraft added redstone logic to the game, we’ve seen some very, very impressive block-based builds. The Minecraft CPU generally regarded as being the first, most complete CPU took about three months to design and build. This build didn’t use later additions to the redstone toolbox like repeaters, pistons, and the now-cheaty command blocks.

# Designing Circuits with Switching Algebra

We return once again to the work of Dr. Claude E. Shannon, this time to his Masters thesis on relay switching circuit design. This thesis introduced switching algebra that allows the systematic design and optimization of logical circuits. While Shannon’s work applied to switches and relays, it is equally applicable to all the modern forms of digital circuits. His thesis received widespread notice when published as “A Symbolic Analysis of Relay and Switching Circuits” in 1938. This work built on the Boolean algebra developed by George Boole and an analysis of logic by Augustus De Morgan which these mathematicians published nearly simultaneously in 1847. To some extent, it was the beginning of the age of modern digital logic. Continue reading “Designing Circuits with Switching Algebra”

# Electronic Ruler Works Out Logic Truth Tables

Like [Brad], we’ve seen a number of PCB rulers out there. [Brad] was looking to take the idea and run with it. His DigiRule is a ruler with a logic gate simulator. What he built is a mash-up between PCB rulers, and the concept of electronic business cards.

All told it simulates seven logic gates, four flip-flops, and includes a four-bit counter. On one end of the ruler a CR1220 battery feeds the 18F43K20 which is performing the logic operations using buttons and LEDs. Of course the truth tables are printed on the back silk-screen, but playing with the lights is a lot more fun. We do find it fairly amusing that the centimeters on the bottom of the ruler are notated in binary.

It makes a lot more sense to hand out rulers than business cards; people might actually use them after you leave and you can still include contact info. This form-factor also breaks the mold. You can have a lot more space on a ruler and you’re not constrained by thickness (although [Limpkin] solved that problem). While we’re on the topic of business cards [ch00f’s] USB etch-a-sketch style card and this logic-based information delivery device top our favorites list.

# This PCB Business Card is Logically Different

Having seen a number of PCB business cards [Will] decided to go against the more popular choice of a micro-controller based design and show some character with a logic based finite state machine. [Will] uses a single 7-segment display to scroll through the letters of his name with a state machine that outputs the desired combination of 1’s and 0’s to the LED display each time the tactile button is pushed.

[Will] uses a 4-bit counter made up of D Flip-Flops for the clock signal as a conditional input to 6 of the 4-input AND gates. He doesn’t go into the painful details of displaying each character through the process (thankfully) but he does mention that he uses the Quine-McCluskey technique for reduction instead of Boolean algebra. Since his name is 11 characters long and the 4-bit binary counter goes from 0000 to 1111 leaving 5 more pushes of the button before rolling the count back to 0000, during which time the display is left blank. [Will] kindly includes the eagle and Gerber files for your downloading pleasure over at his blog if you’re interested in getting a little deeper into the design.

# Manipulating Matter In A Digital Way

On a fundamental level a computer’s processor is composed of logic gates. These gates use the presence of electricity and lack thereof to represent a binary system of ones and zeros. You say “we already know this!” But have you ever considered the idea of using something other than electricity to make binary computations? Well, a team at Stanford University has. They’re using tiny droplets of water and bar magnets to make logic gates.

Their goal is not to manipulate information or to compete with modern ‘electrical’ computers. Instead, they’re aiming to manipulate matter in a logical way. Water droplets are like little bags that can carry an assortment of other molecules making the applications far reaching. In biology for instance, information is exchanged via Action Potentials – which are electrical and chemical spikes. We have the electrical part down. This technology could lead to harnessing the chemical part as well.

Be sure to check out the video below, as they explain their “water computer” in more detail.