You are on page 1of 121

CS211 - ICT Fundamentals

Ashenafi Shifferaw, Lily Abebe & Tsegamlak Molla

Autumn 2023
Microcomputer Architecture
Chapter 4

2 CS211 - ICT Fundamentals (Autumn 2023)


Learning Objectives

• To be able to provide an overview of microcomputer architecture

• To be able to explain the functions and roles of key components


like the CPU, memory, I/O devices, and the system bus.

• To be able to discuss and differentiate between design concepts


such as Von Neumann vs. Harvard architecture, and CISC vs. RISC.

3 CS211 - ICT Fundamentals (Autumn 2023)


Agenda

• Introduction

• Block Diagram

• Central Processing Unit (CPU)

• Memory and Memory Hierarchy

• Input/Output (I/O) Devices

• System Bus
4 CS211 - ICT Fundamentals (Autumn 2023)
Introduction
An Overview of Microcomputers and Microcomputer Architecture

5 CS211 - ICT Fundamentals (Autumn 2023)


Microcomputers

• Microcomputers are complete computer systems built on a single


printed circuit board (PCB).

• They are found in a wide variety of devices, including personal


computers, laptops, smartphones, tablets, and embedded systems.

• Understanding the architecture of microcomputers is essential for


developing and using these devices effectively.

6 CS211 - ICT Fundamentals (Autumn 2023)


Microcomputers

• The history and evolution of microcomputers can be traced back to


the 1970s when the first commercially successful microprocessor,
the Intel 4004, was introduced.

• This marked the beginning of a significant shift in computing, as it


enabled the development of smaller, more affordable, and more
powerful computers.

7 CS211 - ICT Fundamentals (Autumn 2023)


Microcomputers

• In the late 1970s and early 1980s, companies such as Apple, IBM,
and Commodore began producing personal computers (PCs) that
were based on microprocessors.

• These early PCs were primarily used for basic tasks such as word
processing and spreadsheet calculations.

8 CS211 - ICT Fundamentals (Autumn 2023)


Microcomputers

• The 1990s saw a rapid expansion of microcomputer usage, with the


introduction of Windows operating systems, graphical user
interfaces, and the internet.

• This period also saw advancements in microprocessor technology,


with companies like Intel and AMD competing to produce faster
and more efficient CPUs.

9 CS211 - ICT Fundamentals (Autumn 2023)


Microcomputers

• In the 2000s, the rise of mobile computing and the proliferation of


smartphones and tablets further expanded the reach of
microcomputers.

• This led to developments in low-power processors and increased


emphasis on energy efficiency.

10 CS211 - ICT Fundamentals (Autumn 2023)


Microcomputers

• Today, microcomputers are ubiquitous and are used in a wide


range of applications, from smartphones and laptops to embedded
systems in cars and household appliances.

• The evolution of microcomputer architecture continues with


ongoing advancements in areas such as artificial intelligence,
machine learning, and Internet of Things (IoT) devices.

11 CS211 - ICT Fundamentals (Autumn 2023)


Microcomputer Architecture

• Microcomputer architecture refers to the design and organization of the


components that make up a microcomputer system.

• It encompasses hardware elements such as the central processing unit


(CPU), memory, input/output (I/O) devices, and the system bus.

• Understanding microcomputer architecture is crucial for both hardware


and software developers to optimize performance and functionality.

12 CS211 - ICT Fundamentals (Autumn 2023)


Components of Microcomputer
Architecture
• The Components of Microcomputer Architecture form the
foundational building blocks of computing systems, collectively
determining the system's capabilities and functionality.
• Central Processing Unit (CPU)
• Memory
• Input/Output (I/O) Devices
• System Bus

13 CS211 - ICT Fundamentals (Autumn 2023)


Components of Microcomputer
Architecture
• At the core of this architecture is the Central Processing Unit
(CPU), an intricate assembly of the Arithmetic Logic Unit (ALU),
Control Unit, and various registers, orchestrating the execution of
instructions.

14 CS211 - ICT Fundamentals (Autumn 2023)


