JHS Portal/Computing / ICT/The Central Processing Unit (CPU) & Primary Memory
All Topics
ICTJHS 1 • Term 2Topic 6Free Trial Lesson

The Central Processing Unit (CPU) & Primary Memory

Examine the architecture of the CPU (ALU, Control Unit, Registers), system buses, RAM vs ROM, and cache memory hierarchy.

Curated Video Lesson

Visual explanation and practical step-by-step walk-through

Watch on YouTube

Comprehensive Study Notes

Aligned with Ghana NaCCA & WAEC BECE syllabus standards

Topic Introduction & Real-World Context:

Inside every smartphone, tablet, ATM, and desktop computer sits a microscopic silicon chip called the Central Processing Unit (CPU). It acts as the command center and primary brain of the machine. Working hand-in-hand with lightning-fast primary memory (RAM and ROM), the CPU executes billions of complex mathematical and logical instructions every single second.

What You Will Master in This Lesson (NaCCA Objectives):

Identify the CPU as the central brain of the computer and examine its core internal components (ALU, CU, Registers).
Explain the Machine Cycle: Fetch, Decode, Execute, and Store.
Differentiate between primary memory (RAM vs ROM) in terms of volatility, speed, and function.
Understand the role of high-speed Cache memory in optimizing CPU performance.

1. The CPU: Architecture and Components

The Central Processing Unit (CPU), housed on the motherboard as a microprocessor, interprets and executes all software instructions, performs calculations, and coordinates all peripheral hardware components. • The Three Fundamental Internal Sub-Units of the CPU: 1. The Arithmetic and Logic Unit (ALU): - The computational powerhouse of the processor. - Arithmetic Operations: Executes mathematical calculations: Addition (+), Subtraction (-), Multiplication (*), and Division (/), - Logic Operations: Evaluates logical conditions and comparisons: Equal to (=), Greater than (>), Less than (<), NOT EQUAL TO, AND, OR. 2. The Control Unit (CU): - The master manager or supervisor of the entire computer system. - It extracts instructions from memory, decodes what actions are required, generates timing and control pulses, and directs the ALU, registers, and I/O devices. 3. Registers: - Extremely high-speed, tiny internal temporary storage cells inside the CPU chip itself. - Hold active data, immediate operands, current instructions, and memory addresses during execution (e.g. Program Counter, Instruction Register, Accumulator).
Key Takeaway: The CPU contains the ALU (calculations and logic), Control Unit (supervises and directs), and Registers (high-speed temporary data holders).
Real-World Application: When a student calculates 45 × 12 on a computer calculator, the Control Unit fetches the numbers and directs the ALU to multiply them.

2. The Machine Cycle (Instruction Cycle)

Every single instruction processed by the CPU is executed through a continuous four-step cycle known as the Machine Cycle: 1. FETCH: The Control Unit retrieves the next instruction from the system RAM and places it into an internal CPU register. 2. DECODE: The Control Unit translates the fetched instruction into binary electronic signals and determines what operations must be carried out. 3. EXECUTE: The Arithmetic and Logic Unit (ALU) performs the designated mathematical computation or logical comparison. 4. STORE (Writeback): The result generated by the execution step is written back to an internal register or system memory (RAM) for later display or storage. • CPU Clock Speed: The speed of the machine cycle is regulated by an internal quartz crystal clock. Measured in Gigahertz (GHz)—a 3.2 GHz processor executes 3.2 billion machine cycles every second!
Key Takeaway: The machine cycle consists of 4 steps: Fetch → Decode → Execute → Store.
Real-World Application: Typing a letter 'A' on a keyboard causes the CPU to fetch the keycode, decode it to ASCII, execute the font mapping, and store it in RAM.

3. Primary Memory: RAM vs ROM

