Please enable JavaScript.
Coggle requires JavaScript to display documents.
Computer Components: Processor Components (Dedicated Registers (Program…
Computer Components: Processor Components
Central Processing Unit (CPU)
The
processor
(CPU) has a number of different components, each with their own role to perform:
-
Control Unit
-
Buses
-
Arithmetic-Logic Unit (ALU)
-
Dedicated registers
Control 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.
What is a 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.
Data bus:
Typically consisting of 8, 16, 32 or 64 separate lines.
Provides bidirectional path for moving data and instructions between the system components.
Address bus:
Each word in memory has its own specific address.
The address bus transmits the memory addresses of words that are used as operands in program instructions, so that the data can be retrieved and sent back to the processor.
When an instruction has been performed and the result is to be stored at a particular memory location, it is transmitted via the data bus
Word
Memory is divided up internally into units called words.
A word is a fixed size group of digits, typically 16, 32 or 64 bits, which is handled as a unit by the processor, and different types of processor have different word sizes.
Control Bus
A bidirectional bus.
The purpose of the control bus is to transmit command, timing and specific status information between system components.
Control signals include
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, logic and shift operations on data.
-
Arithmetic operations: Add, Subtract, Multiply and Divide
-
Logical operations: AND, OR, NOT, XOR
-
Shift operations: Move bits to the left or right within a register
Accumulator
Results from the ALU need to be stored somewhere
-
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.
-
The processor is the able to immediately access and re-use these results in subsequent calculations, e.g. Add 2+3+4
-
For simplicity we will assume the processor has a single general purpose register called an accumulator.
Executing Instructions
The role of the processor is to carry out instructions from programs stored in memory.
Dedicated Registers
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 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
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: Steps 1-4
The address of the next instruction is copied from the PC to the Memory Address Register (MAR).
The instruction held at that address is copied to the Memory Data Register (MDR).
Simultaneously, the contents of the Program Counter (PC) are incremented.
The contents of the MDR are copied to the Current Instruction Register (CIR).
Note: Blue lines show connections along which data is travelling in this stage
Decode: Steps 5-7
The instruction held in the CIR is decoded
It is split into operand and opcode to determine the type of instruction it is. Additional data, if required, is fetched from memory…
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
With the instruction now in the CIR, the Control Unit can work out what needs to be done to carry it out
Execute:
The instruction is executed and the result held in the accumulator or stored in memory