www.mustuniversity.
tn
Introduction to Computer
Architecture
Dr. Soura Boulaares
Fall 2025
What is a Computer System?
A computer system is more than just a machine; it's
a dynamic digital electronic device capable of
performing diverse operations based on programmed
instructions.
At its core, a computer system is an integrated blend of
both hardware (the physical parts you can touch) and
software (the intangible programs and instructions
that bring it to life).
Its primary purpose is to process raw data and transform it into meaningful, actionable information.
2
Course Foundations
What is Computer Architecture?
Computer Architecture is the comprehensive science and art of designing, selecting, and interconnecting hardware
components to create a cohesive and functional computer system. It dictates how software interacts with hardware and
ultimately defines the performance and capabilities of any computing device.
Course Foundations
What is Computer Architecture?
Computer Architecture is the comprehensive science and art of designing, selecting, and interconnecting hardware components to
create a cohesive and functional computer system. It dictates how software interacts with hardware and ultimately defines the
performance and capabilities of any computing device.
Instruction Set Microarchitecture Hardware Implementation
Architecture (ISA)
The specific implementation of an ISA The physical realization of the
The abstract interface between within a processor. This includes microarchitecture, encompassing the
hardware and software, defining the aspects like pipelining, caching, and actual electronic circuits, logic gates,
set of instructions a processor can execution units, determining how and transistors that make up the
execute. It dictates what a instructions are actually processed. processor and other components.
programmer sees and interacts with.
4
Key Features of Computer Systems
Programmable Data Processing Digital Machine
Computers can be directed to They excel at converting raw, Every operation within a
perform an infinite variety of unorganized data into computer system is
tasks by simply changing their structured, insightful fundamentally based on
software instructions. This information, driving decisions binary code (0s and 1s),
adaptability makes them and understanding across all allowing for consistent and
incredibly versatile tools. fields. precise calculations.
5
Core Characteristics
Accuracy
Speed
Delivers precise, error-free results.
Executes millions of instructions per
second.
Automation
Performs tasks automatically
once programmed.
Versatility
Capable of performing a wide range Storage
of tasks. Retains vast amounts of data for long
periods.
6
The Duality of a Computer System
Hardware Software
The physical, tangible components that form the foundation of the computer:
The intangible set of instructions and programs that tell the
hardware what to do:
• Central Processing Unit (CPU): The "brain" of the computer.
• • Operating Systems: (e.g., Windows, macOS, Linux) Manages
Motherboard: The main circuit board connecting all components.
hardware and software resources.
• Random Access Memory (RAM): Temporary data storage.
• Application Software: (e.g., Word processors, web browsers,
• Storage Devices: (e.g., Hard Disk Drive, Solid State Drive) For
games) Performs specific user tasks.
permanent data storage.
• System Software: Utilities and drivers that support the OS and
• Input Devices: (e.g., Keyboard, Mouse) For user interaction.
applications.
• Output Devices: (e.g., Monitor, Printer) For displaying results.
7
The Flow: How a Computer Works
Input Processing
Users provide data or commands through various The CPU executes instructions, performs calculations,
input devices (keyboard, mouse, microphone). and manipulates the input data.
Storage Output
Data is temporarily held in RAM during processing Processed data is presented back to the user via
and can be permanently saved to storage devices. output devices (monitor, printer, speakers).
8
Understanding Computer System Architecture
The foundation of modern computing lies in the Von Neumann Architecture.
This model describes a system where a single shared memory stores both instructions and data, and the
CPU fetches them from this memory.
Key Components of the Architecture:
Arithmetic Logic Unit (ALU)
Performs arithmetic and logical operations.
Control Unit (CU)
Manages and coordinates system components.
Memory Unit
Stores data and program instructions.
Input/Output Units
Handles communication with external devices.
9
Diverse Types of Computer Systems
By Data Processing: By Size and Performance:
• Analog Computers: Process continuous data (e.g., • Supercomputers: Extremely powerful, used for
temperature, pressure). Used in specialized complex scientific calculations (weather forecasting,
applications like flight simulators. • research).
Mainframe Computers: Large, high-performance
• Digital Computers: Process discrete data (binary machines for large-scale data processing in big
0s and 1s). These are the most common type, organizations (banks, government).
handling text, images, and numbers. • Minicomputers: Smaller than mainframes but
• Hybrid Computers: Combine features of both more powerful than PCs, often used as servers in
analog and digital, often used in hospitals or mid-sized businesses.
industrial control systems. • Personal Computers (PCs): Desktops, laptops,
tablets – designed for individual use, balancing
performance and cost.
10
The Fundamental Functions of Any Computer
01 02
Input Function Processing Function
Receiving data and instructions from the user or other Performing calculations, manipulations, and logical
systems. This is the starting point of any computational operations on the received data according to
task. programmed instructions.
03 04
Storage Function Output Function
Saving data and programs, whether temporarily for Delivering the processed results back to the user or
immediate use (RAM) or permanently for future retrieval other systems in a comprehensible format (e.g., display
(hard drives, SSDs). on screen, printout, audio).
11
Conclusion & Next Steps
Key Takeaways:
A computer system is a harmonious integration of
hardware and software, engineered to perform a vast
array of tasks with incredible speed, accuracy, and
versatility.
Understanding its core components, how they interact, and
the fundamental Von Neumann architecture provides a
crucial foundation for any computer science student or Deepen Your Knowledge:
curious learner.
• Explore Computer Programming to learn how to
create software.
• Dive into Operating Systems to understand how
hardware and software communicate.
• Investigate Networking to see how computers connect
and share information.
• Consider Data Structures & Algorithms for efficient
problem-solving.
12
Why It Matters
Why Study Computer Architecture?
Understanding computer architecture is fundamental for all computer science and engineering students. It provides the crucial link
between the abstract world of software and the tangible reality of hardware. By grasping these principles, you gain insights into
system performance, power consumption, and cost trade-offs, enabling you to design more efficient and innovative solutions.
It is a bridge that connects: Crucial for careers in:
• Software development to hardware capabilities • IoT & Embedded Systems: Optimizing for low-power and
• Algorithm design to execution speed specialized tasks.
• • AI Accelerators: Designing GPUs, TPUs, and specialized
System design to real-world limitations
hardware for machine learning.
• Cloud & Edge Computing: Building efficient server
infrastructures and distributed systems.
• Cybersecurity: Understanding hardware vulnerabilities
and protections.
13
Key Principles
Eight Great Ideas in Computer Architecture
These foundational principles, outlined by Patterson & Hennessy, guide the design of almost all modern computer systems. They represent key
insights that have driven decades of innovation and continue to shape the future of computing.
1 Design for Moore’s Law
Plan for exponential growth in transistor density and performance.
2 Use Abstraction to Simplify Design
Manage complexity by hiding lower-level details, creating layers of abstraction.
3 Make the Common Case Fast
Optimize for frequently occurring operations, as they dominate overall performance.
4 Performance via Parallelism
Achieve higher throughput by performing multiple tasks simultaneously.
5 Performance via Pipelining
Overlap instruction execution steps to improve instruction throughput.
6 Performance via Prediction
Guess outcomes to avoid stalls, correcting if the prediction is wrong.
7 Hierarchy of Memories
Employ different types of memory with varying speeds, costs, and capacities.
8 Dependability via Redundancy
Include duplicate components or information to ensure reliability against failures. 14
Laying the Groundwork: Design
Principles
Moore's Law Abstraction Common Case
Anticipating exponential growth in Simplifying complex systems Optimizing for the most frequent
transistor density and through layered design. operations to maximize gains.
performance.
15
Design for Moore's Law
Moore's Law, observed by Intel co-founder Gordon Moore,
states that the number of transistors on a microchip doubles
approximately every 18 to 24 months. This isn't just about
cramming more components onto a chip; it implies an
exponential growth in computational power and integration.
For computer engineers, this means designing systems with
the expectation of continuous, rapid technological
advancement. Systems must be inherently scalable, capable of
leveraging faster CPUs, more cores, and shrinking process
technologies without requiring fundamental redesigns.
Key Takeaway: Future-proof your designs by anticipating exponential performance increases rather than static capabilities.
16
Idea in Action
Abstraction in Practice
Abstraction is a powerful principle that allows complex systems to be built and managed. Each layer hides the intricate details of the layer below it, presenting a simpler interface to
the layer above. This modularity enables developers to focus on specific tasks without being overwhelmed by the entire system's complexity.
Application
User-facing programs and services
Operating System
Resource management and APIs
Instruction Set
Machine language interface
Microarchitecture
Pipelines, caches, and control logic
Hardware Gates
Transistors and logic circuits
Consider a program written in C. It gets compiled into assembly language, which then executes on a specific Instruction Set Architecture (ISA). The ISA is implemented by the 17
microarchitecture, which in turn is built from physical hardware gates. This layering fosters productivity and allows for scalable system design.
Make the Common Case Fast
This principle dictates that system architects should prioritize optimizing the most
frequently occurring operations. Small improvements applied to tasks that happen
thousands or millions of times per second yield disproportionately large overall
performance gains.
A classic example is the use of cache memory. Data that is accessed frequently is stored in
a small, fast cache close to the CPU, reducing the need to fetch it from much slower main
memory. While the cache is more expensive, its benefit for common data access patterns
far outweighs the cost.
Rule of Thumb: Don't optimize a rare case first. Focus your engineering efforts where
they will have the most impact.
18
Boosting Performance: Speed
and Efficiency
Parallelism Pipelining Prediction
Executing multiple tasks Overlapping instruction stages for Guessing future actions to reduce
simultaneously for higher continuous processing. latency and stalls.
throughput.
19
Idea in Action
Performance via Parallelism
Parallelism is about doing multiple things at once to speed up overall computation. It's a fundamental concept in modern computer
architecture, driving performance improvements across various domains from consumer devices to massive data centers.
In the Real World
• Multi-Core CPUs: Most modern processors have multiple cores,
allowing them to run several programs or parts of a single
program concurrently. This is crucial for multitasking on your
laptop or running complex applications.
• GPUs (Graphics Processing Units): Originally designed for
rendering graphics, GPUs now have thousands of specialized
cores that can perform many simple calculations in parallel. This
•makes them ideal
Machine for: Training: Accelerating the massive
Learning
matrix multiplications required for training AI models.
• Video Rendering: Processing individual frames or pixels
simultaneously to create smooth animation.
• Distributed Systems: Cloud computing relies heavily on
parallelism, where tasks are distributed across many servers to
handle large workloads efficiently.
20
Idea in Action
Performance via Pipelining
Pipelining is an optimization technique that overlaps the execution of multiple instructions. Instead of waiting for one instruction to
completely finish before starting the next, a pipeline allows different stages of instruction processing (e.g., fetch, decode, execute,
write-back) to occur concurrently for different instructions.
Think of it like an assembly line: each worker (or stage) performs a specific task on a different product (or instruction) at the same
time. While it doesn't reduce the time for a single instruction to complete, it significantly increases the throughput of instructions
over time.
This technique is foundational to modern CPU design, enabling processors to execute billions of instructions per second and
contribute to the overall speed of computing devices, from smartphones to supercomputers.
21
Performance via Pipelining and Prediction
Pipelining Prediction
Pipelining optimizes instruction execution by To avoid costly delays (stalls) in pipelines, CPUs
breaking down tasks into a series of employ prediction techniques. The most common is
overlapping stages, much like an assembly line. branch prediction, where the processor guesses the
While each instruction still takes the same total time outcome of a conditional jump (a "branch") and
to complete, a new instruction can start before the speculatively executes instructions along the
previous one is finished. predicted path.
Modern CPUs extensively use pipelining, dividing If the prediction is correct, significant time is saved. If
instruction processing into stages like Fetch, Decode, incorrect, the mis-speculated work is discarded, and
Execute, and Write-back. This significantly improves the correct path is taken, but the overall benefit of
the instruction throughput – the number of successful predictions outweighs the cost of
instructions completed per unit of time – without mispredictions, leading to improved instruction flow
increasing the clock speed. and efficiency.
22
Robustness: Memory and Reliability
Memory Hierarchy Redundancy
Balancing speed, cost, and capacity. Adding components to ensure dependability.
23
Idea in Action
Memory Hierarchy
The "Hierarchy of Memories" principle recognizes that memory systems have varying speeds, costs, and capacities. By organizing memory
into a hierarchy, computer architects can provide the illusion of a large, fast, and inexpensive memory to the processor.
Registers Cache Memory (L1, L2, L3)
Smallest, fastest memory directly within the CPU.
Small, fast memory closer to the CPU, storing
Costliest per bit.
frequently accessed data from main memory.
Main Memory (RAM) Secondary Storage (SSD/HDD)
Largest, slowest, and cheapest. Used for long-term
Larger, slower than cache, but faster than
data storage.
secondary storage. Holds active programs and
data.
The core idea is "keep data close to the processor." Data frequently used is moved to faster, smaller, and more expensive levels closer to
the CPU, reducing access latency and improving overall system performance.
24
Idea in Action
Dependability via Redundancy
Ensuring system reliability in the face of component failures is critical, especially for mission-critical applications. The principle of
"Dependability via Redundancy" achieves this by including duplicate components or information, so if one part fails, another can take over.
• Error Correction Codes (ECC Memory): Used in servers and
high-end workstations, ECC RAM can detect and correct memory
errors on the fly. This prevents data corruption due to random
bit flips, which is essential for stable operations.
• RAID (Redundant Array of Independent Disks): Various
RAID configurations distribute data across multiple hard drives.
If one drive fails, the data can be reconstructed from the
remaining drives, preventing data loss and ensuring continuous
• operation.
Fault-Tolerant Systems: In critical applications like aerospace,
medical devices, or financial transactions, systems often employ
complete duplication of processors, power supplies, and other
components. If one component fails, a redundant component
immediately takes its place without interrupting service.
This principle is vital for systems where downtime or data loss is unacceptable, ensuring continuous operation and data integrity even in the
presence of hardware failures.
Putting it all together
Course Overview & Next Steps
This course will cover foundational computer architecture concepts, including Instruction Set Architectures (ISA), performance
metrics, memory hierarchy, and advanced topics like parallelism and pipelining. We'll also explore emerging trends that leverage
architectural innovations, such as IoT, AI hardware, and cloud computing.
Assessments & Lab Session
Your understanding will be assessed through quizzes, hands-on labs, a final project, and an exam.
Next: Practical Lab with Aziz Souiai
Our first lab session will be a hands-on introduction to CS.
Remember to complete Chapter 1 of Patterson & Hennessy as a foundational reading. We look forward to a semester of exploring
the fascinating world inside your computer!
Thank
you!
Questions welcome
www.mustuniversity.tn
27