How to Build an 8-Bit Computer

 by spel3o
Featured
Building an 8-bit TTL computer sounds like a daunting and complicated task, or at least it did to me when I started out on my journey to understand the architecture of a basic CPU. When it comes down to it, a CPU is fairly simple in operation once you learn the fundamentals behind all of its processes. This project is intended to help anyone interested in building their own computer and gaining the wonderful knowledge that comes along with the process. Don't be afraid to try, you can only learn.

This project will start off by describing the basics of electronics. After that, the fundamentals of binary and boolean logic will be described. Lastly we will then move onto the function of the various parts of a simple-as-possible computer (with a few modifications) as described in Malvino's text Digital Computer Electronics. This means that the end product of this Instructable will be a computer that you can program with a unique instruction set. This project also leaves many of the design aspects of the computer up to you and serves as a guide for building your own computer. This is because there are many ways to approach this project. If you already have a sound understanding of boolean logic and the workings of binary feel free to skip to the meat of the project. I hope that you all enjoy and get something out of a build like this, I know that I sure did.

For this project you will need:

1.) A power supply
2.) Breadboards + lots of wires
3.) LED's for output
4.) Various logic IC's (discussed later)
5.) Free time
6.) A willingness to mess up and learn from mistakes
7.) A lot of patience

Optional (but very useful):

1.) Oscilloscope
2.) Digital multimeter
3.) EEPROM programmer
4.) Sonic screwdriver

Useful Links for a Project Like This:

Digital Computer Electronics: 
http://www.amazon.com/Digital-computer-electronics-Albert-Malvino/dp/007039861
TTL Cookbook: http://www.amazon.com/TTL-Cookbook-Understanding-Transistor-Transistor-Integrated/dp/B0049UUV38
 
Remove these adsRemove these ads by Signing Up

Step 1: What Is a Computer?

This may seem like a very simplistic question that does not need answering when, in fact, it is a question that many people do not know the true answer to. Computers have existed a lot longer than the transistor in mechanical and theoretical form. The actual definition of a computer was thought up by a very intelligent individual by the name of Alan Turing. He described a machine that was termed the Turing Machine. Every computer that we use today, from the computer or cell phone that you are reading this on to supercomputers all can be classified as a Turing Machine at their most simplistic level.

What is a Turing Machine? A Turing Machine consists of 4 parts: the tape, head, table and state register. To visualize the operation of such a machine you first have to imagine a film strip spanning infinitely in each direction. Now imagine that each cell of this film strip can contain only one of a defined set of symbols (like an alphabet). For this example let us imagine that each cell can only contain either a "0" or a"1". These cells can be rewritten an infinite amount of time but retain their information indefinitely until they are changed again. The part of the Turing Machine known as the head can write symbols to the cells as well as either increment or decrement its position on the film strip by a given integer (whole number) of cells. The next part is the table which holds a given set of instructions for the head to execute such as "move right 4 cells" and "set cell to 1". The fourth and final part of a Turing Machine is its state register whose purpose is to hold the current state of the machine. The state includes the instruction as well as the current data on the tape.

That is how simple the operation of a computer is. When your computer operates, it is actually operating as a turing machine. It processes data held on your computer by a given set of instructions and algorithms. The computer described in this Instructable is a very simplistic model of a computer, but it still operates as one that you can program with a set of instructions that it will follow and execute.

Useful Links:

Wikipedia on Turing Machines: 
http://en.wikipedia.org/wiki/Turing_machine
1-40 of 83Next »
MrZufrieden says: Apr 17, 2013. 6:45 PM
Say, if one were to develop their own computer architecture and platform for TTL 8-bit homebrewing and planned on developing an entire system of components that allow other users of the architecture to develop and customize their systems, would it be worth get a patent for the sake of being able to distribute one's 8-bit products?

I have been working on a TTL architecture for the past year and have begun the contruction of the CPU. I plan on starting with a system centralized around the BIOS that will run on a simple command line C-Language OS that will be display with a simple text based GPU and VGA driver.

After adding a GPU, I plan to create the final OS and work towards making a cheaper and smaller version of the computer that will be more accessible to the average individual. In that case, should I patent my designs before I post them on the Internet?
FindMeAwesome says: Apr 6, 2013. 6:22 PM
Awesome. I added it to my favorites list. By the way, I have a question. Could you put a video of the computer in action in the instructable, and can i do this very cheap?
techno guy says: Dec 30, 2012. 10:18 PM
this is how all computers should look like, can you make a 64 bit so we could see how it looks under the hood
~CableGuy says: Dec 4, 2008. 4:57 PM
could you upload a video of your computer in operation? PLEASE!
physicsguybri says: May 6, 2012. 11:26 AM
A Necessary Correction: Capacitors store charge (Q or q) NOT current (I). Not a subtle difference. Current, by definition, is charge flow dQ/dt measured as the number of charges (electrons technically but convention dictates we called them positive charges for convenience - an atrocity if you ask me) that cross an imaginary plane per unit time. The plane being that which spans the effective cross-section of the conductor. For DC the cross-section is the entire physical cross-section of the conductor whereas for AC the cross-section is an annular ring with outer radius at the conductor surface and inner radius dependent on the conductivity and frequency of the time varying signal - a phenomenon referred to as a skin depth. But I digress. Capacitors store charge and are the sink or source of current due to flwo into or out of the capacitor and only momentarily as they either charge (dQ/dt = C*dV/dt is positive) or discharge (dQ/dt = C*dV/dt is negative). Hope this has been educational to someone.
odalcet in reply to physicsguybriNov 11, 2012. 3:34 AM
great!
spel3o (author) in reply to physicsguybriMay 6, 2012. 2:59 PM
I did, thank you for the knowledge. I made the correction.
M0HIZ says: Jun 8, 2012. 12:17 AM
How did you tell the computer what to do when you first made up the commands. Did you have to 'define' the assembly language. Please pardon my ignorance if I'm massively wrong!

