8-bit computer update
Duration: 6 min
Chapters: 7
Intro
Frame 1 @ [0:00]
[0:00]
Ever since I uploaded a few videos of this 8-bit programmable computer,
[0:04]
that I built a while ago, I've gotten a lot of questions about it.
[0:07]
I wanted to answer a few of the most common questions,
[0:10]
and definitely by far the most common question,
[0:12]
is, "can you show us how to build it?" or "do you have schematics for this?"
Frame 2 @ [0:14]
[0:16]
Or something along those lines. The answer is, believe it or not, I actually don't have schematics
[0:21]
for this thing, I never sat down and drew out a full schematic.
Schematic
Frame 3 @ [0:26]
[0:27]
Because of how modular everything is, or how modular this architecture is,
[0:31]
I was able to build each piece of it by itself, and build it, and test it, and experiment with
[0:38]
one module at a time, before I had to put it all together. It wasn't really until all the pieces came together
Frame 4 @ [0:41]
[0:45]
that I really had to be a little bit more thoughtful about how it was all going to work.
Book recommendation
[0:50]
For that I had this really good model to follow in this book that I really recommend,
Frame 5 @ [0:50]
[0:55]
"Digital Computer Electronics", by Albert Paul Malvino.
[0:58]
Unfortunately, I think the book is out of print, but hopefully you can find a used copy online
[1:04]
or something. This book has an architecture... has a couple architectures.
Frame 6 @ [1:04]
Architecture
Frame 7 @ [1:06]
[1:09]
One is the SAP-1, which is, "simple as possible". The goal is to be a very simple computer architecture,
[1:18]
that demonstrates all the crucial ideas behind computer operation
[1:21]
without being any more complicated than it needs to be.
Frame 8 @ [1:21]
Components
[1:26]
The architecture that they have in here, is basically the model that I followed,
Frame 9 @ [1:26]
[1:31]
what I based this computer on. So you can see that all of the same components are there.
[1:35]
There's a program counter here, there's the memory address register,
[1:39]
the 16 bytes of memory that are used, programmable read only memory,
Frame 10 @ [1:41]
[1:44]
I've got RAM but, same difference, as far as the operation is concerned.
[1:49]
An instruction register, the control unit, which is all this stuff down here,
[1:53]
and you can see that they have all these signals going out, that come back in
Frame 11 @ [1:55]
[1:57]
to all the other components, and that's what all these yellow wires are.
[1:59]
They're all the control signals. They come from the control unit and go out
[2:02]
to all the different pieces to orchestrate everything.
[2:05]
The accumulator, which is the A register here. The ALU, which is the arithmetic
Frame 12 @ [2:10]
[2:11]
logic unit, which in this computer, just adds and subtracts.
[2:14]
Those are the only arithmetic operations it knows how to do.
[2:17]
And then the B register. The A and the B register are the inputs for the arithmetic.
[2:23]
And the output register, they have a binary display, I've got a decimal display
Frame 13 @ [2:25]
[2:27]
which I thought was a little nicer.
[2:29]
That's one enhancement that I made.
Enhancements
Frame 14 @ [2:30]
[2:32]
I made a few other enhancements to this as well, primarily around the instruction set
[2:36]
and what you can actually do with it.
[2:38]
The model here in the book, it talks about the instructions having a
[2:42]
"load A" instruction, an add instruction, subtract, output, and halt, and that's it.
Frame 15 @ [2:44]
[2:48]
I added a couple other things. I added a load immediate, which just lets you
[2:52]
save a little bit of memory, if you wanted to load a particular value into the A register.
[2:57]
And then a "store A" command, which in addition to the "load A," which loads the accumulator
Frame 16 @ [2:59]
[3:03]
from memory, you can store what's in the accumulator to memory.
[3:06]
So that let's you build a little bit more complex programs.
[3:10]
I also added jump instructions, which I thought were pretty important
[3:13]
for a programmable computer. There's a regular jump instruction,
Frame 17 @ [3:14]
[3:16]
there's also a conditional jump instruction, that jumps when the carry bit is set,
[3:20]
anytime the addition over flows.
[3:24]
So you might still be wondering, can I just tell you how to build this thing already,
Future plans
Frame 18 @ [3:26]
[3:30]
can you draw up a schematic or something like that? Well, I've got some good news.
[3:34]
That is exactly what I plan to do, to make a bunch of videos, that go through every step of the process.
[3:40]
I am planning to actually build a whole new copy of this computer from scratch,
Frame 19 @ [3:40]
[3:46]
and have videos of all of it. The bad news is that it's going to take a while.
[3:52]
I don't have a ton of free time, unfortunately, but my personal goal is to make one video a week,
Frame 20 @ [3:55]
[4:02]
at a minimum. So we'll see how well that goes, but even with that, I want to make sure I'm covering
[4:08]
everything from first principles, not leaving any mystery about why things work the way that they do.
Frame 21 @ [4:10]
[4:14]
I don't wanna ask you to take anything on faith, but going step by step,
[4:20]
probably means it's going to take a while to get to everything. So at least...
[4:25]
at least a few months. Probably longer. I hope that it will be worth the wait. My goal, and I'm convinced that
Frame 22 @ [4:25]
[4:34]
anyone can build this computer. As long as you're patient enough to wire it all up, carefully,
Frame 23 @ [4:40]
[4:42]
and you have the persistence to troubleshoot the inevitable wrong connections,
[4:47]
or broken connections or something. I'm convinced that anyone can build this and really understand
[4:54]
at a very deep level, how a computer works, by building this. Even if you, don't have any experience with
Frame 24 @ [4:55]
[5:00]
this sort of thing, or with electronics. In fact I really hope, I'm really looking forward to that happening, and
[5:06]
people building these things, and improving on it even. So, I think for the next videos, I'm going to be
Frame 25 @ [5:10]
[5:15]
traveling over the next week, so it may be in a couple weeks before I can get the next video up.
[5:20]
My goal is to just start focusing on the clock, as the first steps, and walk through
Frame 26 @ [5:25]
[5:29]
building this, the clock circuit, from scratch. There's a couple interesting things going on here.
[5:34]
The clock, of course, coordinates everything in the computer, the timing of everything.
[5:40]
In this case, you can adjust the speed of the clock, you can see here I'm slowing it down,
Frame 27 @ [5:40]
[5:45]
so everything else is running slower. You can also stop the clock, and then step one step at a time,
[5:54]
which is very useful for troubleshooting something, if something isn't working, which inevitably,
Frame 28 @ [5:55]
[5:59]
if you build this you're going to run into a point where something isn't working, and you need to
[6:03]
go step by step. A couple features that are of the clock, is that it uses the 5-5-5 timers,
[6:08]
so I will go through how those work, and they're being used in a couple different applications,
Frame 29 @ [6:10]
[6:13]
in the clock circuit. So, I think that that's the next thing that I'll do, the next set of videos.
[6:17]
You can look forward to seeing those. I hope you're as excited as I am about this.
[6:23]
Again, I ask for your patience, it's going to take a while to get through it all,
Frame 30 @ [6:25]
[6:26]
but I hope it will be worth it. If this is exciting to you, please give this video a thumbs up,
[6:33]
and subscribe to the channel, tell all your friends, cause if you like what you see,
[6:38]
knowing that people find these videos valuable, is really motivating to me, so
Frame 31 @ [6:40]
[6:43]
subscribing and watching the videos, is honestly the best way to make sure that I
[6:48]
keep working on them. Thanks for watching.