Attic › Computer science › Execution (computing)

Execution is the process where a computer performs the instructions of a program

In computing, execution is the process where a computer reads and performs the instructions of a computer program. A program on a storage drive is only a passive list of rules. Execution changes these static instructions into active operations that change the state of the machine.

Before a computer can execute a program, the operating system must copy the program's instructions from slow storage into fast working memory. At this point, the passive file becomes an active process. The computer sets up a counter that points to the memory address of the first instruction.

The central processor then performs a continuous loop called the instruction cycle. The processor's control unit directs this cycle in three steps:

1. Fetch: The processor reads the next instruction from the memory address shown by the counter, and then increases the counter so it points to the next instruction in the list.

2. Decode: The control unit translates the binary numbers of the instruction into electrical control signals for the processor's internal circuits.

3. Execute: The circuits perform the specified action. For example, they add two numbers together, copy data from one memory location to another, or change the counter to jump to a different part of the program.

Each instruction has a strict meaning, known as its semantics, which defines exactly how that step changes the computer's memory or hardware. The processor repeats the instruction cycle billions of times each second until it reaches an instruction that stops the program.

Fact-checked against Execution (computing) on Wikipedia

Part of the Computer science syllabus: Stored-Program Computers and Architecture

See it on the timeline of Stored-Program Computers and Architecture