codebite _


If you missed the introductory post, head here: Part 0.


In order to make a CPU we need to start from somewhere. The 0th level of abstraction here is physics (at least to our understanding), but I think that’s too low. Let’s skip that, let’s also skip electrical engineering and head straight into logic, Boolean logic that is. But before we do that I do feel the need to talk about the building block of it all.

Meet the transistor.

Transistor

Transistors are very useful, before them we used cogs, relays, vacuum tubes. Obviously each one was an improvement but they were still slow as heck. But what is a transistor?

A transistor is a semiconductor device used to amplify or switch electronic signals and electrical power.

from Wikipedia

But for our purposes just think of it as a switch, you know, like the one you are using to turn on or off a light bulb. Except it’s not mechanical, and can switch thousands times per second.

There are many types of transistors, but we only care about P-type and N-type. Essentially in N-Type you need to apply current to let current flow in the gate (close ...

Continue reading...



CPU meme

Ever had a thought "how does my computer work"? I sure did. And I wanted to understand how it does all the cool thing it does. How can I tell it to draw pixels on screen? How does it know what screen is? How does it know what's blue, or what's 'c' is, "this is a string"? How can it do multiple things at the same time? (Talking about single core here)

In this series of blog posts I will try to answer some of those questions by building my own, simple CPU, starting with just a transistor, Boolean logic and my google-fu.

The goal is simple really, build the simplest 8-bit CPU to understand how they work. Nothing fancy, no branch-prediction, not even any pipelining. Maybe even cheat somewhere, like not making all instructions for it, since some can be emulated with others.

If you don't know some of those terms, don't worry, I will introduce them later when they become relevant. It'll all make sense in the end.

"Wait, are you going to solder a giant CPU?" some of you might ask. And, no, no I won't. What we'll do, is ...

Continue reading...


Page 2 of 6 | Top