Instructables

How to Build an 8-Bit Computer

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
DrifterNL16 days ago

What a great idea using the XOR and C-in to preform a subtraction!

xtjacob01 year ago
How many of each chip did you order?

I know right. i want to know that too!!!

If you are asking that, it means that you do not have understood this document. Keep studiing it !

spel3o (author)  xtjacob01 year ago
It depends on what schematic you end up using for your computer. In the end, it is really up to you. To know how many of each chip you need to buy it is best to look at the datasheet. For instance, if you need an 8-bit register and the datasheet for the chip that you are buying says that the part only has 4 bits of storage, you would need to buy two of those parts for one register.
If I'm not mistaken, Zilog have dumped the ever-reliable Z-80 chip, but I do believe that there is Z-80-H or higher still in their catalog.
i have static ram laying around collecting dust
i dont have any use for them

Luckily i have my sonic screwdriver on hand then!

I_-FANGOR-_I2 months ago

To improve the quality of the output signal, I added a 10k Ohm resistor between the output (3) and the ground. I obtain a perfect square signal.

R1 and R2 : 220 Ohm

C : 100 nf

I'm using 5 V

WOW i`m going to try to build one thank you for this ( WOW I cant pick me mouth off the flour ) :D

pyrohaz5 months ago
Amazing instructable! well done :)
gnusci6 months ago
WARNING: This project is for smart young people, and of course people which would like to learn what is inside the blackbox!
DBDexter9 months ago
During addition and subtraction operations, how are you preventing the accumulator and the ALU from entering a loop? I mean:
-Accumulator and register B tells the ALU which numbers to add/subtract.
-ALU outputs the result.
If you then enable the AI control line, shouldn't the accumulator send to the ALU the result, therefore making the ALU outputting a new result, which will be loaded into the accumulator, and so on?
Awesome project btw :D
spel3o (author)  DBDexter9 months ago
That confused me at first too when I saw the block diagram. I figured out that the registers only updated on the rising clock pulse. Because of this, it is important to have a very clean clock signal (unlike mine). Because of a dirty clock signal, some of my registers ended up doing two updates (and thus two operations) per clock cycle.
Wyle_E9 months ago
Google "homebrew CPU." There's a webring. One guy built a 16-bit general-purpose computer out of *discrete transistors*. I wonder if he also has a yacht constructed from toothpicks and superglue.
jensenr309 months ago
wow. this instructable is inspiring.
great work, man. seriously. you rock.
superaxander10 months ago
How long did it take to build it.
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?
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 guy1 year ago
this is how all computers should look like, can you make a 64 bit so we could see how it looks under the hood
~CableGuy1 year ago
could you upload a video of your computer in operation? PLEASE!
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.
great!
spel3o (author)  physicsguybri1 year ago
I did, thank you for the knowledge. I made the correction.
M0HIZ1 year ago
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
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.
Thanks. I understand it a lot more now.
onkelf1 year ago
may i ask why you dont use 74219 for ram instead ?
jj.inc1 year ago
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!!!
Say goodbye to the next 18 months of your life! :D
Didnt take anywhere near that long to build a computer in minecraft ;)
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.
ajoyraman1 year ago
I must compliment your 'ENORMOUS' patience. Great piece of wiring !
waldosan1 year ago
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)  waldosan1 year ago
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.
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
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.
WWC1 year ago
Now that takes some dedication. Very Impressive!
schmitta1 year ago
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.
it's like xkcd said, when geeks get girlfriends projects get orphaned...
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!