Nepedia
Back to Discover
Fluent Reader
💻

Execution (computing)

technology Maturity 7-9 Next article →

Execution is the way a computer program performs its tasks. You might also call this "running" a program. When a program starts, it is often called launching or invoking. This process turns written code into real actions on a device.

Fetch-Decode-Execute Cycle
Fetch-Decode-Execute Cycle

Computers need to follow instructions to make things happen. This is how they turn data into useful results for people.

Most computers follow a specific way of working. This is called the fetch-decode-execute cycle. First, the control unit performs the fetch stage to get an instruction. Next, the decode stage helps the computer understand that instruction. Finally, the execute stage carries out the action.

Fetch-Decode-Execute Cycle
Fetch-Decode-Execute Cycle

Modern CPUs often use an instruction pipeline to work faster. This means they start the next step before the first one is even finished.

Sometimes, a program runs into a problem while it is working. These are known as runtime errors. You might see these errors as a message on your screen. People often call these mistakes "software bugs."

Fetch-Decode-Execute Cycle
Fetch-Decode-Execute Cycle

Some errors happen because of math mistakes, like dividing by zero. Other errors happen if a program tries to use a piece of memory it does not own. Programming languages use exception handling to catch these unexpected situations.

Computers also use special environments to manage how programs run. A runtime environment provides services that help a program work. This can include managing memory or helping the program talk to the operating system.

Fetch-Decode-Execute Cycle
Fetch-Decode-Execute Cycle

Some programs use a virtual machine to run. A virtual machine is software that acts like a real computer. This allows a program to run on many different types of hardware. Some virtual machines use a hypervisor to manage many separate environments at once.

Think of execution like following a recipe in a kitchen. The recipe is the program, and the chef is the processor. The chef must read the step, understand it, and then cook.

Fetch-Decode-Execute Cycle
Fetch-Decode-Execute Cycle

If the recipe says to add salt but you have none, that is like a runtime error. A computer can also use an interpreter to read instructions directly. This is similar to a translator reading a book aloud as you listen. Both ways help the computer finish its hard job.

363 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Fetch-Decode-Execute Cycle.png
Fetch-Decode-Execute Cycle.png
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.