Nibbler: The 4-Bit Self-Made CPU

Time flies but it still seems like yesterday when I discovered "But How Do It Know", the must-read book if you want to understand how a CPU works, the central piece of electronics in any electronic device today be it a SIM card, a smartphone, a notebook or a supercomputer at a large computing facility. Once you have read this book and have some background in tinkering with electronics you can build a working CPU with memory and I/O at home. I started doing this and came as far as making shift registers and memory work. Unfortunately, there just wasn't enough time and there were too many components I wanted to use in my design so that's about as far as I got. But perhaps there is yet another way to achieve this goal without waiting for retirement: The Nibbler by Steve Chamberlin.

The Nibbler is a 4-bit CPU with ROM and RAM, fitting on a single medium sized board. The difference between what I had in mind and the Nibbler is that it uses a single chip 4-bit Arithmetic Logical Unit (ALU) which I initially wanted to build out of individual logic chips like adders, etc. Also, I had an 8-bit ALU and address bus in mind, but obviously the 4-bit approach makes wiring a lot more practicable. And finally, the Nibbler simplifies things by separating the program ROM and RAM, which again saves a lot of wires. While the original Nibbler design was done in wire-wrap technology, William Buchholz has picked up the project and produced a "real" PCB which again significantly reduces the time it takes to put things together.

Obviously this design is a bit different from the CPU discussed in "But How Do It Know". But in the end that doesn't matter because the concepts are the same. Using a single ALU chip is somewhat of a compromise between reducing complexity and being as discrete as possible to understand how the stuff really works. Fortunately there's a good description of the 74HC181 ALU chip on Wikipedia and a great diagram that shows how it looks like inside, basically consisting of several function blocks for different arithmetic functions and a total of 75 gates.

Another thing that makes this ALU chip appealing is its historical background. According to the Wikipedia page linked above, it was the basis for a number of historically important computers that were designed before fully integrated CPU chips became available, the DEC PDP-11 being one of them. The PDP-11 was obviously not a 4-bit computer but with the help of a support chip it's possible to daisy chain a number of these 4-bit ALUs to perform arithmetical operations on bytes and words.

Finding stuff like this is one of the reasons why the Internet is so great. Without it, it's unlikely that I would have ever found this project because building your own CPU does not only seem to be a niche, its more of a nano-niche. What I find a bit amazing, and sadly so, is that William didn't sell too many of his boards yet even though the price makes it a no-brainer for those with ambitions to understand how a CPU works not only from a theoretical point of view but also in practice.