How to build a simple CPU from 74XX Logic Chips?

Hi everyone!

I'm wondering what are some good resources to learn how to build a simple programmable CPU from 74XX logic chips.  I'd like to build one where I use DIP switches to program the CPU.  I don't have an EEPROM/EPROM/PROM burner, so using those are out of the question.  I've seen some CPU's already that run an internet server, but they are too complicated/expensive to build and understand.  I want to learn how a CPU can be built and the principles behind it.  

I have about 150 74XX chips, including a 74LS181 ALU unit.  I also have enough capacitors and resistors for the project.

Thank you! 

sort by: active | newest | oldest
orksecurity5 years ago
See if MIT's Open Courseware system includes their introductory class in computer architecture. It is an _EXCELLENT_ introduction to the topic, starting from "a transistor inverts; add an input and it's a NOR gate" and building up to the complete design of a basic microprogrammible, multiprocessor computer. At each stage, they point out which abstractions are used to simplify the design... so you see how decisions made early on ripple all the way up through the system.

If you don't have a ROM burner, you're going to have to implement instruction decoding/dispatch in hardware. I hope you're good with karnaugh maps and similar logic optimization tools, because that can involve a LOT of gates. You probably ought to focus on something like a RISC machine in that case, since

Note that what you do with the CPU -- "running an Internet server" -- has very little to do with the complexity of the CPU. Making the CPU run as quickly as possible, for as little cost as possible, is what makes the designs complicated. Controlling for signal/clock skew, and allowing for gate delays, limits how fast data can be pushed through the hardware.

150 74xx chips might be a starting point, but they're unlikely to provide everything you need.

Switches aren't used to program the CPU unless you're talking about a microcoded machine. They're more often used to enter code and/or data into main memory. And even then, the usual practice is to enter the absolute minimum "bootstrap loader" program, and have that load the rest of the code from some machine-readable storage; trying to enter it manually is VERY error-prone.

There are good reasons that home computers didn't take off until someone realized that microcontrollers could be used as general-purpose microprocessors. Building your own CPU is a lot of work, and performance will be inferior to almost anything you could buy off the shelf.

(My thesis project, based on that MIT class's design and using the sorts of bit-slice chips used in some of the mid-sized machines of the time, would have been able to match the speed of the original 8080 or 6500 families chips... but that is snail-slow by today's standards. I'm not sure whether it would be on line by now -- probably not -- and in any case it wouldn't explain the principles; it just describes how I chose to apply them.)

prrgg14935 (author)  orksecurity5 years ago
What's the number of the course? I only found one course on Comp. Architecture...
Back when I took it, it was 6.032. But they've been renumbered since then. Lemme find time to look...
I think the current equivalent is


You might take a look at the online notes on the Apollo guidance computer, which from memory was built ENTIRELY from triple input NOR gates.


This is a seminal design for a small computer, and was also built by MIT's CS. Draper lab.

There is a book on the software design for the AGC which should be required reading for all EE and CS students.

prrgg14935 (author)  steveastrouk5 years ago
Wow! I did get the schematics for the AGC, but I didn't know that it used logic gates! I thought that the AGC used a variety of hard to get chips! Thanks for the info!
There are two ways of looking at it, either the triple input Nor was the ONLY chip you could get, or there were no hard to get chips. Somewhere I read that MIT/NASA were buying 90% of the entire production of the chip for AGC.

prrgg14935 (author)  steveastrouk5 years ago
BTW is the book that you're ref. to: "Apollo Guidance Computer: Architecture and Operation?"
Yes, that's the one. Let me know if you build one, I'd love to see it. Build an AGC is on my list of things to do before I die.
lemonie5 years ago

What are you going to use this thing for, out of interest?

prrgg14935 (author)  lemonie5 years ago
I just want to use this as a tool to learn how computers work! I don't really plan on actually using the CPU for a real project...

I had a ZX81, a compact little cheap 8-bit machine.
I found that the manual was a good informative read, there was a lot about how that machine was constructed and works (including BASIC programming and Z80 machine code)

I find there's a lot of Z80 documentation about. e.g. http://www.worldofspectrum.org/documentation.html