The goal of this post is to give a simple, interactive tutorial on how to build a CPU (Central Processing Unit). Index:1. Logic Gates2. Memory3. Multiplexer/Demultiplexer4. ALU5. CPU Layout6. Putting it all together
Computers are in everything today. From your smartphone, to your microwave, to your car, it's impossible to go through a day without using a computer of some sort. But how does a computer actually work? How does a computer... compute?
AND GateThe AND gate propagates a signal through if both of the inputs are on. (Click on the circles to the left of the gate to play around with it!)
OR GateThe OR gate propagates a signal if either of the inputs are on.
NOT GateThe NOT gate (also called an Inverter) propagates a signal that is the opposite of the input.
NAND/NOR GateWhen a circle is drawn at the end of a gate, it is the same as putting a NOT gate at the end.
XOR/XNOR GateThe XOR gate is short for Exclusive OR. This means that it is an OR gate that excludes when both of the inputs are on.
RS LatchThe RS Latch is a simple gate configuration that allows you to store a bit of memory.
RS FlipFlopThe RS FlipFlop is the same as before but has a little extra to allow for a clock input, which only allows the data to change when the middle switch is on.
Half AdderThese gate configurations allow for adding bits together.
Inputs Outputs 0 + 0 = 00 1 + 0 = 01 0 + 1 = 01 1 + 1 = 10