What is the purpose of the Control Unit (CU)?
The CU coordinates when/where each component should function. By sending signals along the Control Bus, it ensures smooth and accurate execution of programs.
(Coordinates and communicates with all parts of the CPU.)
How does the Control Unit (CU) use the Control Bus for Read/Write Requests?
What does it do during the FDE Cycle?
(It’s also connected to every part of the CPU, maintaining smooth flow.)
How does the Control Unit (CU) use the Control Bus for Bus Requests and Grants?
This helps prevent conflicts, ensuring only one component is accessing a bus at a time.
How does the Control Unit (CU) use the Control Bus for Interrupt Handling?
How does the Control Unit (CU) use the Control Bus for coordinating Timing and Sequencing?
What is the purpose of the Program Counter (PC)?
The Program Counter is a register that holds the address of the next instruction to be processed by the CPU.
(By holding the address, it metaphorically ‘points’ to the instruction.)
What is the function of the Program Counter (PC)?
What does it do during the FDE Cycle?
An address held in the PC could be one in a series of addresses.
However, if the current instruction was one commanded to jump or branch, the PC would be updated to hold the address of the target jump/branch, simultaneously affecting the sequence of addresses the PC would normally queue/increment.
The PC also has a close relationship with the MAR, and at the start of every FDE cycle, the CU copies it’s held address into the MAR.
What is the purpose of the Memory Address Register (MAR)?
The MAR holds the addresses of:
- Instructions to be fetched
- Locations where data is to be written to/read from.
These addresses are sent to the main memory for location and retrieval along the Address Bus.
What is the function of the Memory Address Register (MAR)?
What does it do during the FDE Cycle?
It sends the held address along the Address Bus to the main memory, which either locates and retrieves data/instructions from memory, or writes data to the memory location.
If retrieving, the data is sent along the Data Bus to the MDR or IR (Depending on the CPU Architecture).
What is the purpose of the Memory Data Register (MDR)?
Temporarily stores data that was either:
- Sent from the CIR to then send along the Data Bus to memory for writing to a location (a Write operation)
- Recieved data that the main memory sent it along the Data Bus after retrieval. (a Read operation)
It ensures that the correct data is fetched or written from/to memory.
(Acts as an intermediary between the CIR and the Data Bus.)
What is the function of the Memory Data Register (MDR)?
What does it do during the FDE Cycle?
If the CPU needs to write data to a location in memory, General-Purpose Registers load the data into the MDR, simultaneously loading the desired address into the MAR. After sending along their respective busses to Main Memory, the data is written to the address.
If the CPU needs to read data from a location in memory, a GPR will load the address into the MAR, which is then sent along the Address Bus, located and retrieved by Main Memory, and the data sent back to the MDR along the Data Bus.
(All data to and from memory must pass along the Data Bus to the MDR.)
What is the purpose of the Current Instruction Register (CIR)?
Acts as a temporary storage location for the current instruction that is being decoded and executed.
What is the function of the Current Instruction Register (CIR)?
What does it do during the FDE Cycle?
The CIR temporarily holds the instruction copied from the MDR. The CU decodes this instruction into an opcode and operands, then delegates tasks to appropriate registers or components for execution.
After the instruction is processed, the CIR is updated with the next instruction.
(Despite recieving instructions from the MDR, CIR does not read/write.)
What are Instructions, and what do they consist of?
Instructions are commands that tell the CPU what operation to perform. They are made up of 2 components:
- Opcode (Operation Code): Specifies the operation to be performed; like Addition, Subtraction, Data Movement, etc.
- Operand(s): Specifies the data/memory locations the operation will act upon; They can be:
– Immediate Values (Constants directly specified in the Instruction.)
– Memory Addresses (Location in memory where data is stored.)
– Registers (Storage locations within the CPU where data can be held.)
What is the purpose of the Arithmetic Logic Unit (ALU)?
To perform all the fundamental mathematical and logical operations required by a computer to process data and execute instructions.
What is the function of the Arithmetic Logic Unit (ALU)?
What does it do during the FDE Cycle?
The ALU performs Arithmetic (+, -, /, x etc) and Logical (AND, NOT, XOR, etc) Operations. It also handles bitwise operations and data manipulation within the CPU.
It often uses General-Purpose Registers (GPRs) such as the Accumulator to temporarily store intermediate results. These results are accumulated before being stored in their final destination.
(Depending on the direction of shift, BSOs x or / by a power of 2.)
What is the purpose of the Accumulator (ACC)?
Used as temporary storage for intermediate Arithmetic and Logical Operations. It’s one of a number of special-purpose registers in the CPU. Stores results of computations and operands.
What is the function of the Accumulator (ACC)?
What does it do during the FDE Cycle?
What is the purpose of the Address Bus?
Carries addresses of memory that identify where data is being read or written from/to.
What is the function of the Address Bus?
What does it do during the FDE Cycle? (Read/Write Operations)
The Address Bus is Unidirectional.
What is the purpose of the Data Bus?
Carries the binary 1s and 0s that make up actual information being transmitted around the CPU/Computer. This includes moving data to & from main memory, I/O Devices, and various Registers.
The Data Bus is Bidirectional.
What is the purpose/function of the Control Bus?
What is it’s job/What does it do during the FDE Cycle?
The Control Bus transmits control signals that manage and coordinate the operations of the CPU, memory, and I/O devices. It ensures proper timing, synchronization, and communication for read/write operations, handles interrupts, and manages bus arbitration.