registers + FE cycle

Cards (11)

  • Registers
    Small storage spaces for temporary data in the CPU
  • Registers
    • Each register has a specific role
  • Essential registers used in the Fetch-Execute cycle
    • Program Counter (PC)
    • Memory Address Register (MAR)
    • Memory Data Register (MDR)
    • Current Instruction Register (CIR)
    • Accumulator (ACC)
  • Program Counter (PC)

    A register that tracks the RAM address of the next instruction to be fetched
  • Memory Address Register (MAR)

    A register that tracks the RAM address of the instruction that is to be fetched
  • Memory Data Register (MDR)

    The MDR stores the instruction that has been transferred from RAM to the CPU
  • Current Instruction Register (CIR)
    A register that stores the instruction that has been fetched from RAM, and is about to be decoded or executed
  • Accumulator (ACC)

    The ACC stores the result of mathematical or logical calculations
  • Fetch-Execute Cycle
    1. Instructions are fetched from RAM, to be decoded (understood) and executed (processed) by the CPU
    2. The Program Counter (PC) register displays the address in RAM of the next instruction to be processed
    3. The PC register is increased by 1 to prepare the CPU for the next instruction to be fetched
    4. The CPU checks the address in RAM which matches the address held in the MAR
    5. The instruction in RAM is transferred to the Memory Data Register (MDR)
    6. The instruction in the MDR is copied into the Current Instruction Register (CIR)
    7. The instruction in the CIR is decoded (understood) and executed (processed), with any result stored in the Accumulator (ACC) register
    8. The cycle repeats by returning to the first step and checking the program counter for the address of the next instruction
  • The Fetch-Execute cycle is performed by the CPU millions of times every second
  • The Fetch-Execute cycle is how the CPU processes data and instructions for each program or service that requires its attention