Skip to content

1. Logic Basics

Electricity

There are protons that are positively charged. There are electrons that are negatively charged. The electrons orbit the protons. Opposite charged attract. Like charges repel, wait thats were we get electricity!

alt text

Get a piece of metal, oh look the charge is balanced, let's knock it out of its balanced state.

alt text

Shove some electrons in and boom, we get some unhappy electrons.

alt text

Now add some wires and we get electrcity.

alt text

Voltage meansures electron unhappiness.

alt text

Current measures how many electrons per second are moving past a point.

alt text

In the past, we've used valves. Now we use transistors.

alt text

Specifically, we are using the MOSFETs. The G means gate, D is drain or output, and S is the source. Voltage represents bits (9V=1, 0V=0).

alt text

They come in two different types.

alt text

alt text

Now we can combine these types to make gates. Let's make a NOT gate.

alt text

alt text

We can also bundle wires to cut down on a million NOT gates.

alt text

NAND Gate

alt text

AND Gate

alt text

NOR Gate

alt text

OR Gate

alt text

We can combine these gates to get specific outputs.

alt text

Now there is a cool little property with NAND, its universal. So we can make all other gates with just an NAND

alt text

Next Page →