2.1.4 - Explain the machine instruction cycle. Flashcards
What is the machine instruction cycle?
The machine instruction cycle refers to the fetch, decode, execute cycle where the ALU carries out calculations and logical decisions required by the program instructions that the CPU is processing.
What are registers in the context of the CPU?
Registers are small, very fast circuits that store intermediate values from calculations or instructions inside the CPU.
What is the function of the Memory Address Register (MAR)?
The MAR contains the RAM address of the instruction the CPU wants next, is connected to the address bus, and contains a memory address to be used by the ALU.
What is the function of the Memory Data Register (MDR)?
The MDR is connected to the data bus and holds data that will be written to or read from RAM.
What is the relationship between the MAR and MDR?
The MAR gives the address from which the data in the MDR will be read or to which it will be written.
What are the six stages of the machine instruction cycle?
The six stages are: 1) Process starts at the PC, 2) PC sends the next address to the MAR, 3) MAR sends address to RAM and stores the result in the MDR, 4) MDR sends data to the CIR for decoding, 5) CIR passes decoded instructions to the ALU, 6) ALU gives an address to MAR if further instructions are needed.
What are buses in the context of the CPU?
Buses are connecting wires that connect the CPU to other devices, carrying instructions to/from components. They are built into the motherboard.
What are the three most important buses and their functions?
The three most important buses are: data bus (links RAM to CPU via MDR), control bus (links RAM to CPU via CU), and memory bus (links RAM to CPU via MAR).