Britannica
Sources used in this answer
How does data processing move data through a computerās CPU and memory?
Created from Britannica articles
using AI.
AI can make mistakes, so verify using Britannica articles.
In a stored-program computer, data and instructions are held in main memory as bit patterns. The central processing unit (CPU) moves and processes this information through a continuous "fetch-decode-execute" cycle, regulated by a high-frequency clock.1
The Processing Cycle
- Fetch: The CPU uses a program counter to identify the memory address of the next instruction, which is then retrieved from memory and stored in a register.1
- Decode: The CPU interprets the instruction to determine the required operation and the location of the necessary data (operands), which may reside in registers or memory.1
- Execute: The arithmetic-logic unit (ALU) performs the operation. Results are stored back in registers or memory, and the program counter is updated to point to the next instruction.1
Memory Hierarchy and Speed
Because main memory (RAM) is slower than the CPU, computers use cache memoryāa small, high-speed static RAM (SRAM) located on the CPU chipāto store frequently accessed data and instructions, reducing latency. Modern CPUs further optimize this movement using instruction-level parallelism, such as pipelines, which allow multiple instructions to be processed simultaneously at different stages of the cycle.123