Mechanical Logic Gates With Amplification

One of the hardest things about studying electricity, and by extension electronics, is that you generally can’t touch or see anything directly, and if you can you’re generally having a pretty bad day. For teaching something that’s almost always invisible, educators have come up with a number of analogies for helping students understand the inner workings of this mysterious phenomenon like the water analogy or mechanical analogs to electronic circuits. One of [Thomas]’s problems with most of these devices, though, is that they don’t have any amplification or “fan-out” capability like a real electronic circuit would. He’s solved that with a unique mechanical amplifier.

Digital logic circuits generally have input power and ground connections in addition to their logic connection points, so [Thomas]’s main breakthrough here is that the mechanical equivalent should as well. His uses a motor driving a shaft with a set of pulleys, each of which has a fixed string wrapped around the pulley. That string is attached to a second string which is controlled by an input. When the input is moved the string on the pulley moves as well but the pulley adds a considerable amount of power to to the output which can eventually be used to drive a much larger number of inputs. In electronics, the ability to drive a certain number of inputs from a single output is called “fan-out” and this device has an equivalent fan-out of around 10, meaning each output can drive ten inputs.

[Thomas] calls his invention capstan lever logic, presumably named after a type of winch used on sailing vessels. In this case, the capstan is the driven pulley system. The linked video shows him creating a number of equivalent circuits starting with an inverter and working his way up to a half adder and an RS flip-flop. While the amplifier pulley does take a minute to wrap one’s mind around, it really helps make the equivalent electronic circuit more intuitive. We’ve seen similar builds before as well which use pulleys to demonstrate electronic circuits, but in a slightly different manner than this build does.

Continue reading “Mechanical Logic Gates With Amplification”

Computing Via (Virtual) Dominos

Back in 2012, [Matt Parker] and a team built a computer out of dominos for the Manchester Science Festival. [Andrew Taylor], part of the team that built the original,  has built a series of virtual domino puzzles to help explain how the computer worked. He also links to a video from the event, but be warned: the video contains some spoilers for the puzzles. If you are ready for spoilers, you can watch the video below.

The original computer could add two three-bit numbers and provide a four-bit result. We don’t want to give away the answers, but the inverter is quite strange. If you don’t want to puzzle it out, you can press the “reveal answer” to see [Andrew’s] solutions. Press “play” and watch the dominos fall.

Continue reading “Computing Via (Virtual) Dominos”

Patching Together Logic Gates

The digital world offers many advantages over its analog relatives, the use of boolean logic among them. Some of the functions, like NOT, OR, and AND are fairly straightforward and line up nicely with their linguistic counterparts. Others are more elusive, like XOR and NAND. For those just getting their start in digital logic, this teaching tool allows different logic gates to be wired together with patch cables.

While [David] first thought to use 74-series logic circuits directly, a much more versatile solution was to use configurable custom logic — a feature found in AVR DA-series microcontrollers that allows for the creation of custom logic circuits without the need for external hardware or complex programming. He went with an ATmega4809 which is capable of supporting twelve gates which are depicted graphically on the board, where the patch cables can be connected between inputs and outputs from a set of switches on the left to another set of LEDs on the right. The microcontroller continually polls for connections, applies the correct logic via a lookup table, and lights the appropriate LED.

Even with only twelve gates, the amount of real-world analogs that can be created with this teaching tool are numerous and varied, from simple things like displaying traffic light patterns in the correct order to implementing a binary adder. It’s an excellent way to get started in digital logic or understanding gates, and much simpler than dealing with 74-series chips on a breadboard like many of us might have done, but those logic chips can be powerful tools to have on hand even in the modern world of microcontrollers.

Scott’s CPU From The Bottom Up

It isn’t for everyone, but if you work much with computers at a low level, you’ll probably sooner or later entertain the idea of creating your own CPU. There was a time when that was a giant undertaking, but with today’s tools and FPGAs it is… well, not easy, but certainly easier. If you have the urge to try your own, you might have a look at [Simply Explained’s] video series called “Building Scott’s CPU.

The 11 videos cover everything from basic transistor logic to sequential circuits and moves on to things like ALUs, clock units, and how jump instructions work.

Continue reading “Scott’s CPU From The Bottom Up”

Al Williams Tells All In The Logic Simulation Hack Chat

