Smaller and smaller switches

In a previous step you learned that we can perform calculations using 1s and 0s, and that the state of a switch can be used to represent a 1 or a 0. Now let’s take a look at how this concept developed into the modern computer.

A switch is just a device that can either allow electricity to flow through it, or stop electricity from flowing through it. The first switches used in programmable computers were called relays. These are electromechanical devices, so they consist of moving parts.

A relay is little more than an electromagnet attached to a normal switch. By using a current to turn the electromagnet on and off, you can turn the switch on and off. The Z3 was the first programmable computer to be built, in 1941, and contained 2000 relays. It was capable of executing about 5-10 instructions per second, which is pretty slow in comparison to modern computers that have clock speeds in the billions.

A relay. When the electromagnet is off, the two contacts are held apart by a spring, so no current flows and the lamp connected to the relay does not light. When the electromagnet is turned on, the lever is attracted to the electromagnet, pushing the two contacts together and allowing current to flow. The lamp then lights up.

After the relay switch came the triode, or valve (in the UK). These devices had no moving parts, which meant that they could act as switches much faster. A triode consists of an evacuated glass tube, into which two electrodes are inserted, separated by a grid. One of the electrodes is heated up, and emits electrons. These are attracted to the other electrode, which is positively charged. This completes the circuits and allows currents to flow. However, if the grid between them is negatively charged, it will repel some of the electrons, preventing them from reaching the second electrode and stopping the current.

The first computer to use these valves was the Colossus, built in 1943. The problem with valves, though, was that just like light bulbs, they could “blow” and need to be replaced.

Colossus

Following on from valves came the invention of the transistor. Made from semiconductors, these components could again act like switches without having any moving parts, and were very hard wearing. They could also be manufactured to be very small, meaning a lot of transistors could be combined together. Transistors are the basis for all modern day computers.

Transistorer (cropped)

A transistor has three terminals – the base, the collector and the emitter. A small current at the base of the transistor can allow a large current to flow between the emitter and the collector. This allows transistors to act like tiny little switches.

You can see a transistor in operation in this simulation.

A coin battery is connected to several other components. Connected to the positive terminal of the battery are a switch labelled "INPUT" and a resistor. The other side of this resistor is connected to the collector of a transistor, and to an LED, labelled "OUTPUT". Connected to the negative terminal of the battery are the emitter of the transistor, and a resistor, the other side of which is connected to the LED. The second wire from the switch is connected to the base of the transistor. Link to interactive simulation (You will need to create a Tinkercad account to view it)

You don’t have to understand the circuit, but just notice that the transistor is enabling the button to do the opposite of what you might normally expect. When the button is off, the LED is on. When the button is clicked, it turns the LED off.

Think about this in terms of a Turing Machine, and you might start to understand how transistors can be used to build computers.

Imagine a Turing Machine where we are only using two cells on the tape. The program might be as follows:

State Symbol Write Move Next State
A 1 None Right B
  0 None Right C
B 0 0 Left Halt
  1 0 Left Halt
C 0 1 Left Halt
  1 1 Left Halt

If the first cell is a 0 (the button is off), the machine would write a 1 in the adjacent cell (turn the LED on). If the first cell is a 1 (the button is on), the machine would write a 0 in the adjacent cell. (turn the LED off).

This is only with a single transistor, but with more transistors you can create some incredibly complex instructions. The binary addition Turing machine you looked at earlier can be created with a handful of transistors. The question is, how many transistors does it take to build a modern computer?

You can still get regular-sized transistors today that can be a few millimetres to a few centimetres in size. However, modern technology has enabled us to shrink the size of a transistor down to microscopic sizes.

This is an additional video, hosted on YouTube.

Modern day computers have transistors that are at the 7nm scale. That’s 7 billionths of a metre! You could arrange nearly 15000 of these transistors along the width of a human hair.

In 1971, the smallest transistor size was about 10 micrometres, and they’ve been on the decrease ever since. This was predicted by Gordon Moore, a co-founder of Intel. He predicted that the number of transistors we could fit on a processor would double every 18 months or so.

Moore's Law Transistor Count 1971-2016

This massive increase in the processing power of modern day computer chips, has led to the current technological revolution, which sees so many of us carrying around computers in our pockets, computers being embedded into the most mundane of everyday objects, and supercomputers that can beat humans at incredibly complex games such as Go.

Share this article:

This article is from the free online course:

How Computers Work: Demystifying Computation

Raspberry Pi Foundation