Primary memory (main memory) communicates directly with the CPU via high-speed buses: • 1. RAM (Random Access Memory): - Volatile (Temporary): Its contents evaporate and are completely lost when electrical power is switched off. - Read and Write Memory: The CPU can both read data from RAM and write new data into RAM effortlessly. - Function: Acts as the immediate working desk for the computer, holding the active operating system kernel, open programs, and unsaved work. - Capacity: Measured in Gigabytes (e.g. 4 GB, 8 GB, 16 GB). • 2. ROM (Read-Only Memory): - Non-Volatile (Permanent): Retains its contents indefinitely even when the computer is completely unplugged. - Read Only: Data is permanently written during manufacturing and cannot be modified by ordinary users. - Function: Holds the computer's firmware—the BIOS (Basic Input/Output System) and the bootstrap loader instructions that wake up hardware when turned on. - Capacity: Typically small (a few Megabytes).
Key Takeaway: RAM is volatile read/write working memory; ROM is non-volatile permanent startup storage holding BIOS.
Real-World Application: If power cuts while typing an essay before saving, your work disappears because it was held in volatile RAM.

4. Cache Memory and System Buses

• Cache Memory: - An ultra-fast buffer of static RAM (SRAM) built directly onto the CPU chip itself (L1, L2, L3 cache). - Operating Speed: Much faster than regular RAM. - Purpose: Stores frequently used instructions and data so the ultra-fast CPU does not have to wait for slower system RAM. • The System Bus: A collection of parallel high-speed copper traces connecting the CPU to memory and peripherals: - Data Bus: Carries the actual binary data between CPU and memory. - Address Bus: Carries the physical memory address where data is located. - Control Bus: Transmits synchronization, read, and write command signals.
Key Takeaway: Cache memory speeds up processing by holding frequently needed data right on the CPU chip.
Real-World Application: Cache memory works like keeping your favorite pen in your pocket rather than walking to your locker every time you need to write.
Common Mistakes Students Make in BECE Examinations:
⚠️Confusing the roles of ALU and Control Unit (ALU calculates; CU directs and coordinates).
⚠️Believing that RAM stores files permanently (RAM is volatile and loses everything on power cut).
⚠️Thinking ROM can be upgraded by downloading more memory from the internet.
⚠️Confusing primary memory (RAM) with secondary storage (Hard disk/SSD).
Teacher's BECE Exam Pro-Tips:
⭐In BECE Section A, remember: ALU = Arithmetic and Logic Unit; CU = Control Unit; RAM = Random Access Memory; ROM = Read Only Memory.
⭐Clearly explain volatility: Volatile memory (RAM) loses contents when power is off; Non-volatile memory (ROM) keeps data permanently.
⭐List the four steps of the Machine Cycle in order: Fetch → Decode → Execute → Store.
Quick Revision Summary Checklist:
Understand the roles of the ALU, Control Unit, and Registers.
Can explain the 4 steps of the Machine Cycle (Fetch, Decode, Execute, Store).
Can contrast RAM and ROM across volatility, read/write ability, and purpose.
Know the role of Cache memory and system buses.

Step-by-Step Worked Examples (2)

Real BECE exam-standard problems with complete solution steps

Example 1: Comparing RAM and ROM
Problem StatementState three fundamental differences between Random Access Memory (RAM) and Read Only Memory (ROM).
Step-by-Step Solution:

1. Volatility: RAM is volatile (loses its contents when power is turned off); ROM is non-volatile (retains data permanently without electricity).

2. Modifiability: RAM allows both reading and writing operations (read/write); ROM can only be read by the CPU and cannot be easily altered.

3. Purpose: RAM stores currently running programs and unsaved user files; ROM stores the BIOS firmware and bootstrap startup instructions.

💡
Key Takeaway / Exam Rule: RAM is volatile read/write workspace; ROM is non-volatile permanent startup storage.
Example 2: The Machine Cycle of the CPU
Problem StatementDescribe the four sequential steps executed by the CPU during a single Machine Cycle.
Step-by-Step Solution:

Step 1 (Fetch): The Control Unit retrieves an instruction from the system RAM.

Step 2 (Decode): The Control Unit translates the instruction into binary machine signals.

Step 3 (Execute): The ALU performs the mathematical calculation or logical comparison.

Step 4 (Store): The result is written back to registers or RAM for subsequent use.

💡
Key Takeaway / Exam Rule: The CPU executes the machine cycle repeatedly: Fetch → Decode → Execute → Store.
Mastery Diagnostic Quiz

Ready to test your knowledge on The Central Processing Unit (CPU) & Primary Memory?

Timed computerized test with instant feedback, scoring, and comprehensive question rationales.