Components of Microcomputer
Architecture
• The memory subsystem, encompassing Random Access Memory
(RAM) and Read-Only Memory (ROM), plays a crucial role in data
storage and program execution.

• Input/Output (I/O) devices play an essential role in facilitating the


interaction between the microcomputer and external peripherals.

15 CS211 - ICT Fundamentals (Autumn 2023)


Components of Microcomputer
Architecture
• The System Bus serves as a vital communication pathway,
connecting the CPU, memory, and I/O devices, facilitating seamless
data transfer and interaction with the external environment.

16 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
4.1

17 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram

• A block diagram in the context of microcomputer architecture is a


visual representation of the components and their
interconnections within the system.

• It helps in understanding the overall architecture by breaking down


the system into distinct blocks or modules, allowing for easier
analysis and troubleshooting.

18 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Examples include

• Basic Microcomputer Architecture

• Von Neumann Architecture

• Harvard Architecture

• RISC Architecture

• CISC Architecture

19 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Basic Microcomputer Architecture

20 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Von Neumann Architecture

• Von Neumann Architecture, named after mathematician and


physicist John von Neumann, is a fundamental computing
architecture that serves as the foundation for most modern
computers.

21 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Von Neumann Architecture

22 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Von Neumann Architecture

• The key characteristics of Von Neumann Architecture include:

• Single Memory Space: In Von Neumann Architecture, there is a single,


unified memory space that is used to store both program instructions
and data.

• This contrasts with other architectures, such as Harvard Architecture,


which separates the memory for instructions and data.

23 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Von Neumann Architecture

• Stored Program Concept: Programs and data are both stored in


the computer's memory, and instructions are fetched from
memory sequentially.

• This concept is known as the "stored-program concept," and it


allows for the flexible execution of different programs without the
need to change the hardware.

24 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Von Neumann Architecture

• Sequential Execution: Instructions are executed sequentially by the


Central Processing Unit (CPU).

• The CPU fetches an instruction from memory, decodes it to


understand the operation to be performed, executes the
operation, and then stores the result back in memory.

• This cycle continues until the program is complete.

25 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Von Neumann Architecture

• Control Unit and ALU: The architecture includes a Control Unit,


responsible for managing the execution of instructions, and an
Arithmetic Logic Unit (ALU), which performs arithmetic and logical
operations.

26 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Von Neumann Architecture

• Advantages and Limitations: The Von Neumann Architecture is


simple, which has facilitated its widespread adoption.

• However, it also faces limitations, such as the potential for a


bottleneck at the memory due to the shared use for data and
instructions, limiting overall processing speed.

27 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Von Neumann Architecture

• The Von Neumann Architecture has been a cornerstone in the


development of computers since the mid-20th century and has
influenced various computer architectures.

• While it has certain limitations, its simplicity and versatility make it


a widely used and well-understood model for designing general-
purpose computers.

28 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Key differences between Basic Microcomputer & Von Neumann Architectures

Basic Microcomputer Architecture


Feature Von Neumann Architecture
Block Diagram

CPU Central component Equal partner with memory

Memory Subordinate to CPU Equal partner with CPU

Control bus and address bus Separate lines Combined into a single bus

General representation of Specific representation of stored-


Focus
microcomputer architecture program computer architecture

29 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Harvard Architecture

• Harvard Architecture is an alternative computer architecture


design that distinguishes itself from the more common Von
Neumann Architecture.

• Harvard architecture separates the memory space for instructions


and data, allowing simultaneous access to both.

• This architecture is commonly found in embedded systems.

30 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Harvard Architecture

31 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Harvard Architecture

• Key features and characteristics of Harvard Architecture include;

• Separate Memory Spaces: In Harvard Architecture, there are


distinct and independent memory spaces for storing program
instructions and data.

• This separation allows for simultaneous access to both instruction


and data memory, enabling more efficient and parallel processing.

32 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Harvard Architecture

• Parallel Fetching: Unlike Von Neumann Architecture, where


instructions and data share the same memory, Harvard
Architecture allows the CPU to fetch an instruction and data
simultaneously.

• This parallel fetching can enhance the overall speed and efficiency
of the system.

33 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Harvard Architecture

