1 Computer hardware
Most computers are organized as shown in Figure 1.1. A computer contains
several major subsystems --- such as the Central Processing Unit (CPU), memory,
and peripheral device controllers. These components all plug into a "Bus". The
bus is essentially a communications highway; all the other components work
together by transferring data over the bus.
Schematic diagram of major parts of a simple computer.
The active part of the computer, the part that does calculations and controls all
the other parts is the "Central Processing Unit" (CPU). The Central Processing
Unit (CPU) contains electronic clocks that control the timing of all operations;
electronic circuits that carry out arithmetic operations like addition and
multiplication; circuits that identify and execute the instructions that make up a
program; and circuits that fetch the data from memory.
Instructions and data are stored in main memory. The CPU fetches them as
Peripheral device controllers look after input devices, like keyboards and mice,
output devices, like printers and graphics displays, and storage devices like disks.
The CPU and peripheral controllers work together to transfer information between
the computer and its users. Sometimes, the CPU will arrange for data be taken
from an input device, transfer through the controller, move over the bus and get
loaded directly into the CPU. Data being output follows the same route in reverse
– moving from the CPU, over the bus, through a controller and out to a device. In
other cases, the CPU may get a device controller to move data directly into, or out
of, main memory.
CPU AND INSTRUCTIONS
The CPU of a modern small computer is physically implemented as single silicon
"chip". This chip will have engraved on it the million or more transistors and the
interconnecting wiring that define