Thanks
tiberiustibz in reply to M0HIZNov 10, 2012. 9:56 AM
You'll have a hard time understanding how most of this works without a background in microprocessor architecture.

The crux of the computer is the Control Unit, which reads in the Opcode and then manipulates control lines to affect the change. In this case (to the best of my cursory reading), the opcode sets an address for an EEPROM. In the EEPROM, a function is implemented which manipulate 16 control lines to move data around based on the opcode. Each instruction has three possible states.

So in short, yes, you define the assembly by programming the EEPROM with a sequence of control activations.
M0HIZ in reply to tiberiustibzNov 10, 2012. 10:35 AM
Thanks. I understand it a lot more now.
onkelf says: Nov 7, 2012. 9:17 AM
may i ask why you dont use 74219 for ram instead ?
ajoyraman says: Oct 9, 2012. 10:26 PM
I must compliment your 'ENORMOUS' patience. Great piece of wiring !
jj.inc says: May 6, 2012. 9:45 PM
I am going to use this to build a minecraft computer. There you can see the flow of power, voltage, resistance, ect. don't matter, and the components are all free. Virtual computers on real computers rock!!!
TechGadgets in reply to jj.incSep 22, 2012. 6:52 AM
I'am building the computer right now, the most compex parts, the ALU and RAM are allready done. I totally agree, the way redstone works makes it way easier. Anyway you might look at Eloraam's Redpower Mod, handy IC's (Logical gates) and 16bit cable included ;).
And everything done in a few hours ^^.
Good luck. If you want (or somebody else) to compare your results with mine, just send me a PM.
Kryptonite in reply to jj.incJun 8, 2012. 4:52 AM
Say goodbye to the next 18 months of your life! :D
OCPik4chu in reply to KryptoniteOct 16, 2012. 3:59 PM
Didnt take anywhere near that long to build a computer in minecraft ;)
waldosan says: Jun 12, 2012. 8:39 PM
this is commitment dude, i can barely begin to comprehend this, (decimal binary was throwing me through a loop...) is it scale able in the sense that if you made two of these you could have a more powerful 8 bit computer or would it be scale able in the sense that making two of them makes a 16 bit machine? i'm favoriting this and reading it over until i understand it...
spel3o (author) in reply to waldosanJun 14, 2012. 10:22 AM
It's not really in a scaleable sense unless you worked out some way for them both to run in parallel. It would be a lot more simple to design a more efficient architecture and up the clock speed. And feel free to read it over as many times as you want, I had to do the same with my book to get a full grasp of everything I needed for this project.
ncheriyan in reply to spel3oAug 8, 2012. 8:35 AM
u rock dude......u know what,i'm gonna kill u and cut your brain and preserve it for the future generation......................even einstein will bow down to u....................................................hi hi hi
waldosan in reply to spel3oJun 17, 2012. 9:24 PM
that's still quite amazing! wouldn't upping the clock speed increase the heat output of the entire system like in a conventional computer? and are you thinking of mounting this on a pcb anytime soon? i think it'd be kinda fun to try and do this in fritzing.
WWC says: Jul 1, 2012. 7:11 PM
Now that takes some dedication. Very Impressive!
schmitta says: May 7, 2012. 5:21 AM
Very cool. My freshman year at Virginia Tech (1969) we had a guy on the hall designing a computer from scratch. I don't remember what ICs we had back then but for his memory he was going to use an endless magnetic tape with a read / write head. he would store a section of bits on the tape when he got to the right location and read memory when the tape was at the right spot in memory. I would like to know what happened to that guy and what he is doing now. Either he or his roommate discovered girls that year and I think that put a kink into his computer plans.
waldosan in reply to schmittaJun 12, 2012. 8:36 PM
it's like xkcd said, when geeks get girlfriends projects get orphaned...
gtoal says: Jun 2, 2012. 5:56 PM
You could simplify this design a lot while still keeping to the old school construction, for instance by using 2 32K static rams for memory - attach a small battery to one of them so you can unplug it and not lose data, and that'll let you program a bootstrap loader on some other system before you insert it into your standalone system.
Ihatetechnology says: May 27, 2012. 9:58 PM
Correction to my last comment. Jameco only has the 74LS181 but the price is still $3.95.