• Parallel Processing: The separation of instruction and data memory


facilitates the potential for parallel processing.

• While one part of the system is fetching or executing instructions,


another part can simultaneously access or modify data, improving
the overall throughput.

34 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Harvard Architecture

• Control Unit and ALU: Similar to Von Neumann Architecture,


Harvard Architecture includes a Control Unit to manage instruction
execution and an Arithmetic Logic Unit (ALU) for performing
arithmetic and logical operations.

35 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Harvard Architecture

• Examples of Use: Harvard Architecture is commonly found in


embedded systems and specialized applications where the
performance demands justify the complexity of having separate
instruction and data memories.

• Microcontrollers and digital signal processors often adopt Harvard


Architecture.

36 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Harvard Architecture

• Advantages and Limitations: The main advantage of Harvard


Architecture lies in its potential for increased speed and efficiency
due to parallel access to instruction and data.

• However, it may involve additional complexity in terms of memory


management and programming.

37 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram
Harvard Architecture

• Harvard vs. Von Neumann: While Harvard Architecture offers


certain advantages in terms of speed and parallelism, it is not as
widely used in general-purpose computers as Von Neumann
Architecture.

• The latter's simplicity and familiarity have contributed to its


dominance in personal computers and servers.

38 CS211 - ICT Fundamentals (Autumn 2023)


Block Diagram

CISC (Complex Instruction Set Computing) RISC (Reduced Instruction Set Computing)

• CISC architectures have a large set • RISC architectures have a smaller set
of complex instructions, aiming to of simple instructions, focusing on
reduce the number of instructions optimizing the execution of
per program. frequently used instructions.

• Examples include the x86 • Examples include the ARM


architecture. architecture.

39 CS211 - ICT Fundamentals (Autumn 2023)


Please read further on CISC and RISC Architectures

40 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
4.2

41 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)

• The CPU is the brain of the microcomputer.

• It is responsible for executing instructions and controlling the flow


of data.

• It is composed of several subunits, including the Arithmetic Logic


Unit (ALU), the Control Unit, and the Registers.

42 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)

43 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Control Unit

• The Control Unit manages and coordinates the operations of the


CPU.

• It fetches instructions from memory, decodes them to understand


the required operation, and generates control signals to coordinate
the flow of data within the CPU and between other components.

44 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Arithmetic Logic Unit (ALU)

• The ALU is the computational engine within the CPU responsible


for performing arithmetic and logical operations.

• It executes tasks such as addition, subtraction, multiplication,


division, and logical comparisons.

• The ALU receives data from memory or registers, performs the


specified operation, and produces the result.

45 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Registers

• Registers are small, high-speed storage locations within the CPU used to
store temporary data during program execution.

• They play a crucial role in facilitating quick access to operands and


intermediate results.

• Common types of registers include the Program Counter (PC),


Instruction Register (IR), Memory Address Register (MAR), Memory
Data Register (MDR), and general-purpose registers.

46 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Program Counter (PC)

• The Program Counter keeps track of the memory address of the


next instruction to be fetched and executed.

• It is automatically incremented as each instruction is fetched.

47 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Instruction Register (IR)

• The Instruction Register holds the current instruction being


executed.

• It is used by the Control Unit to decode the instruction and


generate the necessary control signals.

48 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Memory Address Register (MAR) and Memory Data Register (MDR)

• The Memory Address Register (MAR) holds the memory address


from which data or instructions are to be fetched or to which data
is to be stored.

• The Memory Data Register (MDR) holds the actual data or


instruction fetched from or to be stored in memory.

49 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Clock and Clock Speed

• The CPU relies on a clock to synchronize its operations.

• The clock generates regular pulses that coordinate the timing of


instruction execution.

• The clock speed, measured in Hertz (Hz), determines how quickly


the CPU can execute instructions.

• Higher clock speeds generally result in faster processing.

50 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Pipeline

• Pipelining is a technique used to enhance CPU performance by


allowing the simultaneous execution of multiple instructions in
overlapping stages.

• This improves overall throughput.

51 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Cache Memory

• Cache memory is a small, high-speed type of volatile computer


