This book follows the rules of logic that digital computers rely on, and the first transistor. It is a simplified picture, because a real computer has more parts. A computer is built from a few main parts, including a CPU and memory. A program is a list of instructions for a computer, and the processor in a computer follows the ones that a programmer writes. A computer's processor has two parts: the arithmetic-logic unit, a simple calculator, and the control unit that follows the program's instructions. The CPU of a computer can also add two numbers, and the parts of a computer are connected by a set of wires called the bus. The computer does not do anything automatically: some program code always tells it how.
A machine code instruction is extremely simple, such as adding two numbers or testing whether a number is zero. Programming languages work by translation to machine code, and no single machine code instruction prints. Only machine code can actually run on the CPU, so source code written in a programming language must be translated first. A compiler can translate a program's source code into machine code ahead of time. A CPU's machine code is hardwired into its design, and each family of CPUs has its own machine code. Loops and if-statements run because some of them jump back to an earlier point or skip the next instruction. In the fetch/execute cycle, the processor fetches an instruction from memory, decodes it to learn what to do, executes it, and repeats. Instructions can be stored as numbers too, an idea that led von Neumann and his collaborators to a general purpose, reprogrammable computer.
RAM is fast memory that holds the programs and files a computer is using right now, and it loses what it holds when the power is turned off. When a computer first powers up, the hardware runs a tiny boot loader program that lets an operating system start. The operating system is a supervisory program that starts first when the computer boots up. To launch a program, the operating system gives it an area of RAM, loads its first machine code there, and tells the CPU to start running it. The operating system gives each program its own area of memory, so that each program only reaches its own resources. One CPU can seem to run many programs at once by running a few instructions from each in turn, called round robin. That is how one small chip can look after so many jobs, and keep each of them apart from the rest.
A bit is the smallest piece of computer storage, and it holds a 0 or a 1. Binary is a number system that uses only two digits, 0 and 1. A byte is a group of 8 bits, and one byte can store one letter or other character, such as A or x. Each extra bit doubles the number of different patterns that bits can make, and a byte, which is 8 bits, can make 256 different patterns. Inside a computer, things such as pictures are stored with only 0s and 1s. A picture on a computer screen is made of many tiny squares called pixels. In the RGB scheme, each of red, green and blue light is a number from 0 (off) to 255 (brightest). These are the small parts that every picture, sound and program on a computer is built from, and they are all just ones and zeros.
Then comes the logic behind those ones and zeros, and where it came from. All digital computers rely on binary ones and zeros and on rules of logic set out by the English mathematician George Boole in the 1850s. Boole argued that just three operations, AND, OR and NOT, can perform all logic functions. His logic had no practical use for decades until Claude Shannon applied it to telephone switch design in the 1930s. Computers are digital, but must convert continuously varying analog signals such as sound, light and heat into ones and zeros to process them. On computer networks, bits are communicated by light, voltages or sound. A bit can be held mechanically by wheel or lever positions, or electronically by voltage or current.
In 1947, John Bardeen and Walter Brattain built the first semiconductor amplifier, and it was named the transistor. The first transistor was a sliver of germanium with two closely spaced gold contacts, and they were held in place by a plastic wedge. A small change in the current through one contact caused a larger change in the current at the other contact, so it amplified signals. The first transistor amplified its input signal up to 100 times. The 1956 Nobel Prize in Physics went to Shockley, Bardeen and Brattain for their research on semiconductors and for their discovery of the transistor effect. A transistor is a solid state switch with no moving parts, and it is turned on and off by an electric signal. So that first small switch, built in 1947, is where the story of the transistor begins.
A semiconductor is a material between a conductor and an insulator, and most semiconductor components are made of silicon. By 1960, most transistors were made of silicon, which could work at temperatures up to 150 degrees Celsius. Silicon makes up 28% of the Earth's crust by weight, and it is the second most abundant element after oxygen. Transistors can work as switches in computers. Microscopic transistors are etched onto a fingernail-sized piece of silicon to make a chip, and one computer chip can hold billions of them. Moore's law is a prediction that the number of parts on a chip doubles again and again, about every year and a half to two years. So the ones and zeros of Boole's logic now live in billions of tiny switches on a sliver of silicon.
Words to know
- Boole: English mathematician
- semiconductor: in-between material
- transistor: solid state switch
- analog: continuously varying