Please enable JavaScript.
Coggle requires JavaScript to display documents.
1.1 Computer components T1 Processor components (Fetch-Execute Cycle…
1.1
Computer components T1 Processor components
Central Processing Unit
The processor (also called the Central Processing Unit or CPU) has a number of different components, each with their own role to perform:
CONTROL UNIT
BUSES
ARITHMETIC-LOGIC UNIT (ALU)
DEDICATED REGISTERS
Contol Unit
The part of the processor that coordinates the activity of all other components
•Control signals are sent along the control bus between the control unit and the other components of the computer
Bus
Buses in a computer consist of a series of connectors that transfer signals between internal components
They typically consist of 8, 16, 32 or 64 lines
System Bus
The system bus consists of three separate buses carrying control signals, addresses and data
Control Signals
Memory read:
causes data from the addressed location in RAM to be placed on the data bus
Memory write:
causes data on the data bus to be written into the addressed location in RAM
Bus request:
indicates that a device is requesting use of the data bus
Bus grant:
indicates that the CPU has granted access to the data bus
Clock:
used to synchronise operations
Arithmetic-Logic Unit (ALU)
The problem solving part of the processor
This component performs
arithmetic, logical and shift operations
on data
Arithmetic operations:
Add, Subtract, Multiply and Divide
Logical operations include:
AND, OR, NOT, XOR
Shift operations:
Move bits to the left or right within a register
Accumulator
For simplicity we will assume the processor has a single general purpose register called an
accumulator
The processor is then able to immediately access and re-use these results in subsequent calculations, e.g. Add 2 + 3 + 4
Rather than writing working data back to ‘slow’ memory, processors have several locations of super-fast memory called
registers
that are used to temporarily store results
Results from the ALU need to be stored somewhere
Dedicated Registers
Dedicated registers used by the processor include:
Program counter (PC)
– holds the memory address of the next instruction to be executed
Current Instruction Register (CIR)
– holds the current instruction, which is split into opcode and operand
Memory Address Register (MAR)
- holds the address in memory where the processor is required to fetch or store data from or to
Memory Data Register (MDR)
– temporarily holds data moving between the processor and main memory
Accumulator
– to hold intermediate results of an instruction
Executing Instructions
Carrying out a sequence of programming instructions requires many different pieces of information to be held
The processor has to temporarily hold the
current instruction
being executed
It has to hold the
address of the data
that it needs, and also
the data itself
It has to keep track of the
address of the next instruction
to be executed
Fetch-Execute Cycle
Processors operate in defined stages that are used to carry out program instructions
The process is repeated over and over again for each instruction in a program
FETCH - DECODE - EXECUTE (REPEAT)
Fetch: Steps 1 - 4
1)
The address of the next instruction is copied from the PC to the Memory Address Register (MAR)
5)
The instruction held in the CIR is decoded
6)
It is split into operand and opcode to determine the type of instruction it is. Additional data, if required, is fetched from memory…
7)
and passed to the accumulator
The opcode specifies the operation that is to be carried out
The operand holds either:
The address of the data to be used, which is then copied to the MAR, or
The actual data to be operated on, which is passed to the MDR
2)
The instruction held at that address is copied to the Memory Data Register (MDR)
3)
Simultaneously, the contents of the Program Counter (PC) are incremented
4)
The contents of the MDR are copied to the current Instruction Register (CIR)