System Architecture - Components of the CPU & The Fetch Decode Execute Cycle Flashcards
What is the Purpose of the Processor?
- The processor is “the brains of a Computer System”
- It Processes Data
- It retrieves Data/Instructions from Main Memory (Fetch)
- Carries out instructions (Executes Them)
- Stores Data into Main Memory once Executed
Summarise the Fetch-Execute-Decode cycle.
- The processor checks the Program Counter (PC) to see what instruction to run
- An instruction is fetched from memory
- The instruction is transferred to the MDR
- The instruction is then decoded in the Control Unit
- The decoded instruction is then executed in the ALU
- The program counter is incremented
- The cycle is repeated
In detail, what happens during the ‘Fetch’ part of the Fetch-Execute-Decode cycle?
- The Program counter is incremented by 1
- The contents of the Program Counter are put into the MAR (Memory Address Register)
- The address stored in the Memory Address Register is transferred along the Address Bus to Main Memory
- The instruction / data stored in this memory location is transferred back to the processor along the data bus
- The instruction or data is copied to the MDR (Memory Data Register)
In detail, what happens during the ‘execute-decode’ part of the Fetch-Execute-Decode cycle?
- The instruction in the Memory Data Register (MDR) is decoded by the Control Unit (CU)
- CU to be decoded is stored in the Current Instruction Register (CIR)
- The Program Counter (PC) is incremented by 1
- The instruction the the CIR is decoded by the
- The calculation instruction are carried out by the ALU (Arithmetic Logic Unit)
- Results of calculations are placed into the Accumulator
What is the function of the Control Unit?
- The Control Unit (CU) Decodes instructions
- It sends out signals to control the flow of data inside the CPU
- It sends out signals to control the flow of data outside the CPU (main memory / input devices / output devices)
What is the function of the Arithmetic Logic Unit (ALU)?
The ALU performs all the arithmetic calculations (e.g. addition, multiplication, division) and logical comparisons (e.g. greater than, equal to, AND, OR, NOT)
What is the function of the Accumulator?
The Accumulator holds the results of any arithmetic or logical calculations performed by the ALU
What is the function of the Program Counter (PC)?
The Program Counter stores the location of the next instruction/data address to be executed
What is the function of the MAR (Memory Address Register)?
The MAR holds the memory address of the data or instruction that the CPU is about to use
What is the function of the MDR (Memory Data Register) ?
The MDR Stores the data that has been fetched from the main memory, or data that is waiting to be transferred to the main memory
What is the function of the CIR (Current Instruction Register)?
- The CIR stores the most recent instruction that has been fetched from memory.
- The instruction is stored in the CIR while it is waiting to be executed
What is transferred down the data bus?
Data and Instructions
What carries the next instruction that will be fetched?
Address Bus
What component of the CPU sends signals such as “I/O Read”
Control Unit
What component of the CPU would perform an operation such as 5+8?
Arithmetic Logic Unit