Fetch
- The program counter (PC) passes the address of the current instruction to the memory address register (MAR)
- It then increments to hold the address of the next instruction to be executed
- The address (in MAR) is then sent along the memory bus to main memory, where it waits to receive a signal from the control bus
- To ensure that the data is stored in the correct memory address, the control unit sends a read signal along the control bus to main memory
- The control bus sends a grant signal to permit reading the address
- Then a read signal is sent
- The control bus sends a grant signal to permit reading the data at the address
- To ensure that the data is stored in the correct memory address, the control unit sends a read signal along the control bus to main memory
- The data is then sent along the data bus to the memory data register (MDR)
- The data will then be copied over to the current instruction register (CIR)
Decode
- Control unit (CU) decodes instruction content
- I.e., 0101 11 01
- Opcode:
0101= load - Addressing Mode:
11 - Operand:
101= pointer/data
Execute
May be done by either the CU or arithmetic logic unit (ALU).
- If needed, send the operand address to the MAR, send along, … repeats data read actions
- Data is now stored in MDR
- MDR is now coped into accumulator
Drive-Thru Analogy
Warning
This analogy was generated by AI.
1. Fetch (Getting the Order)
- PC (The Queue Number): Tells you which car is up next. As soon as you take car 1’s order, you increment your counter to car 2.
- MAR (The Menu Board): This points to the location of the food item.
- MDR (The Food Tray): The physical tray where the food sits while it is being moved from the kitchen to the customer.
- CIR (The Cash Register): The order is locked into the system here so you can read it.
2. Decode (Understanding the Order)
- CU (The Worker’s Brain): You look at the order screen. You split it up:
- Opcode: The action (“Make a burger”).
- Operand: The target (“Add extra cheese”).
3. Execute (Making the Food)
- ALU (The Kitchen Grill): You actually cook the burger.
- Accumulator (The Bag): Where the finished meal is stored temporarily before handing it over.