Chapter I CAO
Chapter I CAO
College (ATTC)
Menschen fuer Menschen Foundation
CHAPTER ONE
INTRODUCTION
BY
Mr. Chala Tesfaye 11/28/2024
❑ Output Unit
❑ Memory
❑ Bus Structure
3 3
Big picture
COMPUTER FUNCTIONS
1. Input Unit
❑ The input unit allows for the entry of data and instructions into the computer system.
❑ It converts these inputs into a machine-readable binary format that can be understood by
the CPU for processing.
❑ Examples:
❖ Keyboard: Used for text input.
❖ Mouse: Controls the pointer on the screen, helping the user interact with the system.
❖ Scanner: Converts physical documents or images into digital data.
❖ Microphone: Converts sound into a digital audio format for processing.
4 4
❖ Touchpad: Allows gesture-based control on laptops or other devices, similar to a
mouse.
….COMPUTER FUNCTIONS
2. Output Unit
❑ The output unit is responsible for converting the processed binary data into a human-
readable format.
❑ It presents the results of processing to the user in a format they can understand (visual,
auditory, or physical).
❑ Examples:
❖ Monitor: Displays visual output (text, graphics, videos).
❖ Printer: Converts digital information into printed form.
❖ Speakers: Output sound or audio. 5 5
❖ Control Unit (CU): This unit directs the flow of data within the CPU and coordinates the
computer system's operations by sending control signals.
❖ Registers are small, fast storage locations within the CPU that temporarily hold data and
6 6
instructions for quick processing.
….COMPUTER FUNCTIONS
4. ALU and Control Unit
❑ Arithmetic and Logic Unit (ALU):
❖ Handles all the mathematical and logical operations within the CPU.
❑ Control Unit (CU):
❖ Data Processing: Coordinates the processing of data, ensuring the correct instructions are
executed.
❖ Data Movement: Moves data between the memory, CPU, and peripheral devices.
❖ Data Storage: Manages both temporary (RAM) and permanent (ROM, hard drives) data
storage.
❖ Control: The CU sends control signals to regulate CPU and system operations.
❖ Registers: High-speed temporary storage used for quick access to data during processing.
❖ Fetch and Decode: The CU fetches instructions from memory, decodes
7 them, and directs 7
❑ ROM (Read-Only Memory): Non-volatile memory used to store permanent data and 8
programs that do not change, typically used for system boot-up instructions.
….COMPUTER FUNCTIONS
6. Bus Structure
❑ The bus structure is a communication pathway that facilitates the transfer of data between
the CPU, memory, and peripheral devices.
❑ Types of Buses:
❖ Data Bus: Carries the actual data being transferred between
components.
❖ Address Bus: Carries the memory addresses, which are used
to locate data in the system's memory.
❖ Control Bus: Carries control signals that manage read/write 9
15 15
…CATEGORIES OF COMPUTER
1. Microcomputers (Personal Computers)
❑ Designed for individual use with processing and storage units, visual display and audio
units, and input devices like keyboards.
❖ Includes: Desktops, laptops, tablets, and personal devices.
❖ Characteristics: Low cost, moderate computational power suitable for general tasks.
❖ Use Cases: Personal tasks, education, home offices, and entertainment.
❖ Advantages: Cost-effective, easy to operate, suitable for general-purpose educational or
business applications.
2. Workstations
❑ More powerful than microcomputers and often used by professionals.
❖ Examples: High-end personal computers used in specialized fields.
❖ Characteristics: Higher cost, better performance, and designed for tasks requiring higher
computational power, such as graphics, engineering, and scientific work.
16 16
❖ Applications: Solving complex problems in fields like computer-aided design (CAD),
computer-aided manufacturing (CAM), and scientific simulations.
…CATEGORIES OF COMPUTER
3. Minicomputers
❖ Purpose: Mid-range computers that can support multiple users simultaneously.
❖ Characteristics: More powerful than workstations but less powerful than mainframes, suitable
for small to medium-sized organizations.
❖ Applications: Data processing, industrial control, and other tasks that require multi-user
support.
4. Mainframes
❖ Purpose: Large, powerful computers used by large organizations for bulk data processing and
complex applications.
❖ Characteristics: High cost and high performance, capable of supporting many simultaneous
users.
❖ Applications: Industries like banking, insurance, government, and large-scale enterprise
17 17
systems.
…CATEGORIES OF COMPUTER
5. Supercomputers:
❖ Purpose: Extremely powerful computers designed for complex computations at very high
speeds.
❖ Characteristics: Very high cost and computational power, used for tasks requiring massive
processing capabilities.
❖ Applications: Climate modeling, scientific research, large-scale simulations, and military
applications.
❖ Examples: Used for aircraft design, weather forecasting, and computational physics.
6. Other Specialized Computers:
❖ Embedded Systems: Dedicated computers built into other devices like cars, appliances, and
medical devices to perform specific tasks.
❖ Servers: Provide services to other computers or devices in a network,
18
managing tasks like 18
hosting websites, data storage, and network management.
GENERAL COMPUTER ORGANIZATION
19 19
…GENERAL COMPUTER ORGANIZATION
❑ Input: Devices like keyboards, mice, scanners, and microphones that provide data and
commands to the computer for processing.
❑ Output: Devices such as monitors, printers, and speakers that present processed data to
the user.
❑ Control Unit (CU): Manages the operations of the processor by fetching, decoding, and
executing instructions, controlling data flow between memory and the CPU.
❑ Arithmetic Logic Unit (ALU): Performs arithmetic and logical operations on data,
processing the results for storage or further use.
❑ Processor (CPU): The core of the computer, consisting of the ALU and CU, is
responsible for executing instructions and controlling system operations.
❑ Accumulator: A register in the CPU that temporarily holds intermediate results from
operations before they are stored or further processed.
20 20
21 21
…ELECTRONIC COMPUTERS
1st Generation (1945 – 1955): Vacuum Tubes and Relays
❑ Vacuum Tubes and Relays: Used as electronic switches to control electricity flow, vacuum tubes
were the core technology for data processing.
❑ Stored Program Concept: Introduced by John von Neumann, this allowed data and program
instructions to be stored in the same memory, enabling automatic fetching and execution of
instructions.
❑ Large Size and High-Power Consumption: Early computers were large, often room-sized, and
consumed significant power due to the inefficiency of vacuum tubes.
❑ Programming: Early programs were written in machine or assembly language, requiring deep
knowledge of hardware and being more difficult to work with.
❑ Slow Processing Speed: Early computers were slow in computations, limiting their performance
compared to later advancements.
❑ Storage: Data and programs were stored using magnetic core memory and magnetic tapes.
❑ Examples:
❖ Electronic Numerical Integrator and Computer (ENIAC): One of the first general-purpose
computers, used for military and scientific calculations, relying on vacuum tubes.
22 22
❖ Electronic Discrete Variable Computer (UNIVAC): A commercial computer that used
vacuum tubes, one of the first to be used for business applications.
ELECTRONIC COMPUTERS
2nd Generation (1955 – 1965): Discrete Transistors
❑ Transistors: Vacuum tubes were replaced with transistors, which were much smaller, more
reliable, and consumed less power.
❑ This advancement dramatically improved the size and performance of computers.
❑ High-Level Programming Languages (HLL): Languages like FORTRAN and COBOL were
developed, making programming more accessible and less dependent on machine-level code.
❑ Compilers: The introduction of compilers allowed programs written in high-level languages to be
translated into machine code, facilitating easier software development.
❑ Parallel Processing: Systems with separate I/O processors were developed to enhance the
performance of the CPU by handling input/output operations concurrently.
❑ Examples:
• IBM 7090: A scientific and business computer that utilized transistors, offering better performance
and reliability than earlier machines.
23 23
• UNIVAC 1107: A commercial computer that marked the transition from vacuum tube-based
systems to transistor-based technology.
ELECTRONIC COMPUTERS
3rd Generation (1965 – 1975): Integrated Circuits (ICs)
❑ Integrated Circuits (ICs): Multiple transistors were combined into a single chip, drastically reducing the size
and cost of computers while improving their processing speed.
❑ Multiprogramming: The ability to run multiple programs at once increased system efficiency and allowed
computers to perform several tasks simultaneously.
❑ Pipelining: The use of pipelining techniques allowed for better CPU performance, increasing processing speed
by executing instructions in parallel stages.
❑ Operating Systems (OS): The development of operating systems like DOS (Disk Operating System) allowed
better management of system resources and enabled multiple users to access the computer efficiently.
❑ Virtual Memory and Cache: New techniques in memory management allowed for the use of virtual memory
and cache to improve data access speeds.
❑ Examples:
❖ IBM (International Business Machines Corporation) 360: A family of computers that incorporated integrated
circuits and were among the first to support multiple applications, including business, scientific, and engineering
tasks.
24 24
❖ DEC PDP (Digital Equipment Corporation Programmed Data Processor)-8: A pioneering minicomputer that
was much smaller and affordable compared to mainframe systems, making computing more accessible.
ELECTRONIC COMPUTERS
4th Generation (1975 – 1985): Microprocessors and Large-Scale Integration (LSI)
❑ Microprocessors: The development of microprocessors integrated the entire CPU onto a single chip, thanks to
large-scale integration (LSI) technology, reducing the size and cost of computers.
❑ Workstations and Personal Computers (PCs): Microprocessor technology led to the creation of personal
computers (PCs) and workstations, bringing computing power to individuals and small businesses.
❑ High-Speed Processing: The introduction of faster processors resulted in a dramatic increase in computational
performance, making computers exponentially more efficient.
❑ Networking: The rise of LANs (Local Area Networks), MANs (Metropolitan Area Networks), and WANs
(Wide Area Networks) allowed for improved communication between computers and the growth of the internet.
❑ Specialized Processors: New types of processors, such as Digital Signal Processors (DSPs), were developed for
specific tasks like audio and video processing.
❑ Examples:
• Intel 4004: The first commercially available microprocessor, marking the beginning of the microprocessor era and
the development of smaller, more affordable computing devices.
• Apple Macintosh: A popular personal computer that introduced the graphical user interface (GUI), making
computing more user-friendly.
25 25
• IBM PC: One of the first PCs that used microprocessors, making computing accessible to individuals and small
businesses.
ELECTRONIC COMPUTERS
Beyond the 5th Generation (1985 – Present)
❑ Advanced E-Commerce and E-Banking: The rise of the Internet and digital services has
transformed commerce and financial systems, enabling online shopping and digital banking.
❑ Faster Processors: The development of GHz-speed processors has significantly improved
computing power, allowing for more complex calculations and faster processing.
❑ Submicron IC Technology: Advances in semiconductor technology, allowing for smaller, more
powerful chips with increased performance and features.
❑ Mobile Computing: The development of mobile devices like smartphones, tablets, and laptops
has made computing portable and accessible at any time and place.
❑ Examples:
❖ ARM (Advanced RISC Machine), AMD (Advanced Micro device), Intel: Leading companies that
continue to drive the development of high-speed processors for personal and embedded computing.
❖ Mobile Devices: Devices such as smartphones and laptops, 26 26
TERMINOLOGIES
❑ Computer: A device that accepts input, processes data, stores data, and produces output
based on a series of stored instructions.
❑ Hardware: The physical electronic and mechanical components of a computer system,
including the computer and peripheral devices, that perform data processing.
❑ Software: A set of instructions or programs that guide the computer on how to perform
specific tasks.
❑ Network: A system that connects two or more computers and devices, enabling the
sharing of data and resources.
❑ Peripheral Devices: External devices that expand a computer's input, output, and storage
capabilities, such as keyboards, monitors, and external drives.
27 27
❑ Input: Data or instructions entered into a computer system for processing.
…TERMINOLOGIES
❑ Data: Symbols or raw facts representing objects, ideas, or events.
❑ Memory: A temporary storage area in a computer for holding data during processing,
storage, or output operations.
❑ Storage: The location where data is permanently saved for long-term access when not in
28 28
active use.
PERFORMANCE AND COST
❑ Purchasing Perspective (Choosing a Machine):
❖ Best Performance: The machine that completes tasks the fastest, ideal when speed is the
priority.
❖ Least Cost: The most affordable machine, providing basic functionality without exceeding
your budget.
❖ Best Performance / Cost: The machine offers the best value, balancing good performance
with a reasonable price.
❑ Design Perspective (Designing a System):
❖ Best Performance Improvement: The design that most enhances the system's performance,
such as faster processors or better memory.
❖ Least Cost: The cheapest design, though it may compromise performance.
❖ Best Performance / Cost: A design that maximizes performance without incurring high costs,
offering the best balance of speed and affordability.
❑ Both perspectives rely on metrics for evaluation to compare and make
29
informed decisions. 29
❖ These metrics help assess how different machines or designs perform and how much they cost.
…PERFORMANCE AND COST
Two Notions of Performance
1 Time to Complete a Task: The total time taken to complete a task, including all system
processes.
❖ Execution Time: The amount of time a system takes to complete a given task.
❖ Response Time: The total time for a system to react to an input, which includes CPU time, memory
access, I/O operations, and operating system overhead.
❖ Latency: The delay in starting an operation or the time taken to transfer data from one place to another.
2. Tasks per Unit Time: This metric measures how many tasks a system can handle within a
specific time frame.
❖ Performance: Refers to a system's overall ability to complete tasks, typically measured by the speed at
which tasks are processed.
❖ Throughput: The number of tasks a system can process in a given period (e.g., tasks per second).
30 30
❖ Bandwidth: The amount of data the system can handle in a given time, often measured in bits per
second.
MEASUREMENT OF TIME
❑ A computer clock runs at a constant rate and determines when events take place in hardware.
Clk
clock period
❑ Clock cycle time is the duration of one clock cycle, which is the amount of time it takes for one
clock pulse to occur. It’s measured in seconds or fractions of a second (e.g., 5 ns).
❑ Clock Rate is the number of clock cycles that occur per second. It is measured in Hertz (Hz).
❑ CPU Time: This is the total time required by the CPU to execute a program. It can be calculated
as:
𝐶𝑃𝑈 𝑇𝑖𝑚𝑒 = 𝐶𝑃𝑈 𝐶𝑙𝑜𝑐𝑘 𝐶𝑦𝑐𝑙𝑒𝑠 × 𝐶𝑙𝑜𝑐𝑘 𝐶𝑦𝑐𝑙𝑒 𝑇𝑖𝑚𝑒
❑ Where:
❖ CPU Clock Cycles is the total number of clock cycles required to execute the program.
❖ Clock Cycle Time is the time duration of one clock cycle.
❑ Relationship Between Clock Cycle Time and Clock Rate: Since the clock cycle time and
clock rate are reciprocals of each other, we can rewrite the formula as:
31 31
𝐶𝑃𝑈 𝐶𝑙𝑜𝑐𝑘 𝐶𝑦𝑐𝑙𝑒𝑠
𝐶𝑃𝑈 𝑇𝑖𝑚𝑒 =
𝐶𝑙𝑜𝑐𝑘 𝑅𝑎𝑡𝑒
….MEASUREMENT OF TIME
❑CPU Clock Cycles: The total number of CPU clock cycles required to execute a program can be
determined by:
𝐶𝑃𝑈 𝐶𝑙𝑜𝑐𝑘 𝐶𝑦𝑐𝑙𝑒𝑠 = (𝐼𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛𝑠 𝑝𝑒𝑟 𝑃𝑟𝑜𝑔𝑟𝑎𝑚) × (𝐶𝑙𝑜𝑐𝑘 𝐶𝑦𝑐𝑙𝑒𝑠 𝑝𝑒𝑟 𝐼𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 (𝐶𝑃𝐼))
❑ Where:
❖ Instructions per Program refers to the total number of instructions in the program.
❖ CPI (Cycles Per Instruction) is the average number of clock cycles each instruction
takes.
❑ Final Formula: Combining all these, we can express CPU Time as:
𝐶𝑃𝐼
𝐶𝑃𝑈 𝑇𝑖𝑚𝑒 = 𝐼𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 𝐶𝑜𝑢𝑛𝑡 ×
𝐶𝑙𝑜𝑐𝑘 𝑅𝑎𝑡𝑒
32 32
EXAMPLE
1. If a computer has a clock rate of 50 MHz, how long does it take to execute a
program with 1,000 instructions, if the CPI for the program is 3.5?
Using the equation
𝐶𝑃𝐼
𝐶𝑃𝑈 𝑡𝑖𝑚𝑒 = 𝐼𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 𝑐𝑜𝑢𝑛𝑡 𝑥
𝑐𝑙𝑜𝑐𝑘 𝑟𝑎𝑡𝑒
gives
CPU time = 1000 x 3.5 / (50 x 106)
2. If a computer’s clock rate increases from 200 MHz to 250 MHz and the other factors
remain the same, how many times faster will the computer be?
𝐶𝑃𝐼 = 𝐶𝑃𝐼𝑥 𝐹
For example
Operation F CPI CPI x F % Time
ALU 50% 1 .5 23%
Load 20% 5 1.0 45%
Store 10% 3 .3 14%
Branch 20% 2 .4 18%
34 34
Total 100% 2.2 100%
SUMMARY
❑ Computer Architecture includes the design of the Instruction Set Architecture
(programmer’s view) and the Machine Organization (logic designer’s view).
❑ Levels of abstraction, which consist of an interface and an implementation are useful
to manage designs.
❑ Processor performance increases rapidly, but the speeds of memory and I/0 have not kept
pace.
❑ Computer systems are comprised of data path, memory, input devices, output devices,
and control.
❑ Memory systems are designed so that small, fast, and expensive memories are closest to
35 35
the processor.
THANK YOU
36