memory that provides high-speed data access to the CPU.

• It stores frequently accessed instructions and data to reduce the


time needed to fetch them from the main memory.

52 CS211 - ICT Fundamentals (Autumn 2023)


Central Processing Unit (CPU)
Fetch-Decode-Execute Cycle

• The CPU follows a repeating cycle known as the Fetch-Decode-


Execute cycle.

• It involves fetching the next instruction from memory, decoding it


to determine the operation to be performed, and executing the
operation.

53 CS211 - ICT Fundamentals (Autumn 2023)


Memory and Memory
Hierarchy
4.3

54 CS211 - ICT Fundamentals (Autumn 2023)


Memory

• In the context of computers, memory refers to the electronic


storage space where data is stored for quick retrieval and access by
the computer's processor.

• Memory is a crucial component that enables a computer to


execute programs and store information temporarily or
permanently.

55 CS211 - ICT Fundamentals (Autumn 2023)


Memory

• There are two main types of memory:

• Primary Memory (RAM - Random Access Memory)

• Secondary Memory (Storage - Hard Drives, SSDs, etc.)

56 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Primary Memory (RAM - Random Access Memory)

• RAM is volatile memory used by the computer to store data and


program code actively being used or processed.

• It provides fast read and write access, but its contents are lost
when the power is turned off.

57 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Primary Memory (RAM - Random Access Memory)

• During program execution, the operating system and applications load


data and code into RAM, allowing the CPU to access information rapidly.

• As the CPU processes instructions, it fetches and stores data in RAM for
quick retrieval.

• This dynamic interaction between the CPU and RAM enables efficient
and effective execution of tasks.

58 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Primary Memory (RAM - Random Access Memory)

• Characteristics of RAM include;

• Volatile Nature: RAM is volatile memory, meaning that its contents


are lost when the power is turned off or the computer is restarted.

• This characteristic makes RAM suitable for temporary storage but


not for long-term data retention.

59 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Primary Memory (RAM - Random Access Memory)

• Fast Read and Write Access:

• RAM provides fast read and write access times, allowing the CPU
to quickly retrieve and manipulate data stored in RAM.

• This speed is crucial for the overall performance of a computer, as


it enables quick access to data needed for program execution.

60 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Primary Memory (RAM - Random Access Memory)

• Temporary Storage: RAM acts as temporary storage for the


operating system, running applications, and actively used data.

• It allows the CPU to efficiently read and write data during program
execution, improving overall system performance.

61 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Primary Memory (RAM - Random Access Memory)

• Direct Accessibility: RAM is directly accessible by the CPU.

• The direct accessibility of RAM allows the CPU to quickly read and
write data without the need for time-consuming data transfer
processes.

62 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Primary Memory (RAM - Random Access Memory)

• Size and Capacity: RAM capacity is measured in gigabytes (GB) or


terabytes (TB).

• Modern computers typically have several gigabytes of RAM to


accommodate the demands of running multiple applications
simultaneously.

63 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Primary Memory (RAM - Random Access Memory)

• DRAM and SRAM: RAM can be categorized into two main types -
Dynamic RAM (DRAM) and Static RAM (SRAM).

• DRAM requires periodic refreshing to retain data, while SRAM is


faster but more expensive and often used in cache memory.

64 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Primary Memory (RAM - Random Access Memory)

• In summary, RAM is a critical component of a computer's primary


memory, providing fast and temporary storage for actively used
data and program code.

• Its characteristics of volatility, fast access times, and direct


accessibility contribute to the overall speed and performance of a
computer system.

65 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Secondary Memory (Storage - Hard Drives, SSDs, etc.)

• Secondary memory, which includes hard drives, solid-state drives


(SSDs), and other storage devices, often referred to as storage, is a
type of non-volatile memory used for long-term data storage in a
computer system.

66 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Secondary Memory (Storage - Hard Drives, SSDs, etc.)

• Unlike primary memory (RAM), secondary memory retains data


even when the power is turned off.

• This type of memory plays a crucial role in storing the operating


system, software applications, and user files.

• Data stored in secondary memory is transferred to RAM when


