Components of a Computer

The five classic components of a computer are briefly described below.
Each component is discussed in more detail in its own section.
The operation of the processor is best understood in terms of these
components.

Datapath -
manipulates the data coming through the processor.
It also provides a small amount of temporary data storage.

Control -
generates control signals that direct the operation of
memory and the datapath.

Memory -
holds instructions and most of the data for currently
executing programs.

Input -
external devices such as keyboards, mice, disks, and networks that
provide input to the processor.

Output -
external devices such as displays, printers, disks, and networks that
receive data from the processor.

Datapath

Control

Control generates control signals that direct the operation of memory
and the datapath.
The control signals do the following.

Tell memory to send or receive data.

Tell the ALU what operation to perform.

Route data between different parts of the datapath.

Memory holds instructions and most of the data for currently executing
programs.

The rest of the data is held in programmable registers, which can only
hold a limited amount of data.

Input is data coming into the processor from external input devices
such as keyboards, mice, disks, and networks.

In modern processors, this data is placed in memory before entering the
processor.
Input handling is largely under the control of operating system
software.

Output is data going from the processor to external output devices
such as displays, printers, disks, and networks.

In modern processors, this data is placed in memory before leaving the
processor.
Output handling is largely under the control of operating system
software.

The processor executes a sequence of instructions that are located in
memory.
Execution of each instruction involves at least the first three of
the following activities.
The last four activities are required for some, but not all,
instructions.
The activities are approximately in time order.
However, some of the activities can be overlapped in time.

Instruction fetch

Program counter (PC) update

Instruction decode

Source operand fetch

Arithmetic-logic unit (ALU) operation

Memory access

Register write

In these activities

The program counter (PC) hold the address of the next
instruction.

For a simple processor, the arithmetic-logic unit (ALU)
performs all arithmetic and logical operations.

The organization of the data path can be determined from these
activities.
Where an activity requires selecting among different options
depending on the instruction, there will be a multiplexer that
selects the appropriate option as directed by a control signal.