How a computer runs an instruction — Computing, 14–17 years
A program is not magic: the processor repeatedly fetches instructions, works on data and stores results. Seeing this cycle explains why memory, storage and the processor do different jobs.
The instruction cycle
A processor works in a rapid cycle. It fetches the next instruction from memory, decodes what that instruction means, performs the operation and stores the result. A simple addition may look tiny, but a game or app is built from billions of such small steps.
Why split the jobs?
Early computers were built to calculate, but they also needed a way to hold instructions and results. Keeping long-term files in storage and active work in fast memory makes the machine both useful and responsive. The processor can then concentrate on small operations instead of doing every job itself.
Adding two numbers
Imagine the instruction ADD 7, 5. First, the processor fetches ADD and the two values from memory. Next it decodes ADD as an addition, places 7 and 5 in fast working locations, calculates 12 and writes 12 back. A later instruction can read that result and use it.
Memory is not storage
It is reasonable to call every place that holds files “memory”, because all of them keep information. The important difference is that working memory is designed for data the processor needs now, while storage keeps files for later, even when power is off. More capacity does not automatically mean more speed.
Why this matters
This idea helps explain everyday choices. An app may open slowly because it must be read from storage, then run smoothly once its active data is in memory. A video editor needs both a fast processor for calculations and enough storage for large recordings; changing only one part may not solve the problem.
Keep exploring
Other languages
Loading MyLeoNes™…