FIGURE 1.1: A Colossus Mark 2 computer. Artwork created by United Kingdom Gov-
FIGURE 1.2: An Intel 80486DX2 CPU from above. Photographed by Andrew Dunn. The
picture is licensed under the Creative Commons Attribution-Share Alike 2.0 Generic license.
and multiplication. The speed of a CPU is measured in hertz , which is a measure of frequency
in cycles per second. In one cycle, the CPU can perform one instruction. Typical CPU
speeds of modern computers are around 2 GHz, which corresponds to 2 gigahertz, or 2
billion instructions per second. The actual data on which the operations are performed is
stored in main memory; see Figure 1.3. The main memory is where both the programs and
the data are stored.
The main memory contains both the application data and the commands that manip-
ulate the data. The commands from the main memory are loaded on the CPU. The CPU
then reads data from main memory, performs the operation that is requested, and saves the
result back into main memory. Therefore, all a computer can do is to move data from one
spot to another in main memory and perform arithmetic computations.
The main memory of a computer consists of a sequence of cells, where every cell can
take one of two states: 0 or 1. The different values are usually represented by different
voltage. For example, 0.8 volts or below may denote 0, while 2.2 volts or above can denote
the number 1. In computer science, this single cell is referred to as a bit . Table 1.1 shows
common units for measuring the size of memory (i.e., number of bits).
In modern computers, the main memory of a computer is typically between 1 and 16
GBs, while the hard disk can typically store anywhere between 256 GB and 1 TB. Moore's
law is the observation that over the history of computing hardware, the number of transistors