- A computer consists of three main elements:
- Memory (storage
for data and
program
instructions)
- fetches instructions and data from memory
- stores results back in memory
- I/O devices (allows
user to input data and instructions, and
output data)
These three are connected by buses - collections of wire over which
data flows (look at actual inside buses of a computer)
The Von Neumann
architecture. Directed lines represent
buses and the
flow of information between the computer components.
2. CPU - The "Brains" of a Computer
- Tasks of a CPU:
- fetches instructions and data from memory
- executes instructions
- stores results back in memory
- CPU subunits
- Arithmetic
Logic Unit (ALU): circuitry that performs operations
such as addition
- Registers: fast memory units built into the
CPU
- Control
Unit: circuitry that fetches data and instructions from
main memory as
well as controlling the flow of data between ALU and registers
(overhead - Reed, Fig. 14.1)
- CPU datapath
- Path that data follows within CPU along the buses from
registers to the ALU and back
- A single rotation around the CPU datapath is called the CPU
datapath cycle
- To better understand how a CPU works, we have used a simple model
of a CPU in the lab -- one with 4 registers and an
ALU (with operations for addition, subtraction, bitwise-AND, and
bitwise-OR). This simplfied CPU does not have a Control
Unit. Instead, we act as the control unit, selecting the input
registers, ALU function, and
output register by clicking on the appropriate knobs.