The machine cycle is the most basic operation that a computer
performs, and in order to complete menial tasks such as showing a
single character on the screen, the CPU has to perform multiple
cycles. The computer does this from the moment it boots up until it
shuts down.
The steps of a machine cycle are:
- Fetch – The control unit requests instructions from the main
memory that is stored at a memory’s location as indicated by the
program counter (also known as the instruction counter).
- Decode – Received instructions are decoded in the instruction
register. This involves breaking the operand field into its
components based on the instruction’s operation code (opcode).
- Execute – This involves the instruction’s opcode as it
specifies the CPU operation required. The program counter indicates
the instruction sequence for computer. These instructions are
arranged into the instructions register and as each are executed,
it increments the program counter so that the next instruction is
stored in memory. Appropriate circuitry is then activated to
perform the requested task. As soon as instructions have been
executed, it restarts the machine cycle that begins the fetch
step.