Know and understand the role of the CPU in processing instructions entered into the computer in order to produce an output

Published by Patrick Mutisya · 14 days ago

ICT 0417 – Types and Components of Computer Systems

Types and Components of Computer Systems

Learning Objective

Know and understand the role of the Central Processing Unit (CPU) in processing instructions entered into the computer in order to produce an output.

1. Overview of Computer Systems

A computer system is an integrated set of hardware and software that processes data to produce useful information. The main functions are input, processing, storage, and output.

2. Types of Computer Systems

Computer systems are classified according to size, purpose and performance.

TypeTypical UseKey Characteristics
Desktop PCHome and office workSeparate monitor, keyboard, mouse; expandable
Laptop / NotebookMobile personal computingIntegrated display and keyboard; battery powered
TabletTouch‑screen based tasks, media consumptionLightweight, touch input, limited expandability
ServerProviding services to multiple clientsHigh reliability, network connectivity, often rack‑mounted
MainframeLarge‑scale transaction processing (banks, airlines)Very high processing power, massive storage, multi‑user
SupercomputerScientific simulations, weather forecastingParallel processing, extremely high speed (petaflops)
Embedded SystemControl of appliances, vehicles, industrial machinesDedicated function, often real‑time, limited UI

3. Core Components of a Computer System

  • Input Devices – keyboards, mouse, scanner, microphone.
  • Output Devices – monitor, printer, speakers, projector.
  • Storage – hard‑disk drives (HDD), solid‑state drives (SSD), optical media.
  • Memory – RAM (volatile), ROM (non‑volatile).
  • Motherboard – main circuit board that interconnects all components.
  • Power Supply Unit (PSU) – converts mains electricity to low‑voltage DC.
  • Central Processing Unit (CPU) – the “brain” that processes instructions.

4. The Central Processing Unit (CPU)

The CPU carries out the fundamental operations of a computer by executing instructions stored in memory. It performs three basic steps repeatedly, known as the instruction cycle:

  1. Fetch – Retrieve the next instruction from main memory.
  2. Decode – Interpret the instruction and determine the required operation.
  3. Execute – Perform the operation using the Arithmetic Logic Unit (ALU) and store results.

4.1 Main Parts of the CPU

  • Arithmetic Logic Unit (ALU) – Carries out arithmetic (addition, subtraction) and logical (AND, OR, NOT) operations.
  • Control Unit (CU) – Generates timing signals and controls data flow between CPU, memory and I/O devices.
  • Registers – Small, fast storage locations inside the CPU (e.g., accumulator, program counter, instruction register).
  • Cache Memory – High‑speed memory that stores frequently used data and instructions to reduce access time.

4.2 Instruction Cycle in Detail

Below is a simplified flow of the instruction cycle:

Suggested diagram: Flowchart showing Fetch → Decode → Execute → Store results, with arrows indicating data movement between CPU, RAM, and I/O.

4.3 Interaction with Other Components

The CPU does not work in isolation. Its operation depends on coordinated interaction with memory and I/O devices:

  • The Program Counter (PC) holds the address of the next instruction in RAM.
  • The Memory Address Register (MAR) sends this address to the memory unit.
  • The Memory Data Register (MDR) receives the fetched instruction and passes it to the Instruction Register (IR) for decoding.
  • During execution, the ALU may read operands from registers or RAM, perform the calculation, and write the result back to a register or memory location.
  • Output instructions cause the CPU to send data to output devices via I/O controllers.

4.4 Example: Adding Two Numbers

Consider a simple program that adds the numbers stored at memory locations 1000 and 1004 and stores the result at 1008.

  1. Fetch instruction “LOAD A, 1000”.
  2. Decode – move contents of address 1000 into register A.
  3. Fetch instruction “ADD A, 1004”.
  4. Decode – add contents of address 1004 to register A.
  5. Fetch instruction “STORE A, 1008”.
  6. Decode – write the value in register A to address 1008.

Each step involves the CPU’s fetch‑decode‑execute cycle, using the ALU for the addition and the control unit for data movement.

4.5 CPU Performance Factors

Performance is influenced by several technical specifications:

  • Clock Speed – Number of cycles per second, measured in hertz (Hz). The relationship is \$f = \frac{1}{T}\$ where \$T\$ is the clock period.
  • Number of Cores – Multiple cores allow parallel execution of instructions.
  • Cache Size – Larger cache reduces the need to access slower main memory.
  • Instruction Set Architecture (ISA) – Determines the types of operations the CPU can perform.

5. Summary

The CPU is the central component that transforms input data into meaningful output by repeatedly fetching, decoding, and executing instructions. Understanding its internal structure (ALU, control unit, registers, cache) and how it interacts with memory and I/O devices is essential for grasping how computer systems operate.