needed for active processing.

67 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Secondary Memory (Storage - Hard Drives, SSDs, etc.)

• Characteristics of Secondary Memory include;

• Non-Volatile Nature: Secondary memory is non-volatile, meaning


that it retains data even when the power is turned off.

• This characteristic makes secondary memory suitable for long-term


storage of data that needs to persist between computer sessions.

68 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Secondary Memory (Storage - Hard Drives, SSDs, etc.)

• Slower Access Speed: Secondary memory generally has slower


access times compared to primary memory (RAM).

• While secondary memory is excellent for long-term storage, it is


not as fast as RAM for quickly retrieving and manipulating data
during active program execution.

69 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Secondary Memory (Storage - Hard Drives, SSDs, etc.)

• High Capacity: Secondary memory devices, such as hard drives


(HDDs) and solid-state drives (SSDs), offer high storage capacities,
measured in terabytes (TB) or petabytes (PB).

• The high capacity of secondary memory allows users to store large


amounts of data, including the operating system, applications, and
user files.

70 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Secondary Memory (Storage - Hard Drives, SSDs, etc.)

• Persistent Storage: Secondary memory serves as a persistent


storage medium, holding data and programs over extended
periods.

• This persistence is crucial for storing the operating system,


software applications, and user-generated content, ensuring that
data remains intact even after the computer is powered off.

71 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Secondary Memory (Storage - Hard Drives, SSDs, etc.)

• Types of Secondary Memory:

• Hard Disk Drives (HDDs): Traditional magnetic storage devices with


spinning disks and mechanical read/write heads.

• Solid-State Drives (SSDs): Storage devices that use NAND flash memory
for faster access times and increased durability.

• Secondary memory can also include optical disks (e.g., DVDs), USB
drives, and network-attached storage (NAS) devices.
72 CS211 - ICT Fundamentals (Autumn 2023)
Memory
Secondary Memory (Storage - Hard Drives, SSDs, etc.)

• File System Management: Data stored in secondary memory is


organized using a file system, which manages the structure and
retrieval of files and directories.

• File systems enable users and applications to organize and access


data stored in secondary memory efficiently.

73 CS211 - ICT Fundamentals (Autumn 2023)


Memory
Secondary Memory (Storage - Hard Drives, SSDs, etc.)

• Secondary memory plays a vital role in computing by providing a reliable


and durable storage solution for various types of data.

• The operating system and applications are typically installed on the


secondary memory, allowing the computer to boot and run programs
even after a power cycle.

• Users also store documents, images, videos, and other files on


secondary storage devices for long-term access.

74 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy

• The memory hierarchy is a concept that describes the different


levels of memory in a computer system.

• The levels are ordered by speed and cost, with the fastest and
most expensive memory at the top of the hierarchy.

75 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy

• The principle behind memory hierarchy is to use different types of


memory with varying speeds, sizes, and costs to achieve an optimal
balance between performance and cost-effectiveness.

• The different levels of memory in a typical microcomputer system


are: registers, cache, main memory, and secondary storage.

76 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Registers

• Registers are small, high-speed storage locations within the Central


Processing Unit (CPU) of a computer.

• They serve as temporary storage for data and instructions actively being
processed by the CPU during program execution.

• Registers play a crucial role in facilitating quick access to operands and


intermediate results, contributing to the overall speed and efficiency of
the computer's operation.

77 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Registers

• Key Characteristics and Functions of Registers;

• Location: Registers are located directly on the CPU chip, making


them the fastest storage locations in the computer system.

• Speed: Registers provide extremely fast access times, allowing the


CPU to quickly read and write data.

78 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Registers

• Capacity: Registers have a very limited storage capacity compared


to other types of memory like RAM or secondary storage.

• They typically store small amounts of data, such as individual values


or addresses.

79 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Registers
• Roles and Types of Registers:

• Program Counter (PC):

• Instruction Register (IR):

• Memory Address Register (MAR):

• Memory Data Register (MDR):

• General-Purpose Registers:
• Used by the CPU for various purposes, such as storing operands and intermediate results
during arithmetic and logical operations.

80 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Registers

