Chapter 2 · Bits, transistors and logic, from 1947 to today
The computer and the chip
Two symbols are enough
A bit is the smallest piece of information: 0 or 1, off or on, low or high voltage. Eight bits make a byte, which can hold 256 different patterns. Binary counts like we do, only with two digits instead of ten. The pattern 1011 means 1 × 8 + 0 × 4 + 1 × 2 + 1 × 1 = 11. Letters, colours and sounds are just agreed patterns: the capital letter A is 01000001, which is 65. In the animation a row of cells glows as bits. Flip one and the number it spells changes at once.
A switch made of silicon
In December 1947 at Bell Labs in New Jersey, John Bardeen and Walter Brattain, in a group led by William Shockley, made the first transistor. The three shared the Nobel Prize in Physics in 1956. A transistor is a switch with no moving parts: a small voltage on one terminal lets current flow between the other two, or blocks it. It replaced vacuum tubes, which were as big as a thumb, hot and fragile. The first transistor was handmade and about a centimetre across. Today a single chip carries tens of billions of them.
Gates are tiny rules
Wire a few transistors together and you get a logic gate. NOT flips its input, so 0 becomes 1. AND answers 1 only when both inputs are 1. OR answers 1 when at least one input is 1. Nothing else is needed: every logical rule in a computer can be built from these three. In the animation the gates are little blocks with lights on their wires, and the signals flow from left to right. In the sandbox you set the input bits yourself and follow the result.
How 1 + 1 is added
Add two single bits. 0 + 0 = 0, 0 + 1 = 1, and 1 + 1 = 10 in binary, which is a sum bit 0 and a carry bit 1. The carry is simply a AND b. The sum is 'one or the other but not both': (a OR b) AND NOT (a AND b). A few gates, and you have a half adder. Chain several, each handing its carry to the next, and numbers of any length can be added. Multiplication is repeated adding. Try all four input pairs in the sandbox and read the sum and carry.
Billions of switches
A CPU, the central processing unit, is gates arranged to fetch an instruction, decode it and carry it out, again and again. The first single-chip microprocessor, in 1971, had 2,300 transistors and ticked at 740 kHz. A modern processor holds more than 10 billion transistors, the largest AI chips around 100 billion, and ticks at 3 to 5 GHz. At 3 GHz one tick lasts 1 / 3,000,000,000 s, about 0.33 nanoseconds. In that time light travels only 10 centimetres, which is one reason chips must be small.
Memory and storage
The CPU wants its data close by. RAM is the working memory: very fast, but it forgets everything when the power goes off. Storage, such as flash chips in a phone or an SSD, keeps data without power by trapping tiny electric charges. A byte is 8 bits, so a 256 GB phone holds about 256 × 8 = 2,048 billion bits, roughly 2 trillion. The rule of thumb: the closer to the CPU, the faster and smaller the memory. Every app you open is this same dance of bits, repeated on a gigantic scale.
In numbers
- 1947
- Bell Labs builds the first transistor
- > 10 billion
- transistors in a modern processor
- 0.33 ns
- the length of one tick of a 3 GHz processor