Computers are built out of simple switches, such as the telegraph relays described in "Code":
Relays are actually sufficient to build a full computer, but are not really practical:
The first Intel CPU, the 4004 circa 1971 had 2,300 switches. Modern Intel CPUs have over 2 billion. One gigabyte of modern RAM has roughly 1 billion.
A transistor is identical to a telegraph relay in function. They are both switches that are controlled by an incoming signal. The only difference is that transistors are much smaller, cheaper, faster and take less power.
Below is a diagram of a transistor:
The "collector" is normally attached to a power source, and is like the voltage coming into the relay above. The "emitter" is the output of the transistor. The "base" is the input to the transistor and determines whether or not it is on or not.
There are actually two types of transistors:
Transistors are normally made of silicon, which is a semi-conductor (a material that conducts some electricity, but not as much as a conductor). The silicon is "doped" with other chemicals which control the conductivity of the material.
The goal of doping is to add chemicals with either more or fewer available electrons into the silicon. If extra electrons are added, then it is called an N-type semi-conductor. If fewer are added, it is a P-type semi-conductor.
Both types of semi-conductor material are used in the creation of transistors. The collector and emitter are either both N-type, or both P-type, with the base being the opposite type.
Below is a "NPN" transistor:
This is also called a "N-type" transistor because when a negative voltage is applied to the base of the transistor, then current is able to flow through the transistor.
A "PNP" or "P-type" transistor is the opposite:
Larger components such as processors, memories and so on are not built out of individual transistors which are wired together manually. Instead, many transistors are "printed" onto a single board along with resistors and capacitors, and outgoing or incoming wires (called pins) which allow it to communicate with other components.
Copyright © 2022 Ian Finlayson | Licensed under a Attribution-NonCommercial 4.0 International License.