2 The Computer System Hardware

Introduction to Information Technology · Unit 2 · 3 hrs

The Computer System Hardware

Exam-focused notes for The Computer System Hardware (Introduction to Information Technology, CSC114): what the TU syllabus asks and how it has actually been tested, with 11 solved past questions from this unit.

The Computer System Hardware in short

This chapter looks inside the computer at the hardware that carries out processing: the CPU and its components, the concept of instructions, the bus system that ties everything together, and what sits inside the computer cabinet.

The Computer System Hardware: notes

Introduction

Computer hardware is the collection of physical parts of a computer system, such as the mouse, keyboard, monitor and hard disk. The monitor, motherboard, CPU, main memory (RAM), keyboard, mouse, graphics card, sound card, optical disk drive and hard disk drive are among the different hardware components that make up a computer.

Central Processing Unit

The Central Processing Unit (CPU) is often called the brain of the computer. It consists of the Arithmetic Logic Unit (ALU) and the Control Unit (CU), and it also has a set of registers that act as temporary storage for data and instructions. The CPU receives data as input, follows instructions to process that data, and presents the result as output to the user.

The ALU consists of an arithmetic unit and a logic unit. The arithmetic unit performs operations such as addition, subtraction, multiplication and division, while the logic unit performs logic operations such as testing for greater than, less than or equal to conditions; the ALU uses registers to hold the data it is processing. The CU organizes the processing of data and instructions, acting as a supervisor that controls and coordinates the other units of the computer and communicates with the input and output devices. It uses the instructions held in the Instruction Register (IR) to decide which circuit to activate, and it also instructs the ALU on which arithmetic or logic operation to perform, telling the system when to fetch data and instructions, what to do with them, and where to store the results.

Registers are high speed storage areas within the CPU with the least storage capacity of any memory type, often described as the CPU's working memory. Data and instructions that require processing must first be brought into the registers before they can be processed; for example, if two numbers are to be added, both are brought into registers, added, and the result is placed back in a register. Each register serves a specific purpose: the Accumulator (Acc) stores the result of arithmetic and logic operations, while the Instruction Register (IR) holds the instruction most recently fetched.

Memory Unit

The memory unit is the physical device of the computer capable of storing information; its function is to store data and programs and to help equalize the speed of the various components. Cache memory is a very high speed memory placed between the CPU and RAM that increases processing speed by storing the data used most often; during processing, the CPU checks cache first and only looks in RAM if the data is not found there. Cache memory is expensive and so is kept small, typically 256 KB to 2 MB. Primary memory is the computer's main memory, a semiconductor memory used to store data and instructions during processing, and it is of two kinds, Random Access Memory (RAM), which is volatile and loses its contents when the computer is switched off, and Read Only Memory (ROM), which is non-volatile and comes programmed by the manufacturer; RAM offers limited storage capacity because of its high cost. Secondary memory stores data and instructions permanently, providing back up storage such as hard disk drives, floppy drives and optical drives; it has a higher storage capacity than primary memory and is also cheaper.

What this unit covers

  • Introduction
  • Central Processing Unit
  • Memory Unit
  • Instruction Format
  • Instruction Set
  • Instruction Cycle
  • Microprocessor
  • Interconnecting the Units of a Computer
  • Inside a Computer Cabinet

Instruction Format

2081 · 5 marks

Explain instruction format with example. What is instruction set? [5]

An instruction format is a binary format which specifies a computer instruction. It specifies: - The address of the operand - The Opcode (Operation Code) - The addressing mode of the instruction Component Description ------------------------ Opcode Tells the processor what operation to perform on...

Open this answer on its own page →

Central Processing Unit

2080 · 5 marks

Explain each component of CPU in brief. [5]

The Central Processing Unit (CPU) is the brain of the computer. It consists of the following main components: --- The Control Unit is the part of the CPU that directs and coordinates the operations of the processor. It does not perform actual data processing itself, but it controls and manages th...

