The hardware of computers is a bunch of very complex electronic pieces and
parts. Hardware is what you can see and touch. It includes transistors,
capacitors, resistors – all the normal components used to build electronics
for Televisions, Radios, Microwaves, etc!
Designing the Hardware for a computer involves figuring out how to make
electrons flow through various electronic components in some logical manner.
Discovering a Fundamental Fact!
When I was first studying computers in detail, I discovered that knowledge of
electronics was not that important. While it is very important that someone
knows how to build the electrical stuff, you do not need to know a lot about
electronics to build computers.
Computers are mostly Logical devices. I constructed a number of computer
systems by connecting fairly simple components (bought at places like Radio
Shack) using logical rules! If I followed these rules correctly, I ended up
with a working computer. Neat!
A Brief look at the parts
It is interesting to see how the fundamental parts work, at least in a crude
way. In the following discussion what is really happening is not totally
explained, but the description is accurate enough to get a sense of the actual
operation of these parts. We saw some of these parts in the last lecture, so
some of this is not new.
Here is a transistor:
Well, actually, that was the first one. There are three wires that control the
transistor. One is the point where incoming electrons enter the device, one is
the point where those electrons leave the device, and the last is a kind of
gate control that regulates how many electrons flow through the device. Phew!
Note
If you know nothing about electronics, a simple analogy might help.
You all know something about plumbing, right? Water flows through pipes
as you open and close faucets. Water has a pressure and you have probably
played around enough to understand that you cannot push a lot of water
through a skinny pipe, but you can if the pipe is large enough. Now, when
we talk about electrons moving through wires, thing of water moving
through a pipe. We actually call the flow a current. When we talk
about the voltage in an electronic circuit, think about water
pressure. And when we talk about a switch, think faucet. That should be
enough for what follows.
Now, a transistor works like this:
If a small number of electrons flow into the control, the transistor can
control a large number of electrons flowing through the device. Just like you
turning a knob on a faucet with a small amount of force to control a large
amount of water flowing through your pipes into the bathtub!
Modern transistors are tiny and we draw simple symbol to represent them. What
researchers discovered, was that when we combine a few of these devices, we
could come up with circuits that performed logical or arithmetic functions -
and the rest is history!
Here is a drawing of a circuit for a device we call an AND gate. Electrons
will flow out of this device only if there are electrons flowing into input A
AND input B:
The funny squiggles are called resistors and they help limit the number of
electrons that flow - too many and we fry the device!
Now, we computer folks do not care about all this silly circuitry, so we
typically draw this circuit in a very easy to use way:
This is the common symbol used to represent an AND gate. We also do not
worry about electrons moving. Instead we simply measure the voltage at our
inputs and outputs (this is always done by connecting a voltmeter between the
input and a ground point in the circuit.) If the voltage is about 5 volts, we
say the logical value is a 1, if the voltage is zero, we say the logical value
is zero. Bingo! True and False, 0 and 1. Binary stuff!
This device is called a NOT gate. It inverts the signal, turning a 1 at the input into a 0 at the output - and vice versa! We
can combine components like this to form more complicated devices: Here is a
combination of parts:
Which gives us ‘’‘A AND NOT B’‘’.
What will the output be here for any possible input? One simple way to describe
how the device works is to build a truth table showing all possible inputs and
the associated inputs. Here is the truth table for the NOT gate
Here is one for the AND gate:
| Input A |
Input B |
Output C |
| 0 |
0 |
0 |
| 1 |
0 |
0 |
| 0 |
1 |
0 |
| 1 |
1 |
1 |
And, here is the table for our combined circuit:
| Input A |
Input B |
Output C |
| 0 |
0 |
0 |
| 1 |
0 |
1 |
| 0 |
1 |
0 |
| 1 |
1 |
0 |
(See if you can figure this one out!)