Basic Components

In this section, you will find out how the tiny transistors within a CPU are organised at a higher level into structures such as gates and registers. You will see how these higher-level arrangements make it possible for the CPU to perform its many complex roles.

Transistors

If you've got this far, then you're probably aware that a CPU is a chip containing a huge number - these days in the order of millions - of transistors (and associated components such as resistors, capacitors and diodes). A combination of transistors integrated into one discrete piece of silicon is called an integrated circuit (IC), which is what your CPU actually is (albeit a very complicated one).

Within the packaging of the ageing Intel Pentium chip (shown below), there are over 3 million transistors! That's quite a few considering it's less than two inches squared. In fact, the die size of the IC (i.e. what's under the packaging) is only 300mm2; that's about 2 thirds of an inch to a side!

Intel Pentium CPU

Well, now you know how the transistors are created on the chip. But what, exactly, do they do? In simple terms, a transistor is a semiconducting device with three 'connections'. One is the input, one the output and the third is the gate (aka control). Transistors can either be made to work as switches (digital function) or amplifiers (analog function). When operating as a switch, a small current applied at the gate causes the transistor to 'close', i.e. to permit the flow of current from the input to the output. In this way, the transistor is simply an electronic switch that has two output states: on and off. These states correspond to the two binary values 1 and 0 (respectively). The operation of an analog transistor is similar, except that the amount of current permitted through is proportional to the amount applied to the gate.

Perhaps the most common type of transistor in use in processors is the MOSFET (metal oxide semiconductor field-effect transistor).


Logic circuits and higher level organisation

A single MOSFET doesn't appear to be very useful. However, when we combine many transistors on a discrete chip, we find that the resulting IC can be made to perform some highly complex logic.

We can combine transistors (and associated components such as diodes and capacitors) to create logic gates. These gates can perform simple Boolean operations such as AND, OR, NOT, NAND, etc. Hence the logic gates themselves are called AND gates, OR gates, NOT gates, and so on. For example, a simple AND gate has two input transistors. In order for the output of an AND gate to be 1 (i.e. to produce current at the output), both inputs must also be 1 (i.e. current must flow into both input transistors). By contrast, in a NAND (NOT AND) gate, the results are reversed: i.e. output will be 1 provided both inputs are not 1 (i.e. 0 - no/low input current). In an OR gate, one or other (or both) of the inputs must be 1 for the output to be 1. A summary of these simple logic gates is presented below.

AND gate

X Y X Y
0 0 0
0 1 0
1 0 0
1 1 1

NAND gate

X Y X Y
0 0 1
0 1 1
1 0 1
1 1 0

OR gate

X Y X + Y
0 0 0
0 1 1
1 0 1
1 1 1

It is not hard to deduce from the huge number of transistors involved that a processor does a lot more than perform these simple logic tasks. It is combinations of massive numbers of these logic circuits which go to make up higher level circuits of the CPU, such as adders, registers, counters and decoders. These are examples of higher-level transistor organisations in the CPU that perform specific tasks, where these tasks can be much more complicated that Boolean logic operations. For illustrative purposes, I will go on to describe the role of registers.