Computer System: The CPU
Computer System: The CPU
The CPU (Central Processing Unit)
- The CPU is often called the ‘brain’ of a computer system as it carries out most processing.
- It performs two main tasks - executing program instructions and managing hardware resources.
- Every instruction that a CPU understands is given a unique instruction code.
- The speed at which the CPU processes data is called the clock speed, measured in gigahertz (GHz).
CPU Components
- The Control Unit controls and monitors the operations of the hardware.
- The Arithmetic Logic Unit (ALU) is where the actual computations take part, such as performing arithmetic and logical operations.
- Registers are small storage areas which hold data that is currently being processed.
CPU Cores
- A core is an independent unit within the CPU that can perform operations separately.
- A single CPU may contain multiple cores, enabling it to execute multiple instructions at the same time. This improves overall performance and speed.
- Processors with multiple cores are known as multi-core processors. They are faster and more efficient than single-core processors.
CPU Performance
- The performance of a CPU depends on several factors, including the clock speed, the number of cores, and the architecture of the CPU.
- A higher clock speed allows a CPU to execute more instructions per second, however, high clock speeds generate more heat.
- More cores allow a CPU to perform more simultaneous operations, but not all tasks can take advantage of multi-core processors.
The Fetch-Decode-Execute Cycle
- The Fetch-Decode-Execute Cycle is the process that the CPU uses to retrieve and execute instructions.
- During the fetch stage, the CPU retrieves the instruction from its memory.
- In the decode stage, the CPU interprets what the instruction means.
- During the execute stage, the CPU carries out the instruction.
- The cycle then repeats for the next instruction.
Von Neumann Architecture
- Developed by John Von Neumann, this architecture describes a design where the CPU contains the Control Unit, Arithmetic Logic Unit, and Registers.
- In this architecture, both data and instructions are stored in the same memory system. It is the basis of most modern computers.
- The fetch-decode-execute cycle is a key principle of the Von Neumann architecture.