• Data Transfer: Registers facilitate the transfer of data between the


CPU and memory during the fetch, decode, and execute stages of
the instruction cycle.

• Arithmetic and Logical Operations: During arithmetic and logical


operations, registers hold operands and intermediate results,
allowing the CPU to perform calculations.

81 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Registers

• Control Flow: The PC register helps manage the flow of control by


indicating the memory address of the next instruction to be executed.

• Function Calls and Subroutines: In some architectures, a register like the


Stack Pointer is used to manage the stack, which is crucial for function
calls and handling subroutines.

• Cache Memory: In the context of cache memory, certain levels of cache


may use registers for faster access to frequently used data.

82 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Cache Memory

• Cache memory is a small-sized type of volatile computer memory


that provides high-speed data access to a processor and stores
frequently used computer programs, applications, and data.

• It acts as a buffer between the main memory (RAM) and the


central processing unit (CPU).

83 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Cache Memory

• Cache memory is designed to bridge the speed gap between the


relatively slow main memory and the fast processor, thereby
improving overall system performance.

• Key Characteristics and Functions of Cache Memory include the


following;

84 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Cache Memory

• Speed: Cache memory is much faster than main memory (RAM). It


provides rapid access to frequently used instructions and data,
reducing the time the CPU spends waiting for data.

• Proximity to CPU: Cache memory is located directly on or very


close to the CPU chip, minimizing the distance data needs to travel
between the processor and memory.

85 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Cache Memory

• Capacity: Cache memory has a limited capacity compared to main


memory. It typically stores a subset of the most frequently
accessed data and instructions.

• Levels of Cache: Modern CPUs often have multiple levels of cache,


denoted as L1, L2, and sometimes L3. L1 is the closest to the CPU,
and each subsequent level is larger but slower.

86 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Cache Memory

• Cache Lines: Cache memory is divided into smaller units called


cache lines. Each cache line stores a block of data, and when the
CPU accesses a specific memory location, it fetches an entire cache
line into the cache.

• Cache Hit: When the CPU requests data, and it is found in the
cache, it is called a cache hit. This results in faster access times.

87 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Cache Memory

• Cache Miss: If the required data is not in the cache, it is called a


cache miss, and the data must be retrieved from the slower main
memory.

• Associativity: Cache memory can be organized with different levels


of associativity (Direct-Mapped, Set-Associative, Fully Associative),
determining how the CPU searches for data within the cache.

88 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Cache Memory

• Write Policies (Write-Through, Write-Back) : Cache memory may


use different write policies.

• In a write-through policy, data is written to both the cache and


main memory simultaneously.

• In a write-back policy, data is initially written only to the cache, and


the main memory is updated later.

89 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Main Memory

• Main memory is the primary storage for instructions and data.

• It is larger and slower than cache memory.

• Main memory is volatile, meaning that its contents are lost when
power is lost.

90 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy
Secondary Storage

• Secondary storage is used to store data permanently.

• It is slower and less expensive than main memory.

• Secondary storage is non-volatile, meaning that its contents are


not lost when power is lost.

91 CS211 - ICT Fundamentals (Autumn 2023)


Memory Hierarchy

• The memory hierarchy is designed to exploit the principle of


temporal and spatial locality, ensuring that the most frequently
used data is stored in the fastest and most accessible memory
levels.

• This hierarchy improves overall system performance by minimizing


the time spent waiting for data to be fetched from slower storage.

92 CS211 - ICT Fundamentals (Autumn 2023)


Input/Output (I/O) Devices
4.4

93 CS211 - ICT Fundamentals (Autumn 2023)


I/O Devices

• Input/Output (I/O) devices play a pivotal role in the interaction


between users and microcomputers.

• I/O devices allow the computer to interact with the outside world.

• This section explores various input and output devices, highlighting


their functions and significance in enhancing user experience.

94 CS211 - ICT Fundamentals (Autumn 2023)


I/O Devices

• There are two main types of I/O devices:

• Input devices allow the user to input data into the computer, such
as keyboards, mice, and touchscreens.

• Output devices allow the computer to output data to the user,