Open this answer on its own page →

2078 · 10 marks

Differentiate analog computer with digital computer. What is CPU and how it works? What does an instruction cycle in CPU consist of?[10]

Show solved answer

Differentiate Analog Computer with Digital Computer. What is CPU and How it Works? What Does an Instruction Cycle in CPU Consist of?


Part 1: Difference Between Analog Computer and Digital Computer (3 marks)

Analog Computer: A computer that uses continuously changeable aspects of physical phenomena such as electrical, mechanical, etc. Examples: Planimeter, Nomogram.

Digital Computer: A computer that is used to process information with quantities using digits, usually the binary number system. Examples: IBM PC, Apple Macintosh.

BasisAnalog ComputerDigital Computer
DefinitionWorks with continuous physical quantities (voltage, current, etc.)Works with discrete digits, usually binary (0s and 1s)
Data RepresentationRepresents data as continuous signalsRepresents data as discrete digits
AccuracyLess accurateHighly accurate
SpeedSlower for general-purpose tasksVery fast in processing
OutputOutput is in the form of graphs or dialsOutput is in the form of numbers, text, images
MemoryDoes not have significant memoryHas large memory capacity
ExamplesPlanimeter, Nomogram, SpeedometerIBM PC, Apple Macintosh
UsageUsed in scientific and engineering measurementsUsed for general-purpose computing
CostGenerally less expensiveCan be more expensive
ProgrammingNot easily programmableEasily programmable

Part 2: What is CPU and How it Works? (4 marks)

Definition of CPU

A Central Processing Unit (CPU) is the primary component of a computer that carries out the instructions of a computer program. As noted in the reference:

Microprocessor: An integrated circuit that contains all the functions of a central processing unit of a computer is called a microprocessor.

The CPU is often called the "brain of the computer" because it controls all operations of the computer system.


Components of CPU

The CPU consists of three main components:

1. Arithmetic and Logic Unit (ALU)

  • Performs all arithmetic operations (addition, subtraction, multiplication, division)
  • Performs all logical operations (AND, OR, NOT, comparison)

2. Control Unit (CU)

  • Directs and coordinates all operations of the CPU
  • Fetches instructions from memory, decodes them, and controls execution
  • Acts as the manager of the CPU

3. Registers

  • Small, high-speed temporary storage locations inside the CPU
  • Examples: Program Counter (PC), Instruction Register (IR), Accumulator (ACC), Memory Address Register (MAR), Memory Buffer Register (MBR)

How CPU Works

The CPU works by following a continuous cycle of operations:

  1. Fetch: The Control Unit fetches the next instruction from main memory using the address stored in the Program Counter (PC).
  2. Decode: The fetched instruction is decoded by the Control Unit to determine what operation needs to be performed. As noted in the reference, the Opcode tells the processor what to do with the data.
  3. Execute: The ALU or other components carry out the instruction (arithmetic, logical, or data transfer operation).
  4. Store/Write Back: The result is stored back into a register or memory location.

This process repeats continuously as long as the computer is running.


Instruction Format (Supporting Detail)

An instruction format is a binary format which specifies a computer instruction. It specifies:

  • Opcode: Tells the processor what operation to perform
  • Operand: Stores the data to be operated or manipulated
  • Addressing Mode: Specifies how the operand is accessed

Part 3: Instruction Cycle in CPU (3 marks)

The Instruction Cycle (also called the Fetch-Decode-Execute Cycle) is the complete process the CPU follows to process a single instruction. It consists of the following steps:


Steps of the Instruction Cycle

+----------+     +----------+     +-----------+     +----------+
|  FETCH   | --> |  DECODE  | --> |  EXECUTE  | --> |  STORE   |
+----------+     +----------+     +-----------+     +----------+
      ^                                                    |
      |____________________________________________________|
                    (Cycle repeats)

