Living in a vacuum sucks.
~Adrienne E. Gusoff
This is the third part in my multi-part series on how computers work. Computers are thinking machines, but they can’t do this on their own. We need to teach them how to think. And for this, we need a language of logic. In the first part of the series, I introduced this language of logic, Boolean algebra. In the second part, I described how to formulate complex logical statements using Boolean algebra.
Now, in part three, I lay the groundwork for how we can implement simple Boolean logic using electronics. In this part, I describe the old-school electronics that people used for the first electronic computers.
Circuit Basics
Before we talk about logic in electronics, let’s take a moment to quickly discuss electronics as a whole. An electric circuit drives and takes advantage of the motion of electric charge. There are two flavors of electric charge, positive and negative. As the old adage goes, opposites attract and like-charges repel. So two positive (or negative) charges are repelled from each other, while a negative charge is attracted to a positive charge.
There are two important quantities we need to think about: current and voltage. Current describes the number of charges passing through a given piece of metal, like a wire, per second. If we imagine that charges make up a fluid like water, then electric current is exactly analogous to speed of the flow of the liquid. We measure current in amperes, or amps, after Andre-Marie Ampere.
Voltage is current’s desire to flow. In science lingo, it’s the potential energy per unit of charge at a given point in space. This is hard to visualize, so let’s talk concretely. If I have several positive charges near each other, they all repel and they want to move away from that point. So this is a place of high voltage. Voltage is always described in terms of positive charges. So if I have several negative charges next to each other, then even though the negative charges are repelling each other, a positive would just love to get near that negative action and it will go towards the spot. This is a place of low voltage.
We can generate voltage in a number of ways. But the one you’re probably familiar with is a battery. The positive terminal on a battery is a place of high voltage and the negative terminal is a place of low voltage.
We all know that water flows downhill. So in our water analogy, voltage is the height of the water. High voltage is a hill and low voltage is a valley. Positive charges like to flow from hills to valleys. But if a positive charge is already sitting in a valley, it’s probably not going anywhere. (If you like, you could instead think of it as the pressure of the water.) We measure voltage in volts, after Alessandro Volta.
In physical electric circuits, electrons, which have negative charge, are the charges moving through the circuit. By convention, current is defined in terms of positive charge, so current flows in the opposite direction that the electrons are moving. And similarly, electrons travel from low voltage to high voltage. Electrons flow uphill.
The Voltage of Truth
If we want to use electronics to implement Boolean logic, we need something to represent the values true and false. There are a number of choices, but a common one is to use voltage. Let’s say we have a circuit. We’ll connect a voltage-measuring device to a spot on our circuit—perhaps where two wires intersect—and say that, if it reads any voltage higher than +5 volts, then our circuit represents true at that spot. If it reads any lower, then our circuit represents false there.
But how can we control voltage? Well, fortunately, it’s just how attracted a positive charge is to a given area. In other words, it’s the density of electrons! (Or the density of protons if the positive charge is repelled from a region.) For example, (very roughly) electrons can move completely freely inside conductive metal like copper. So, since electrons repel each other, they will tend to distribute themselves evenly along a wire. This means that the wire will be at the same voltage all along its length.
Electrically Powered Electric Switches
So to control voltage, we just have to control the number of charges. How do we do that? Well, one way is a mechanical wall switch. If you flip a wall switch, you’ve probably closed a circuit allowing current to flow, adding charge, and changing a voltage. But this isn’t terribly useful for us because it requires us to take action. We want our circuit to behave like a Boolean truth table. The output voltage (or truth value) should depend on the input voltage(s).
The trick is that we place the burden of flipping the switch onto the electronics. In the olden days, we used a specific type of vacuum tube, called a triode, shown below. It’s called a vacuum tube because there’s no air inside the glass. It’s called a triode because there are thee terminals that you connect to when you make a circuit.
Here’s what it looks like inside:
The three terminals are called the cathode, the anode, and the filament respectively. The cathode and anode are connected to metal plates, while the filament is connected to a a wire mesh that electrons can pass through. Near the cathode, there’s a heating element which heats the cathode up.
Let’s ignore the filament for a moment. If we put the cathode at a low voltage and the anode at a high voltage, the heating element heats up the cathode, and boils electrons off of it. They’re then attracted by the anode and they fly to it. So an electric current flows from the anode to the cathode, as shown below. (Remember current flows in the direction opposite to the direction the electrons travel.) Since electrons are traveling into the anode, this might change the voltage from high to low.
But now let’s say we put the filament at a low voltage too. It repels the electrons. So now after we boil them off of the filament, they won’t want to travel. This means that if we put the filament at a low enough voltage we can stop the flow of current completely, as shown below.
In other words, we can control the current between the anode and the cathode by using the filament!
Naming Conventions
+Hamilton Carter at Copasetic Flow (who both uses Ham radios and used to design microchips and knows much more about the innards of computers than I) pointed out that there’s another common nomenclature for the terminals on a triode. The terminal I labeled the anode is often called the plate and the terminal I labeled the “filament” is often labeled the grid. This is important because then people call the heating element that boils off electrons a filament.
Sorry. It’s confusing, I know. Anyway, thanks Hamilton!
(By the way, if you haven’t already, you should check out Hamilton’s blog, Copasetic Flow. Like me, he’s a physicist in training and he posts some awesome stuff.)
Wishy-Washy Wibbly Wobbly Electronics
I feel the need to warn you that I’ve taken a _lot_ of liberties with my explanation of how the electronics work, especially in my electronics basics section. I wanted to say just enough so that you could understand the implementation of Boolean logic, which comes next time.
The biggest liberty I’ve taken is with the relationship between current and voltage. In simple circuits, there’s a simple relationship based on the resistivity of the wire, called Ohm’s Law. But in circuits where currents are changing very quickly, the relationship is much more complicated.
Perhaps at some point I’ll do a post on this.
Along Came the Transistor
Nowadays of course, no one uses triode vacuum tubes. Instead we use transistors, which are made using quantum mechanics, nanofabrication, and badass science wizardry. I’m not discussing transistors here because they’re a bit complicated and I didn’t want to muddy the discussion. The triode gets the idea across, and it’s a neat bit of computer history.
That said, transistors are dramatically better than vacuum tubes in basically every way. They’re millions, possibly billions, of times smaller and cheaper to produce. And they react to electrical signals much much faster. The only disadvantage is that transistors aren’t as durable as vacuum tubes and they can’t handle voltages nearly as high.
I wrote about transistors a while back. If you’re interested I suggest you check out the following articles in order:
- The Charming Doubleness, where I motivate quantum mechanics by discussing particle-wave duality.
- Unreal Truths, where I discuss the quantum energy levels in the Bohr model of the Atom.
- I’m With the (Valence) Band, where I use the Bohr model to describe how conductivity in materials works.
- How Things Work, the Field Effect Transistor, where I describe one way to make a field effect transistor.
William Beaty also has a beautiful and simple article on how a different type of transistor, the bipolar junction transistor, works. Check it out here.
Further Reading
Still curious about vacuum tubes? Here are some resources:
- The easiest resource is probably this article by PBS.
- This nice article by Eric Barbour is a little more technical, but still pretty accessible.
- Finally, this very technical article by John Harper is only for the very brave.
Next Time…
Now that I’ve introduced vacuum tubes, I’ll use them next time to finally explain how to implement Boolean logic electronically. See you then!
Hey Jonah! I like the article! There are other names for the tube parts you’ve labeled filament and anode. They are grid and plate respectively. The terminal on the far left of the tube is also connected to the plate. I’m not sure why they provided two terminals for the plate, but on almost all ham radio rigs, you’ll see these guys connected using the terminal in the top of the tube, (left edge of the picture). That’s it for the ham radio trivia, now for the physics trivia. Did you know that the first cyclotron worked with a grid between the accelerating D electrodes? Lawrence forbade his grad student to put one in, so the grad student waited until Lawrence was out of town, and voila, circulating beam was detected for the first time.
One more note about the grid/filament naming convention. Most folks who use tubes identify the filament with the portion of the tube that’s either directly or indirectly used to heat the cathode and boil off the electrons that form the circuit. Hence, in the spec sheet for the tube you mentioned, http://frank.pocnet.net/sheets/140/7/75TH.pdf [pdf with very slow load time], the filament specified as being constructed of thoriated tungsten is actually the thermionic source for electrons in the tube.
Thanks, Hamilton! And thanks for the info on vacuum tubes! I have to admit, I was a bit worried about getting specific conventions wrong, since I’ve never used one. 🙂
And wow, I had no idea the first cyclotron had a grid! What was the logic for that? Do you know?
I found a reference to the grid circuit here:
http://www.aip.org/history/lawrence/epa.htm
Lawrence thought the grid would shield the particles from the accelerating field while they were in the D cans. As it turned out, the field that fringed in without the grids provided beneficial focusing.
Oh wow! Cool! Thanks for looking up the reference! I guess it goes to show that our first instinct about a topic isn’t always the right one.