such as monitors, printers, and speakers.

95 CS211 - ICT Fundamentals (Autumn 2023)


I/O Devices
Input Devices
• Keyboard: A device that allows the user to enter text, numbers,
symbols, and commands by pressing the relevant keys. It can be either
wired or wireless, and can have different layouts, such as QWERTY,
AZERTY, or DVORAK.
• Mouse: A device that allows the user to move a pointer on the screen
and select items by clicking the buttons. It can be either wired or
wireless, and can have different shapes, sizes, and features, such as
optical, laser, or trackball.
96 CS211 - ICT Fundamentals (Autumn 2023)
I/O Devices
Input Devices

• Touchpad: A device that allows the user to control the pointer on the
screen by sliding a finger on a sensitive surface. It can be either built-in
or external, and can have different gestures, such as tapping, scrolling,
or zooming.

• Barcode reader: A device that allows the user to input data encoded in a
barcode into the computer. It can be either handheld or fixed, and can
use different technologies, such as laser, CCD, or RFID.
97 CS211 - ICT Fundamentals (Autumn 2023)
I/O Devices
Input Devices

• Microphone: A device that allows the user to input sound or voice into
the computer. It can be either built-in or external, and can have different
types, such as dynamic, condenser, or ribbon.

• Scanner: A device that allows the user to input images or documents


into the computer. It can be either flatbed or handheld, and can have
different resolutions, formats, and modes, such as color, grayscale, or
black and white.
98 CS211 - ICT Fundamentals (Autumn 2023)
I/O Devices
Input Devices
• Webcam: A device that allows the user to input video or images into the
computer. It can be either built-in or external, and can have different
resolutions, frames per second, and features, such as autofocus, face
detection, or night vision.
• Joystick: A device that allows the user to input direction and movement
into the computer. It can be either wired or wireless, and can have
different shapes, buttons, and axes, such as analog, digital, or force
feedback.
99 CS211 - ICT Fundamentals (Autumn 2023)
I/O Devices
Input Devices

• Biometric scanner: A device that allows the user to input personal


identification data into the computer. It can use different methods, such
as fingerprint, iris, or face recognition.

• MIDI keyboard: A device that allows the user to input musical notes and
commands into the computer. It can have different numbers of keys,
knobs, and sliders, and can use different protocols, such as MIDI, USB,
or Bluetooth.
100 CS211 - ICT Fundamentals (Autumn 2023)
I/O Devices
Output Devices

• Video monitor: A device that displays images and text on a screen. It can
be either a cathode ray tube (CRT) monitor or a flat-panel monitor, such
as a liquid crystal display (LCD) or a light-emitting diode (LED) monitor.

• Printer: A device that produces a hard copy of the data on paper or


other media. It can be either an inkjet printer, a laser printer, a dot
matrix printer, or a thermal printer.

107 CS211 - ICT Fundamentals (Autumn 2023)


I/O Devices
Output Devices

• Speaker: A device that converts electrical signals into sound waves. It


can be either a built-in speaker or an external speaker connected to the
computer.

• Haptic device: A device that provides feedback to the user through


touch or motion. It can be either a glove, a joystick, a steering wheel, or
a game controller, and can have different levels of force and vibration.

108 CS211 - ICT Fundamentals (Autumn 2023)


I/O Devices
Output Devices

• Headphone: A device that delivers sound to the ears of the user. It


can be either wired or wireless, and can have different features
such as noise cancellation, microphone, or volume control.

• Projector: A device that projects an image onto a large screen or a


wall. It can be either a digital projector or an analog projector, and
can have different resolutions, brightness, and contrast.

109 CS211 - ICT Fundamentals (Autumn 2023)


I/O Devices
Output Devices

• Plotter: A device that draws graphs, diagrams, or other images using


pens or other tools. It can be either a drum plotter or a flatbed plotter,
and can have different sizes and speeds.

• Braille printer: A device that prints text in Braille, a system of raised dots
that can be read by touch. It can be either a single-sided or a double-
sided printer, and can have different speeds and paper sizes.

110 CS211 - ICT Fundamentals (Autumn 2023)


