1 - Processor Components Flashcards
What does CPU do
executes instructions and processes data by following fetch-decode-execute cycle
3 functions of CU (Control Unit)
- Controls and coordinates the activities of CPU
- Directs the flow of data between the CPU and other devices
- Decodes instructions in FDE cycle
What is a bus
Set of parallel wires connecting two or more components of a computer
What is system bus made up of
address bus, data bus and control bus
What does system bus do
Connect CPU to main memory
Address bus
- sends memory address that processor needs to access from CPU to RAM
- Unidirectional: CPU -> RAM
control bus
sends control signals from the control unit to coordinate use of address and data bus, ensuring it doesn’t lead to conflict
- Bi-directional
Data bus
- Carries data and instructions between processor and memory
- Bi-directional
ALU
performs arithmetic (e.g add/subtract) and logical (e.g AND, OR, NOT) operations
Accumulator
a register that temporarily stores intermediate results from ALU until they’re written to memory
Registers
Registers are small, very fast memory cells within the processor that temporarily store data
PC
holds memory address of the next instruction to be executed
CIR
holds current instruction being executed, divided into operand and opcode
MAR
holds memory address of the instruction or data to be accessed
MDR
holds the instruction or data that has been accessed from memory
Fetch stage of FDE cycle
1) Memory address of next instruction is copied from PC to MAR via the address bus
2) Address in MAR is sent along address bus to RAM
3) Contents of the address (either a data or instruction) is sent along the data bus from RAM to MDR
4) Contents of MDR is copied into CIR
5) Address in PC is incremented to point to next instruction
Decode stage of FDE cycle
1) Instruction in CIR is sent to control unit
2) Control unit interprets the instruction and splits it into opcode and operand.
What is opcode
aka operation code – the command
What is operand
the address or the data for the opcode to use
What happens at end of each FDE cycle
Check for presenceof interrupts
What is opcode represented as in assembly language
a mnemonic such as ADD or SUB