CPU Organization / Main Memory
CPU Organization / Main Memory
Components of CPU
Control Unit:
Manages and coordinates the operations of all
components of the computer.
Reads instructions, interprets them and generates signals
for appropriate actions.
During the processing of a job, data may move back and forth
several times between primary storage (for intermediate
results and other data) and ALU before processing of the job is
over.
Almost all ALUs are designed to perform four basic arithmetic
operations (add, subtract, multiply, and divide) and logical
operations such as less than, greater than and equal to.
Storage unit
Program
and data
Input
Data
Primary
Storage
Output
Data
Result
Secondary
Storage
Control
Unit
ALU
Central processing unit
Data Flow
CPU Control
CPU Registers
As a CPU interprets and executes instructions, there is a
movement of information between various units of the
computer.
To handle this process, and to speed up the information
transfer rate, the CPU uses some special memory units, called
registers.
Registers hold information on a temporary basis and are part
of CPU (not the main memory).
The length of a register is the number of bits it can store.
Length of a register is sometimes also called its word-size.
Most CPUs these days have 32-bit or 64-bit registers.
Memory
A computers CPU has necessary circuitry for data processing
and controlling other components of the computer.
But is does not have place to store programs and data needed
during data processing.
CPU has several registers for storing data and instructions, but
they can store only a few bytes at a time, sufficient only to
hold one or two instructions.
If the data is stored in the secondary storage, CPU will be idle
most of the time, as there is a great mismatch between the
CPU speed and the rate of transfer of data from the disk to
the computer.
Therefore, every computer has a memory storage, called
primary storage or main memory which reduces this
mismatch significantly.
N-1
bits
System Bus
A computer stores in the memory the data and instructions of a
program in execution, and fetches and loads them into CPU
registers as the program execution proceeds.
Thus CPU and memory interact frequently. This interaction is
facilitated by a bus.
A bus is a communication pathway connecting two or more
devices of a computer.
Multiple devices connect to the bus, and a signal transmitted by
any device is available for reception by all other devices attached
to the bus.
Only one device at a time can successfully transmit a signal.
The control lines are used to control use of the data and
address lines. The control lines together are called the control
bus. The control bus carries the signals to read or write the
data to a specified address location.
Thus in a memory access by the CPU, control bus carries
memory access command, address bus carries memory
address, and data bus carries the data.
Data Bus
CPU
Address Bus
Main
Memory
Control Bus
Instruction Decoder
IR
Internal Bus
MEMORY
PC
Address
Lines
MAR
MDR
Data
Lines
R0
R(n-1)
Y
ALU
Control
Lines
Add
Sub
B
ALU
Z