I/O Devices
Output Devices
• Virtual reality headset: A device that creates a simulated environment
for the user. It can be either a standalone device or a device connected
to a computer or a smartphone, and can have different features such as
motion tracking, eye tracking, or audio.
• 3D printer: A device that creates physical objects from digital models. It
can use different materials such as plastic, metal, or ceramic, and
different methods such as fused deposition modeling (FDM),
stereolithography (SLA), or selective laser sintering (SLS).
111 CS211 - ICT Fundamentals (Autumn 2023)
System Bus
4.5

112 CS211 - ICT Fundamentals (Autumn 2023)


System Bus

• A system bus is a set of wires or traces that connect the main


components of a microcomputer, such as the CPU, memory, and I/O
devices

• It allows the data, address, and control signals to flow between these
components, enabling the microcomputer to function as a coherent
system.

• It can be divided into three types of lines: data, address, and control.

114 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Data lines

• These are the lines that carry the binary information between the
CPU, memory, and I/O devices.

• They are bidirectional, meaning that they can transfer data in both
directions.

115 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Data lines

• The number of data lines determines the word size of the


microcomputer.

• A word is the amount of data that can be transferred in one


operation.

• For example, a microcomputer with 8 data lines can transfer 8 bits


or one byte at a time.

116 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Address lines

• These are the lines that carry the memory or I/O device address
that the CPU wants to access.

• They are unidirectional, meaning that they can only transfer data
from the CPU to the memory or I/O devices.

117 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Address lines

• The number of address lines determines the address space of the


microcomputer.

• The address space is the maximum amount of memory or I/O


devices that can be accessed.

• For example, a microcomputer with 16 address lines can access up


to 2^16 or 65,536 bytes of memory or I/O devices.

118 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Control lines

• These are the lines that carry the control and timing signals that
coordinate the operations of the CPU, memory, and I/O devices.

• They can be either unidirectional or bidirectional, depending on the


type of signal.

119 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Control lines

• Some examples of control signals are memory read, memory write,


I/O read, I/O write, bus request, bus grant, etc.

• Some examples of timing signals are clock, wait, ready, etc.

120 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Types of System Buses

• A system bus can have different designs and architectures,


depending on the performance and complexity of the
microcomputer.

• Some common types of system buses are:


• Single Bus
• Multiple Bus
• Hierarchical Bus

121 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Types of System Buses

• Single bus: This is the simplest and most common type of system
bus, where all the components are connected to a single set of
lines.

• It is easy to implement and expand, but it has low speed and high
contention, as only one component can use the bus at a time.

122 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Types of System Buses

• Multiple bus: This is a type of system bus where there are more than
one set of lines, each dedicated to a specific function or component.

• For example, there can be separate buses for data, address, and control,
or separate buses for CPU, memory, and I/O.

• This can improve the speed and reduce the contention of the system
bus, but it also increases the cost and complexity of the microcomputer.

123 CS211 - ICT Fundamentals (Autumn 2023)


System Bus
Types of System Buses
• Hierarchical bus: This is a type of system bus where there are different levels
of buses, each with different speeds and capacities.

• For example, there can be a high-speed bus that connects the CPU and the
cache memory, a medium-speed bus that connects the main memory and the
I/O controllers, and a low-speed bus that connects the peripheral devices.

• This can optimize the performance and efficiency of the system bus, but it also
requires more logic and coordination among the buses.

124 CS211 - ICT Fundamentals (Autumn 2023)


Conclusion

• Microcomputer architecture is a complex but important topic.

• Understanding the architecture of microcomputers is essential for


developing and using these devices effectively.

• By studying microcomputer architecture, you can gain a deeper


understanding of how computers work and how to make the most
of their capabilities.

125 CS211 - ICT Fundamentals (Autumn 2023)


• https://www.computerscience.gcse.guru/theory/von-neumann-
architecture

126 CS211 - ICT Fundamentals (Autumn 2023)


Any Questions?

127 CS211 - ICT Fundamentals (Autumn 2023)


Next
Chapter 5: Computer Software

128 CS211 - ICT Fundamentals (Autumn 2023)

You might also like