Plus, I forgot to compliment you on your hard work. There was a lot of wiring to do in your project. That much gets to be hard to keep track of.

If you go on the Jameco web site and look for the 74ls181 , a data sheet will be available. If you select the data sheet, near the end of the sheet is a schematic showing all of the gates and their interconnections. You might find it interesting just to examine the schematic.

I like to look at the schematics of various chips to see what I can learn about logic in addition to books that I read and experiments that I perform.

Have fun with your future projects.
Ihatetechnology says: May 26, 2012. 9:15 PM
Did you ever think about using a 74181? It's a 4-bit ALU but you could use two and build control logic around them to give yourself an 8 bit computer which will perform arithmetic and logic functions.

The 181 is not inexpensive. Jameco lists it for $3.95 a piece.

You might consider the 181 as a future 8-bit project.

I agree with Juliadee's comment about trying wirewrap for a project of that size.

R.A.T.M says: May 17, 2012. 8:45 PM
So weres the 8 bit option on blender
spel3o (author) in reply to R.A.T.MMay 17, 2012. 9:07 PM
I take it that you are taking a stab at my project since it is in the "Make it Real" challenge. I entered because it did indeed require a computer to build, moreover the inverse of that statement but the guidelines hold true.
R.A.T.M in reply to spel3oMay 17, 2012. 9:24 PM
No im not constructing you project im a neat freak so bread board and me are a no nice ible tho really is
spel3o (author) in reply to R.A.T.MMay 17, 2012. 9:42 PM
Oh, my bad. I apologize for the misconception.
R.A.T.M in reply to spel3oMay 17, 2012. 9:56 PM
Its totaly fine
asfi235 says: May 8, 2012. 9:56 AM
After reading through the comments, I admit I'm surprised that nobody's asked the obvious gearhead question: how fast can you clock this sucker?
louis.m in reply to asfi235May 14, 2012. 8:55 AM
What is the sense of high clockspeed when you have to wait for all that software to be loaded, before you can use the thing?
There are computers that are slow but ready immediate after switching on.
I have an old Acorn Atom (build my self) that is a scientific calculator the moment is gets juice, and it can (without expensive software) show a graph of any mathematical function I feed it !
In addition, I think the purpose of the above article is to develop knowledge about the way things work.

Nobody began immediately with complicated electronics, most of us began with a battery and a bulb !
t.rohner in reply to asfi235May 9, 2012. 12:59 AM
Haha, this is definitely the wrong question here ;-) Single step would be more appropriate...

Low power Schottky's will reach something in the upper shortwave region at best (30 MHz).
But certainly not on a breadboard.

I always have to bow deeply, when i see those "newfangled" appliances like PC's, MP3 players or mobile phones, that run processors with clock frequencies in the microwave regions.

Although they are not clocked as high externally, it's a huge challenge to get such boards working. Let alone the processors themselves.

The stray capacitances and inductances of a quarter inch copper line on a PCB can make you go nuts above certain clock frequencies.

Then, think about the power requirements of those "newfangled" devices. They (phones) run for hours, if not days on a 4Wh(3.7V x 1100mAh) battery.

Those TTL-graves(Digital Equippement PDP8), as we called them used a 5V power supply at 20 Amperes.
Those monsters would suck a phone or notebook battery in under a minute, if they were able to provide such currents without catching fire.





asfi235 in reply to t.rohnerMay 10, 2012. 9:47 AM
I think the real limitation is not the solderless breadboards, but the 555 used as the clock source. Runner-up bottleneck would be the CD4029, I learned the hard way just how slow 4xxx metal-gate CMOS is compared to just about anything else.

The hardware performance of modern PCs amazes me too, but it's such a shame that I'm still stuck waiting for software to execute *billions* of CPU instructions worth of sweet nothing. Back in the old days, computer programmers (they didn't call themselves "software developers" then) understood hardware limitations and wrote their code to make the best of the situation.
t.rohner in reply to asfi235May 11, 2012. 6:20 AM
You speak from my heart about coding efficiency. I used to program in Forth.
The most efficient after Assembler. In terms of memory usage, even better.
The nerdling says: May 13, 2012. 6:34 PM
once again, i have found something tooooooooo awesome for me to build
tzq33tdq says: May 11, 2012. 4:19 PM
I've wanted to do something like this for a while... and I finally found a good load of info... Thanks so much for posting this! THIS IS ALMOST TOO EPIC!
gogind says: May 8, 2012. 8:05 AM
There is a typo if I'm not mistaken, in step 14.

"RO - Program memory in" should be "RO - Program memory out"

Anyway, great work, I think I will try and make one. Thank a lot for documenting the whole process. Cheers :D
spel3o (author) in reply to gogindMay 8, 2012. 4:28 PM
Thank you for the correction, I'm glad you liked my article. Good luck with your build.
1-40 of 83Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!