9618 · 4.1
Central Processing Unit (CPU) Architecture
The CPU is the 'brain' of the computer, constantly running a simple, three-step dance to process instructions. It fetches an instruction from memory, decodes it to understand what to do, and then executes it.
Need to know
What you need to know
- Instructions and data are stored in the same memory unit.
- Instructions and data use the same bus to travel between the memory and the CPU.
- Instructions are fetched and executed sequentially, one after another.
- This design allows a program to be treated as data, meaning it can be read, modified, and written just like any other data.
Explanation
The CPU's Grand Plan
- First, the CPU 'fetches' the next instruction from main memory, using a special pointer called the Program Counter to know where to look.
- Next, the Control Unit 'decodes' the instruction, breaking it down to understand the operation required and what data is needed.
- Then, the CPU 'executes' the command. This could be a calculation by the Arithmetic Logic Unit or moving data between memory and registers.
- Finally, the result is stored, and the Program Counter is updated to point to the next instruction, starting the cycle all over again.