Skip to main content

Computer functions and cycles

Short answer

The instruction cycle consists of fetch (read instruction), decode, indirect (if needed), execute (perform operation), and interrupt (check and service). After execution, if an interrupt is pending and enabled, the CPU saves its state, executes the service routine, and resumes.

Explain the computer functions with different cycles.

A computer performs four basic functions: data processing, data storage, data movement and control. It carries them out by executing programs, and program execution is organised into cycles.

  • Fetch cycle: the CPU reads the instruction from the memory location given by the PC into the IR, and the PC is incremented.
  • Decode: the control unit finds the operation and the operands.
  • Indirect cycle: if the instruction uses indirect addressing, the effective address is read from memory.
  • Execute cycle: the operation is performed: a data transfer between the CPU and memory or I/O, an arithmetic or logic operation in the ALU, or a change in control flow (jump).
  • Interrupt cycle: after execution, the CPU checks for interrupts; if one is pending, it saves the PC and loads the address of the interrupt service routine.

Instruction cycle = fetch + (indirect) + execute + (interrupt). The cycle repeats until the program halts.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 1 questions →