Step 1: Fetch

  • The CPU fetches the instruction from main memory
  • The Program Counter (PC) holds the address of the next instruction
  • The instruction is loaded into the Instruction Register (IR)
  • The PC is incremented to point to the next instruction

Step 2: Decode

  • The Control Unit decodes the instruction stored in the IR
  • It identifies the Opcode (what operation to do) and the Operand (what data to use)
  • In RISC architecture, decoding is simple (CPI range: ~1.5)
  • In CISC architecture, decoding is complex (CPI range: 2 to 15)

Step 3: Execute

  • The decoded instruction is executed by the ALU or other units
  • Arithmetic or logical operations are performed on the operands
  • RISC does not require external memory for calculations; CISC does

Step 4: Store (Write Back)

  • The result of the execution is written back to a register or memory location
  • The cycle then repeats for the next instruction

Summary Table of Instruction Cycle

PhaseActionUnit Involved
FetchGet instruction from memoryControl Unit, PC, IR
DecodeInterpret the opcode and operandControl Unit
ExecutePerform the operationALU
StoreSave the resultRegisters / Memory

Key Note: RISC vs CISC in Instruction Cycle

FeatureRISCCISC
CPI~1.52 to 15
DecodingSimple
Open this answer on its own page →

2077 · 5 marks

Write short notes on: a). Central Processing Unit b). IOT [5]

--- The Central Processing Unit (CPU) is the processing unit of a computer. It is often called the brain of the computer because it controls and coordinates all operations of the computer system. 1. Arithmetic Logic Unit (ALU) - Performs all arithmetic operations (addition, subtraction, multiplic...

Open this answer on its own page →

2075 · 5 marks

What is the role of Control Unit in CPU? How analog computer differs from digital? [5]

Show solved answer

Role of Control Unit in CPU and Analog vs Digital Computer


Part 1: Role of Control Unit (CU) in CPU

The Control Unit (CU) is one of the two main components of the CPU (the other being the ALU). The CPU is often called the brain of the computer, and the Control Unit plays a central role in its operation.

Key Roles of the Control Unit:

RoleDescription
Organizing ProcessingCU is responsible for organizing the processing of data and instructions
Control and CoordinationCU controls and co-ordinates the activity of all other units of the computer
Directing Data FlowIt directs how data and instructions move between memory, ALU, and registers
Instruction ManagementIt fetches, decodes, and manages the execution of instructions
Supervising I/OIt oversees the input and output operations of the computer system

In short, the CU organizes the processing of data and instructions, and controls and co-ordinates the activity of the other units of the computer.

The CU works closely with the ALU (which performs arithmetic and logic operations) and the registers (temporary storage areas), ensuring that the right data reaches the right unit at the right time.


Part 2: How Analog Computer Differs from Digital Computer

BasisAnalog ComputerDigital Computer
DefinitionUses continuously changeable aspects of physical phenomena such as electrical, mechanical, etc.Processes information with quantities using digits, usually the binary number system
Data RepresentationRepresents data as continuous signals (voltage, current, etc.)Represents data as discrete binary digits (0s and 1s)
Nature of InputContinuous (non-discrete)Discrete (digits)
AccuracyLess accurate due to continuous variationMore accurate and precise
SpeedFaster for specific physical measurementsGenerally faster for general-purpose computation
CostGenerally less complex but limited useMore versatile and widely used
ExamplesPlanimeter, NomogramIBM PC, Apple Macintosh

An analog computer uses continuously changeable aspects of physical phenomena such as electrical or mechanical signals, whereas a digital computer processes information as quantities represented using digits, usually the binary number system.


Summary

The Control Unit acts as the manager of the CPU, directing and coordinating all operations. Analog computers work on continuous physical signals, while digital computers work on discrete binary digits, making digital computers more accurate and widely applicable in modern computing.

Open this answer on its own page →

0 · 5 marks

What is the role of Control Unit in CPU? How analog computer differs from digital? [5]

Show solved answer

Role of Control Unit in CPU and Analog vs Digital Computer


Part 1: Role of Control Unit (CU) in CPU

The Control Unit (CU) is one of the two main components of the CPU (the other being the ALU). It plays a central coordinating role in the functioning of the entire computer system.

Key Roles of the Control Unit:

RoleDescription
Organizing ProcessingCU is responsible for organizing the processing of data and instructions inside the CPU
Control and CoordinationCU controls and co-ordinates the activity of all the other units of the computer (input, output, memory, ALU)
Instruction ManagementIt fetches instructions from memory, decodes them, and directs the ALU and other components to execute them
Data Flow ManagementIt manages the flow of data between the CPU registers, ALU, and memory during processing
Register UtilizationIt works alongside the CPU registers, which are temporary storage areas used to hold data and instructions during processing

In summary, the Control Unit acts as the manager or director of the CPU, ensuring that every component performs its task in the correct sequence and at the correct time.


Part 2: How Analog Computer Differs from Digital Computer

The key differences are as follows:

BasisAnalog ComputerDigital Computer
DefinitionUses continuously changeable aspects of physical phenomena such as electrical, mechanical, etc.Processes information with quantities using digits, usually the binary number system
Data RepresentationRepresents data as continuous signals (voltage, current, mechanical movement)Represents data as discrete binary digits (0s and 1s)
Nature of InputAccepts continuous data (e.g., temperature, pressure, speed)Accepts discrete data in the form of numbers and characters
AccuracyLess accurate due to continuous signal variationsHighly accurate due to precise binary representation
SpeedFaster for specific continuous measurementsGenerally faster for general-purpose computation
VersatilityLess versatile; designed for specific tasksHighly versatile; used for a wide range of applications
ExamplesPlanimeter, NomogramIBM PC, Apple Macintosh

Summary

The Control Unit is the backbone of CPU operation, directing and coordinating all activities within the computer. Analog computers work on continuous physical phenomena, while digital computers work on discrete binary digits, making digital computers far more versatile and accurate for modern computing needs.

Open this answer on its own page →

Instruction Cycle

2080 · 5 marks

Write short notes on:a.) Instruction Cycle b.) BigData [5]

