In the previous post we’ve seen a 2 bit adder that works by manipulating the flow of current through the circuit by using an array of transistors. The adder was controlled manually by flicking switches.
But flicking switches to change the value of single bits wont get us far if we want to have a functional computer. The next step we will need to take is to make a routine that will run on its own. The routine should be basic, like a routine that’ll blink a LED on regular intervals.
First of all, lets see how much we can squeeze out from pushing buttons and connecting wires in a funky way. One of the interesting things we could do is to use feedback. What would happen if you connect the output of an OR gate to one of its inputs? Think about all the truth table of an OR gate (which is very basic), and now consider all the possible scenarios in a dynamic situation were you control the other input.
Once you are done thinking, watch this video about latches. With circuits containing logical gates and feedback, we have a way to introduce switching logic to the circuit. A combination of latches allows us to do some very interesting things as you’ll see later in the post.
However, we are still flicking switches. To make our circuit run a routine we need a way to make it change autonomously. The solution to our problem is oscillation of current in circuits, which can be created by a combination of a capacitor and an inductor. This was discovered during the 19th century, and the physics behind it are too complex to explain in this post (maybe I’ll dedicate a few posts going more into physics in the future). This is actually the first circuit you’ll encounter if you’ll visit the site that was mentioned in the previous post. By combining an oscillating current with a diode bridge, you can blink a LED a few times (before energy is lost in the form of heat and light emitted from the LED).
A few decades later, circa 1920 a crystal was first used as a way to generate oscillations in a circuit. Again the physics behind how it works will hopefully be explained in a future post. But meantime, here are some nice videos about crystals and oscillations.
What we have now is a mechanism that gives us pulses, ticks and tocks – a clock. There’s even a way to create a clock with a latch and a combination of basic circuit parts. For an example of this, we’ll jump forward in time all the way to 1971, when the 555 timer integrated circuit (IC/chip) was invented. This is a great video that explains how the 555 timer works.
With the clock and the switching circuitry, we can create little routines. This circuit will count from 0 to 0xf in binary (result displayed in binary using LEDs):
It’s based on a 555 timer chip (on the right), and 4 T-flip-flops.
With the right combination of switches, we can execute complex routines. All you need to think about the logic behind what you’re trying to achieve, translate this logic to transistors and hook them up to a source of voltage and a clock.
There are a few things still missing though. One of them is memory. We often need a place to store the output from a routine for later use. In the next post, we’ll explain how RAM (and memory in general) works.
Hope you found this post informative. Feel free to leave comments, and ask questions.