Design a CPU?

Yes, there are more sophisticated logic gates like AND, OR, XOR and so on, but the NAND gate is special. How so? It can be used to create all of the others – a “universal gate” so to speak.

Why is this important to me? Because this meager little logic gate will be the focus of my next project…design my own CPU!

An eon or so ago when I was a young man at university I took a principles of computer hardware course in which I spent a lot of time combining elemental logic gates into more sophisticated devices such as multiplexers, adders, and even a full Arithmetic Logical Unit (ALU). It was a blast!

I recently got it in my head that I’d like to try my hand at that again. With my class notes and textbooks long turned to dust I dug around and eventually stumbled across Elements of Computing Systems – the tag line says it all “The NAND to Tetris Companion”. Yup, this book walks you through designing your own CPU, assembly language, virtual machine and high-level language. Great stuff!

While a bit short in technical details in places (how exactly does a D-Flip Flip work?) it was enough to inspire me to try my hand at building my own.