Building a Computer from Scratch
Many years ago I was taking a digital logic class in college, learning about the primitive circuits that were at the heart of a computer’s operation. The class was clear enough and the subject interesting enough that I really wanted to put what I had learned into action. I envisioned designing and building a computer from those simple circuits into a completed (though slow and simple, by modern standards) computer. I decided to build it using “virtual circuits” inside a computer. It would be a simulated computer. I had two reasons for doing this.
1) I am not an electrical engineer and wanted to focus on the computer’s own internal logic. I did not also want to have to learn engineering on the side, just for what amounted to an (involved) hobby. So this would allow me to concentrate my efforts on how the logic components worked together, not on figuring out power levels and resistors and transistors and so forth. A cheat, I know.
2) Even more importantly, building a computer was going to take thousands and tens of thousands of switches. While I wanted to build this thing myself, I didn’t want to purchase premade chips with my switches already made into logic components and ready for me to wire up. (Though that would still be a lot of hard work.) At the same time I did want to finish this thing before the end of the next millennium. Just to build 1K of memory, for example, was going to require 7168 components called gates. I didn’t want to make hundreds of breadboard circuits that looked like this! So doing it virtually inside a computer seemed like the best situation. I’d still get to design it from the ground up, but I could focus on what I wanted to focus on. And because it was simulated, once I designed a component I could just make copies and hook them together however I wanted.
Of course, nothing is that simple. Eventually life caught up with me. That, and the increasing number of problems cropping up with the simulating and signal timing of the interaction of these elements eventually caused me to focus on other things for a long while.
Fast forward a number of years. I found this book, The Elements of Computing Systems: Building a Modern Computer from First Principles. It was exactly what I needed. In the book, you actually do build a computer in exactly the manner I had wanted (and for much of the same reasons.) The authors don’t tell you how to do it, how things should connect together, or anything like that. Instead, they give the specification for specific components and it is up to you to come up with them. They describe how those components should work together, their behavior for specific circumstances, and it is you who comes up with a design that does exactly that. In short, I would do the work I wanted to do, but with some help knowing what I was going to need next or how things should work.
This pdf file is the result of my work. After I designed and tested my computer, I wanted to document what I had done, the design decisions and the things I had learned. From there, I just found myself imagining I was explaining to someone else exactly how to design a computer the way I did, the thought processes and the choices I made. So this document walks the reader through the process of designing a computer from the ground up. I tried to explain everything as clearly as possible so that it would be understandable. I found that doing this helped me have a deeper understanding of how this worked and why.
This project is, in many ways, like building a combustion engine from scratch. The engine would not rival or even equal those in vehicles today. But making one yourself is still an experience. You find yourself looking at early models, the ones those first engineers designed, and nodding your head as you now understand the decisions they made. You also marvel at what they were able to accomplish in those early days.
If you would like that experience yourself, or to try any of this out on your own, the authors have a website where you can find the book, assistance, and all the software tools you would need to build the computer yourself.
1) I am not an electrical engineer and wanted to focus on the computer’s own internal logic. I did not also want to have to learn engineering on the side, just for what amounted to an (involved) hobby. So this would allow me to concentrate my efforts on how the logic components worked together, not on figuring out power levels and resistors and transistors and so forth. A cheat, I know.
2) Even more importantly, building a computer was going to take thousands and tens of thousands of switches. While I wanted to build this thing myself, I didn’t want to purchase premade chips with my switches already made into logic components and ready for me to wire up. (Though that would still be a lot of hard work.) At the same time I did want to finish this thing before the end of the next millennium. Just to build 1K of memory, for example, was going to require 7168 components called gates. I didn’t want to make hundreds of breadboard circuits that looked like this! So doing it virtually inside a computer seemed like the best situation. I’d still get to design it from the ground up, but I could focus on what I wanted to focus on. And because it was simulated, once I designed a component I could just make copies and hook them together however I wanted.
Of course, nothing is that simple. Eventually life caught up with me. That, and the increasing number of problems cropping up with the simulating and signal timing of the interaction of these elements eventually caused me to focus on other things for a long while.
Fast forward a number of years. I found this book, The Elements of Computing Systems: Building a Modern Computer from First Principles. It was exactly what I needed. In the book, you actually do build a computer in exactly the manner I had wanted (and for much of the same reasons.) The authors don’t tell you how to do it, how things should connect together, or anything like that. Instead, they give the specification for specific components and it is up to you to come up with them. They describe how those components should work together, their behavior for specific circumstances, and it is you who comes up with a design that does exactly that. In short, I would do the work I wanted to do, but with some help knowing what I was going to need next or how things should work.
This pdf file is the result of my work. After I designed and tested my computer, I wanted to document what I had done, the design decisions and the things I had learned. From there, I just found myself imagining I was explaining to someone else exactly how to design a computer the way I did, the thought processes and the choices I made. So this document walks the reader through the process of designing a computer from the ground up. I tried to explain everything as clearly as possible so that it would be understandable. I found that doing this helped me have a deeper understanding of how this worked and why.
This project is, in many ways, like building a combustion engine from scratch. The engine would not rival or even equal those in vehicles today. But making one yourself is still an experience. You find yourself looking at early models, the ones those first engineers designed, and nodding your head as you now understand the decisions they made. You also marvel at what they were able to accomplish in those early days.
If you would like that experience yourself, or to try any of this out on your own, the authors have a website where you can find the book, assistance, and all the software tools you would need to build the computer yourself.
Comments
Post a Comment