The parts of the CPU, the von Neumann architecture, the registers and the fetch-execute cycle, stepped through one micro-step at a time.
What you will learn
- Name the parts of the CPU and what they do
- Describe each register's job
- Describe the fetch-execute cycle
- Tell hardware from software
Inside the CPU
Hardware is the physical parts of a computer, the parts you could pick up and hold: the CPU, a keyboard, a printer, a network card.
Software is the programs that run on it.
The CPU (central processing unit) fetches and carries out instructions. The instructions are machine code: binary codes the CPU carries out directly. Programs written in other languages are translated into machine code first.
- ALU (arithmetic logic unit): does calculations and comparisons.
- Control unit: decodes instructions and sends signals to make the other parts act, in step with the clock.
- Cache: a small amount of very fast memory on or near the CPU.
- Registers: tiny, very fast stores inside the CPU, each with one job.
Main memory (RAM) holds the programs and data in use now. Secondary storage, such as a hard disk or an SSD, keeps programs and data when the power is off. The operating system is the software that manages the hardware and runs the other programs.
In the von Neumann architecture, program instructions and data are stored together in the same main memory, and the CPU fetches them one at a time. Buses connect the CPU to memory: the address bus carries addresses, the data bus carries data and the control bus carries signals such as read and write.
An address bus with n wires (n bits) can carry 2^n different addresses, so it can reach 2^n memory locations: a 12-bit address bus reaches 2^12 = 4096 locations.
The rest of this lesson and its 7 practice questions are locked.
In this lesson
- Inside the CPU
- The registers
- Fetch, decode, execute
- Try it: Which register?
7 practice questions, marked as you go; about 25 minutes in all.
Key terms
Hardware, Software, CPU, ALU, Clock, Secondary storage, Operating system, Von Neumann architecture, Buses
In this unit: Computer systems
The CPU and the fetch-execute cycle step by step, what makes a CPU fast, RAM, ROM and virtual memory, secondary storage, and system software.
- The CPU and the fetch-execute cycle
- CPU performance and embedded systems
- Memory
- Secondary storage
- System software
- Extended answers