As computers have become more powerful, not all processing is handled by the CPU alone. In IB Computer Science (HL), students are expected to understand the difference between a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU), and why modern systems use both.
This topic is especially important for understanding performance, parallel processing, and real-world applications such as machine learning and graphics rendering.
What Is a CPU?
The CPU is the main processor in a computer.
It is designed to:
- Execute a wide range of instructions
- Handle complex decision-making
- Manage control flow and program logic
Key characteristics of CPUs:
- Few cores (compared to GPUs)
- Very high clock speeds
- Optimised for sequential processing
- Strong control and branching capabilities
CPUs are general-purpose processors designed to handle many different types of tasks efficiently.
What Is a GPU?
The GPU was originally designed to process graphics, but it is now used for many other tasks.
It is designed to:
- Perform the same operation on large amounts of data
- Handle highly parallel workloads
- Process data simultaneously
Key characteristics of GPUs:
- Hundreds or thousands of smaller cores
- Lower clock speeds per core
- Optimised for parallel processing