--- The Instruction Cycle (also called the Fetch-Decode-Execute cycle) is the basic operational process that a CPU follows repeatedly to process instructions stored in memory. 1. Fetch - The Control Unit (CU) fetches the instruction from main memory using the address stored in the Program Counter...

Open this answer on its own page →

2079 · 5 marks

Define instruction set. How a CPU instruction cycle works? [5]

An instruction set (also called an Instruction Set Architecture, ISA) is the complete collection of instructions that a CPU can understand and execute. It defines the set of operations a processor can perform, the data types it supports, the registers available, and the addressing modes used to a...

Open this answer on its own page →

Microprocessor

2075 · 5 marks

How RISC architecture differs from CISC architecture? [5]

CISC has the ability to execute addressing modes or multi-step operations within one instruction set. One instruction performs many low-level operations (e.g., memory storage, arithmetic operation, and loading from memory simultaneously). CISC minimizes the number of instructions per program and ...

Open this answer on its own page →

Interconnecting the Units of a Computer

2074 · 5 marks

Why bus is used in computer? How control bus differs from data bus? [5]

--- A bus is a set of parallel communication lines (wires) that transfer data, addresses, and control signals between the components of a computer system (CPU, memory, and I/O devices). 1. Shared Communication Path: Instead of having separate dedicated wires between every pair of components, a bu...

Open this answer on its own page →

Instruction Set

0 · 5 marks

How RISC architecture differs from CISC architecture? [5]

CISC has the ability to execute addressing modes or multi-step operations within one instruction set. One instruction can perform many low-level operations such as: - Memory storage - Arithmetic operations - Loading from memory CISC minimizes the number of instructions per program, sacrificing th...

Open this answer on its own page →