The list of requirements for hosting one of our weekly Hack Chats is pretty short: you’ve got to be knowledgeable, passionate, and above all else, willing to put those two quantities on display for a group of like-minded strangers. Beyond that, we’re not too picky. From industry insider to weekend hobbyist, high school dropout to double doctorate, if you’ve got something interesting to talk about, we’re ready to listen.

But in casting a such a wide net, we occasionally forget that we’ve got a considerable collection of potential hosts within our own worldwide roster of contributors. Among this cast of characters, few can boast the same incredible body of knowledge as Al Williams, who was able to pencil in some time this week to host the Logic Simulation Hack Chat.

Or at least, that was the idea. In reality the Chat covered a wide range of topics, and was peppered with fascinating anecdotes pulled from Al’s decades of experience in the field. Though to be fair, we expected no less. He was building hardware before many of us were born, and can take credit for designs that have been at the bottom of the ocean as well as launched into orbit. He’s been writing about it just as long too, with articles of his appearing in iconic print magazines such as Dr. Dobb’s Journal.

Al has seen and done so much that he still surprises us with the occasional nugget, and we’ve been working with him for years. It was only a week or two back that he started a story with “Back when I used to manage a gas pipeline…” in the middle of a conversation about utility metering.

Of course, that’s not to say some technical discussion didn’t sneak in there from time to time. Sure Al’s  recollection of how they used to literally crawl over the schematics for the 68000 back at Motorola might stick out as a particular high point, but he also explains his personal preference for vendor-specific software tools over their more generic open source counterparts. He also draws comparisons between hardware description languages (HDLs) like Verilog and parametric CAD tools such as OpenSCAD in the way that they help model complex relationships in ways that can’t be easily done by more traditional means.

At one point the conversation lingers on the design and production of application-specific integrated circuits (ASICs), and how they compare to field-programmable gate arrays (FPGAs). Traditionally ASICs have been out of reach for the hobbyist, but with the recent collaboration between Google and SkyWater Technology to create an open source process design kit (PDK), they’re now within the capabilities of a dedicated individual. Matt Venn spoke on the topic during Remoticon 2021, and it’s good to see more folks in the community openly discussing the possibilities of custom silicon designed by hackers.

From there, things start really getting wild. From dreaming of virtual reality circuit simulators that let you fly amongst your creations like in Tron, to salivating over high-end technologies such as reflective memory, this Chat really runs the gamut. But then, that’s sort of why we hold them in the first place. Whether you actively participate or are just along for the ride, the Hack Chat gives everyone in the community a chance to gather around a virtual water cooler with fascinating characters that you won’t find anywhere else.


The Hack Chat is a weekly online chat session hosted by leading experts from all corners of the hardware hacking universe. It’s a great way for hackers connect in a fun and informal way, but if you can’t make it live, these overview posts as well as the transcripts posted to Hackaday.io make sure you don’t miss out.

A PNG Based Circuit Simulator

We’re sure thousands of hours have been spent in Minecraft implementing digital logic. Inspired by that, [lynnpepin] created a digital logic simulator named Reso that is based on pixels rather than voxels.

There are a few clever things here. First, different colors represent different parts. There are three different colors of wire, output and input wires, XOR gates, and AND gates. OR gates are just output wires, which or all the input wires together. By implementing these gates, Reso is, by definition, Turing complete. Since it’s just a PNG, it is trivial to open it up in GIMP and copy and paste one bit of the circuit multiple times. The different color wires are mainly to help route in a 2d plane, as you don’t have vias. Currently, the image compiles into a graph that is executed. [Lynn] chose code readability and ease of prototyping over premature optimization, so the code isn’t particularly fast. But it is pretty fun, squinting at the pixels that make up the adders and clocks he has on his blog. After giving Reso your image, it outputs a series of images that enumerate the state for several states.

The code is available on Github, and a Rust version has already been written that offers some impressive speed improvements at the expense of not being at feature parity yet. If MS-Paint isn’t your IDE of choice, perhaps a more Javascript-based digital logic simulator might be more to your taste.

TTL Simulator In JavaScript

How do you celebrate your YouTube channel passing the 7400 subscriber mark? If you are [Low Level JavaScript], the answer is obvious: You create a 7400 TTL logic simulator in JavaScript. The gate simulations progress from simple gates up to flipflops and registers. You could probably build a 7400-based computer virtually with this code.

In addition to just being fun and interesting, there were a lot of links of interest in the video (see below) and its comments. For one, someone watching the channel took the code and made a Verilog-like IDE that is impressive.

Continue reading “TTL Simulator In JavaScript”