Redditor Builds 8-Bit ALU Using Only NAND Gates and a Lot of Time

How computers work, on an actual physical level, can be quite difficult to understand. Even the underlying theory itself—Boolean logic—is…

Cameron Coward
6 years ago

How computers work, on an actual physical level, can be quite difficult to understand. Even the underlying theory itself—Boolean logic—is complex, and computers have developed so rapidly that the actual logical gates themselves have become microscopic. Those logic gates are made up of transistors, and even your smartphone’s CPU has billions of them.

One of the most basic logic gates is a 2-input NAND gate, which only requires four transistors. Despite their humble nature, multiple NAND gates can be combined to handle any kind of Boolean function. Redditor Notbookies took advantage of that fact to create something truly impressive: an ALU (arithmetic logic unit) constructed entirely of NAND gates.

The ALU is one of the most important components of a microprocessor, because it takes care of the math functions that are ultimately responsible for everything a computer can do. Notbookies’s ALU is capable of adding or subtracting two 8-bit numbers. Input is controlled with two 8-DIP switches, and output is displayed on 9 LEDs (8 bits, plus one carry).

Ultimately, Notbookies’s 8-bit ALU is impressive in its use of such low-level components. With tiny microprocessors costing just pennies, a person doesn’t build something like this for practical reasons. But, it’s a great way to learn about Boolean logic and how computers work.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles