Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CH 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 46

Chapter 1

Introduction to Microprocessor

____________________________________________
Microprocessor and Assembly
Language Programming
1
What is a microprocessor?
Definition:

single chip

2
What is a microprocessor?
Key function
Control Unit (CU):
Ø The Control Unit interprets instructions from memory and directs the operation of the processor by
coordinating the activities of the ALU, registers, and other components. It essentially acts like the
manager of the processor.
Arithmetic and Logic Unit (ALU):
Ø The ALU is responsible for performing all arithmetic (addition, subtraction, multiplication, division) and
logical operations (comparisons like AND, OR, NOT).
Registers:
Ø Microprocessors contain small, high-speed storage locations called registers that temporarily hold data,
instructions, and addresses for quick access.
Bus System:
Ø Microprocessors use a system of data buses to communicate between various components, such as the
ALU, memory, and input/output devices. Buses allow the transfer of data, instructions, and addresses
between different parts of the system.
Why is it called a "Micro" Processor?
Ø The term "micro" comes from the fact that the processor is highly compact and integrates multiple
processing functions into a single chip. 3
What is a microprocessor?
Common Examples:
ØIntel 4004: The world’s first
commercially available microprocessor
introduced in 1971.
ØIntel 8086: A 16-bit processor used in early personal computers (PCs).
ØARM Cortex: A family of processors used in most smartphones, tablets,
and embedded devices today.
ØAMD Ryzen: A modern multi-core processor used in desktop computers,
laptops, and gaming systems.
4
What is a microprocessor?
Where is it used?
ØMicroprocessors are used in a variety of devices including personal computers,
smartphones, home appliances, cars, and embedded systems.
ØPersonal Computers (PCs): Microprocessors handle all the tasks and
operations in desktops, laptops, and servers.
ØSmartphones and Tablets: Most mobile devices run on ARM-based
microprocessors that handle tasks like running apps, graphics rendering, and
wireless communication.
ØEmbedded Systems: Microprocessors control everyday devices like washing
machines, microwaves, cars, medical devices, and industrial robots.
ØGaming Consoles: Consoles like PlayStation and Xbox use powerful
microprocessors for gaming performance.
ØAutomobiles: Microprocessors control engine functions, infotainment systems,
and safety features like airbags and braking systems.
5
History and Evolution of Microprocessors
Early Computing Devices (Pre-1970s)

Before Microprocessors:

ØVacuum Tubes and Transistors were used in early computers.

ØComputers like the ENIAC (1945) and IBM 1401 were large,
expensive, and consumed a lot of power.

ØThese machines were based on discrete logic circuits, meaning each


component (such as adders, registers, and memory) had its own chip
or circuit.
6
History and Evolution of Microprocessors
The Birth of the Microprocessor (1971)
Intel 4004 (1971):
ØThe first microprocessor created by Intel.
Ø4-bit processor with 2,300 transistors.
ØOriginally designed for use in calculators (e.g., the Busicom calculator).
ØMarked the shift from discrete components to a single chip for processing.
All essential components (ALU, control unit, registers)
were now integrated onto one chip.
Impact:
ØRevolutionized computing by reducing size, cost, and power consumption.
ØSet the stage for personal computers and embedded systems.

7
History and Evolution of Microprocessors
Growth and Commercialization (1970s-1980s)
Intel 8008 (1972):
Ø8-bit processor with 3,500 transistors.
ØIt was used in early microcomputers and embedded systems.
Intel 8080 (1974):
Ø8-bit processor, capable of addressing up to 64 KB of memory.
ØUsed in the Altair 8800, one of the first personal computers.
It became the basis for the
Zilog Z80 and other later microprocessors.

8
History and Evolution of Microprocessors
Growth and Commercialization (1970s-1980s)
Motorola 6800 (1974):
ØAnother influential 8-bit processor.
ØUsed in early home computers, game consoles, and embedded applications.
Shift to 16-bit processors (late 1970s-1980s):
ØAs technology advanced, 16-bit processors like the Intel 8086 (1978) began to
appear.
ØThe 8086 was the precursor to the x86 architecture, which remains the
dominant architecture for personal computers.

9
History and Evolution of Microprocessors
Microprocessors in Personal Computers (1980s)
IBM PC (1981):
Ø IBM's first personal computer used the Intel 8088 microprocessor (a variant of the 8086).
Ø This event marked the rise of the x86 architecture, which would dominate the PC market for
decades.

Apple Macintosh (1984):


Ø Apple's Motorola 68000 microprocessor introduced graphical user interfaces (GUIs) to the
mainstream.
ØIt was 32-bit internally (16-bit externally), a significant step
forward in processing power.
Development of Microprocessor-Based Peripherals:
ØThe 1980s saw microprocessors being used in a variety of consumer
electronics like game consoles, printers, and home appliances.
10
History and Evolution of Microprocessors
The Move to 32-bit and 64-bit Architectures (1990s-Present)
32-bit Era (1990s):
ØThe Intel Pentium (1993) marked the shift to 32-bit computing.
The Pentium integrated advanced
features like pipelining and superscalar architecture.
64-bit Processors:
ØThe transition to 64-bit processors began in the early 2000s (e.g.,
AMD Athlon 64 (2003), Intel Core i7 (2008)).
Ø64-bit processors allow for more memory addressing and better
performance in data-heavy applications.

11
History and Evolution of Microprocessors
Modern Microprocessors (2010s-Present)
Multi-Core Processors:
ØModern processors feature multiple cores (e.g., Intel Core i9, AMD Ryzen)
that allow for parallel processing.
ØThis enables better performance for multitasking and complex computations.
Mobile and Embedded Systems:
ØThe ARM architecture (used in smartphones, tablets, etc.) has become
incredibly dominant in the 2010s.
ØCompanies like Qualcomm, Apple (A-series chips), and Samsung are leading
the development of powerful mobile chips.
Quantum Computing (Future):
ØQuantum processors, like IBM's Q System One, are starting to emerge,
potentially revolutionizing fields like cryptography and AI. 12
History and Evolution of Microprocessors
Key Milestones in Microprocessor History

v1971: Introduction of Intel 4004.


v1974: Intel 8080 and Motorola 6800.
v1978: Intel 8086 (beginning of x86 architecture).
v1981: IBM PC with Intel 8088.
v1984: Apple Macintosh with Motorola 68000.
v1993: Intel Pentium (32-bit architecture).
v2003: AMD Athlon 64 (64-bit).
v2010s-Present: Multi-core, mobile, and embedded systems growth.

13
Overview of Microprocessor Architecture
Definition:

Main Components:
ØArithmetic and Logic Unit (ALU)
ØControl Unit (CU)
ØRegisters
ØSystem Bus
Purpose: These components work together to fetch, decode, and execute
instructions, perform arithmetic and logical operations, and manage the flow of
data between the processor and memory.

14
Overview of Microprocessor Architecture
Components of Microprocessor
1. Arithmetic and Logic Unit
Function:
ØThe ALU is responsible for performing all arithmetic and logical
operations. This is where the actual processing takes place.
ØArithmetic operations: Addition, subtraction, multiplication, and
division.
ØLogical operations: AND, OR, NOT, comparisons (greater than,
less than, etc.).

15
Overview of Microprocessor Architecture
Components of Microprocessor

1. Arithmetic and Logic Unit


Role in Processing:
ØEvery computation performed by the microprocessor, whether it's basic math or
decision-making, is handled by the ALU. For example, in a program that
calculates the sum of two numbers, the ALU performs the addition.

Example:
Ø Calculating the result of a mathematical equation in software.

Ø Comparing two values in a conditional statement (e.g., if the number is greater than a
threshold)..

16
Overview of Microprocessor Architecture
Components of Microprocessor
2. Control Unit (CU)
Function:
ØThe Control Unit (CU) coordinates and directs the activities of all the other
components in the microprocessor. It doesn’t perform calculations directly but
ensures that instructions are executed in the correct order and that data is
routed to the right parts of the processor.
Role in Processing:
ØInstruction Fetch: Retrieves the next instruction from memory.
ØInstruction Decode: Decodes the instruction to understand what action needs
to be performed.
ØInstruction Execute: Sends signals to other parts of the processor (ALU,
registers, buses) to carry out the instruction.
17
Overview of Microprocessor Architecture
Components of Microprocessor
2. Control Unit (CU)
Example
ØFetching and decoding an instruction like "ADD 5 to
Register A".
ØManaging the fetch-decode-execute cycle, ensuring the
correct execution sequence.

18
Overview of Microprocessor Architecture
Components of Microprocessor
3. Registers
Function:
ØRegisters are small, high-speed storage locations inside the CPU that temporarily
hold data and instructions. They are crucial for quick data retrieval and
manipulation during processing.
Types of Registers:
ØGeneral Purpose Registers: Store data temporarily during processing (e.g.,
intermediate results of calculations).
ØSpecial Purpose Registers: Control specific functions of the CPU, such as the
Program Counter (PC), which keeps track of the memory address of the next
instruction to be executed, or the Status Register, which holds flags like zero, carry,
overflow, etc.
19
Overview of Microprocessor Architecture
Components of Microprocessor
3. Registers
Role in Processing:
ØRegisters provide the ALU with the data it needs to perform operations.
ØThey store addresses, intermediate data, and control information while
instructions are executed.
Example
ØStoring the operands (e.g., values) that will be added together in an
addition operation.
ØKeeping track of the next instruction to execute using the Program
Counter.

20
Overview of Microprocessor Architecture
Components of Microprocessor
4. Bus System
Function:
ØThe Bus System is a collection of communication pathways that transport data,
addresses, and control signals between the microprocessor’s components and
other parts of the computer (e.g., memory, input/output devices).
Types of Buses:
ØData Bus: Carries actual data between components (e.g., transferring data
between the ALU and memory).
ØAddress Bus: Carries the memory addresses to/from which data is being read
or written.
ØControl Bus: Carries control signals that tell the microprocessor and other
parts of the system what actions to take (e.g., read or write operations).
21
Overview of Microprocessor Architecture
Components of Microprocessor
4. Bus System
Role in Processing:
ØThe bus system allows for communication between the Control
Unit, ALU, Registers, Memory, and I/O devices. It ensures that
data flows correctly and efficiently throughout the system.
Example
ØData transfer: Sending the result of an ALU operation to memory.
ØAddressing: Specifying the address in memory where data is to be
read or written.

22
Overview of Microprocessor Architecture
Basic Block Diagram of a Microprocessor
Ø ALU: Connects to registers and the system bus.
ØControl Unit (CU): Interfaces with the ALU, registers, and system bus.
ØRegisters: Connected to the ALU and CU for quick data storage and manipulation.
ØSystem Bus: Links the microprocessor with memory and I/O units.

Fig. Basic block diagram of


Microprocessor

23
Overview of Microprocessor Architecture
Instruction Cycle (Fetch-Decode-Execute)
1. Fetch:
ØThe Control Unit fetches the instruction from memory (using the Program
Counter to know the address).
2. Decode:
ØThe instruction is decoded into a form that the ALU can understand and process
(i.e., converting binary into an operation).
3. Execute:
ØThe ALU or other processor components execute the instruction (e.g., performing
an arithmetic operation or transferring data).
ØResults are stored in the appropriate registers.

24
Overview of Microprocessor Architecture
Microprocessor Clock
Clock:
ØA periodic signal used to synchronize the operations of the processor.
ØDetermines the speed at which the processor executes instructions.
ØFaster clock speeds lead to faster execution of operations.
Clock Cycle:
ØA complete cycle (high and low state) of the clock determines how
long each instruction or operation takes.

25
Overview of Microprocessor Architecture
Types of Microprocessor Architectures
1. CISC (Complex Instruction Set Computing):
ØExample: Intel x86 processors.
ØCharacteristics: A wide variety of instructions, some complex, which can
perform multiple operations in one instruction.
ØBenefit: Reduces the number of instructions per program.
ØDrawback: More complex and slower execution.
2. RISC (Reduced Instruction Set Computing):
ØExample: ARM processors.
ØCharacteristics: A smaller set of simple instructions, optimized for speed.
ØBenefit: Faster execution, simpler hardware design.
ØDrawback: Requires more instructions for complex operations.
26
Overview of Microprocessor Architecture
Summary of Microprocessor Architecture
ØKey Components: ALU, CU, Registers, and System Bus work
together to perform processing tasks.
ØInstruction Cycle: Microprocessors execute instructions through a
Fetch-Decode-Execute cycle.
ØData Flow: Data is transferred through the system bus, with control
signals managing the flow.
ØClock Speed: The microprocessor's performance is heavily dependent
on its clock speed and the design of its architecture.

27
Basic Measurement metrics of Microprocessor
1. Clock Speed
What it is: How fast the processor can work.
Unit: Hertz (Hz), usually measured in Gigahertz (GHz) (1 GHz = 1 billion cycles
per second).
Why it matters: A higher clock speed means the processor can do more work in a
given amount of time. For example, a 3.5 GHz processor runs faster than a 2.5 GHz
one.
2. Cores
What it is: The number of separate "processing units" in the microprocessor.
Unit: Number of cores (e.g., 2-core, 4-core, 8-core).
Why it matters: More cores allow the processor to handle multiple tasks at once.
For example, a 4-core processor can handle four tasks at the same time, making it
better for multitasking. 28
Basic Measurement metrics of Microprocessor
3. Cache Size
What it is: A small, super-fast memory that stores frequently used data.
Unit: Typically measured in Kilobytes (KB) or Megabytes (MB).
Why it matters: Larger cache sizes help the processor access data faster, improving
performance for everyday tasks and applications.
4. Thermal Design Power (TDP)
What it is: The amount of heat the processor generates when it's working hard.
Unit: Watts (W).
Why it matters: A higher TDP means the processor needs better cooling (like fans
or heatsinks). Processors with lower TDPs are often used in laptops or devices
where heat and battery life are concerns.

29
Basic Measurement metrics of Microprocessor
5. Power Consumption
What it is: The amount of electricity the processor uses.
Unit: Watts (W).
Why it matters: Lower power consumption means the processor is more energy-
efficient, which is important for battery-powered devices like smartphones or
laptops.
6. Bus Speed
What it is: The speed at which the processor communicates with other parts of the
computer (like memory).
Unit: Hertz (Hz).
Why it matters: Faster bus speeds allow the processor to send and receive data
more quickly, improving overall system performance.
30
Basic Measurement metrics of Microprocessor
7. Instructions Per Cycle (IPC)
What it is: How many instructions the processor can complete in one clock
cycle.
Why it matters: A higher IPC means the processor can do more work during
each cycle, leading to better overall performance, especially if the clock speed
is the same.
8. Latency
What it is: The delay between when the processor requests data and when it
actually gets it.
Why it matters: Lower latency means faster performance, especially in tasks
that require quick data access, like gaming or real-time video processing.

31
Types of Microprocessor

1. Based on Architecture:
a. CISC (Complex Instruction Set Computing) Microprocessors:
ØCharacteristics: CISC processors have a large set of instructions that can perform
complex operations. The idea is to reduce the number of instructions needed to
execute a program by having instructions that do more work in a single cycle.
Examples:
ØIntel x86 series (e.g., Intel Pentium, Intel Core processors)
ØAMD processors (e.g., AMD Ryzen, AMD Athlon)

32
Types of Microprocessor
1. Based on Architecture:
b. RISC (Reduced Instruction Set Computing) Microprocessors:
ØCharacteristics: RISC processors use a smaller set of instructions, designed
to be simpler and faster, with each instruction typically taking one clock cycle.
Examples:
ØARM processors (e.g., ARM Cortex series used in mobile devices)
ØMIPS processors
ØPowerPC processors

33
Types of Microprocessor
2. Based on Application:
a. General Purpose Microprocessors:
ØCharacteristics: These are the most common processors used in personal
computers, workstations, and servers. They can execute a wide range of tasks and
run general-purpose operating systems (e.g., Windows, Linux).
Examples:
ØIntel Core i7, Intel Core i9
ØAMD Ryzen series

34
Types of Microprocessor
2. Based on Application:
b. Embedded Microprocessors:
Ø Characteristics: These microprocessors are designed for specific applications and are optimized
for low power consumption, compact size, and reliability. They are found in devices like
smartphones, home appliances, industrial equipment, and IoT devices.
Examples:
Ø ARM-based processors (used in most mobile phones and embedded systems)
Ø Microcontrollers (e.g., PIC, AVR, ARM Cortex-M)
c. Digital Signal Processors (DSPs):
Ø Characteristics: DSPs are specialized microprocessors optimized for high-speed numeric
calculations, particularly for tasks like signal processing, audio, video, and telecommunications.
Examples:
ØTexas Instruments TMS320 series
Ø Analog Devices Blackfin series 35
Types of Microprocessor
2. Based on Application:
d. Graphics Processing Units (GPUs):
ØCharacteristics: GPUs are specialized processors designed to
handle the parallel processing required for rendering graphics.
Modern GPUs are also used for general-purpose computing tasks
that benefit from parallel processing, such as AI and deep learning.
Examples:
ØNVIDIA GeForce series
ØAMD Radeon series

36
Types of Microprocessor
3. Based on Number of Cores:
a. Single-Core Microprocessors:
ØCharacteristics: These processors have one processing unit (core) that
executes instructions sequentially.
Examples:
ØEarly Intel Pentium and AMD Athlon processors
b. Multi-Core Microprocessors:
ØCharacteristics: These processors have multiple cores (processing units) on a
single chip, allowing them to process multiple instructions simultaneously for
better performance, especially in parallel tasks.
Examples:
ØIntel Core i5, i7, i9 (multi-core processors)
ØAMD Ryzen (multi-core processors)
37
Types of Microprocessor
3. Based on Number of Cores:
c. Many-Core Processors:
ØCharacteristics: These processors have many processing units,
designed for extremely parallel tasks such as large-scale
simulations and high-performance computing (HPC).
Examples:
ØIntel Xeon Phi
ØAMD EPYC (with many cores for server applications)

38
Types of Microprocessor
4. Based on Processing Speed and Technology:
a. Low-Power Microprocessors:
Ø Characteristics: Designed for battery-powered devices or energy-efficient systems, these
processors prioritize power efficiency over raw performance.
Examples:
Ø ARM Cortex-A series (used in mobile devices)
Ø Intel Atom processors (used in ultra-low-power laptops)
b. High-Performance Microprocessors:
Ø Characteristics: These processors are designed for high computational tasks such as gaming,
scientific simulations, and server workloads.
Examples:
Ø Intel Xeon (server processors)
Ø AMD Ryzen 9, Intel Core i9 (high-performance consumer processors)

39
Types of Microprocessor
5. Based on Manufacturing Process:
a. 32-bit Microprocessors:
Ø Characteristics: These processors can handle 32 bits of data at a time and have a 32-bit wide
data bus.
Examples:
Ø Intel 80386
Ø Motorola 68000 series
b. 64-bit Microprocessors:
Ø Characteristics: These processors handle 64 bits of data, allowing them to address a larger
memory space and perform more efficient computations in modern applications.
Examples:
Ø Intel Core i7, i9 (64-bit processors)
Ø AMD Ryzen 7, Ryzen 9 (64-bit processors)

40
Types of Microprocessor
6. Specialized Microprocessors:
a. Application-Specific Integrated Circuits (ASICs):
ØCharacteristics: ASICs are custom-designed microprocessors tailored to
specific tasks, such as cryptocurrency mining, video encoding/decoding, or
network switching.
ØThese are not general-purpose processors but are highly optimized for specific
functions.
b. Field-Programmable Gate Arrays (FPGAs):
ØCharacteristics: FPGAs are programmable microprocessors where the
hardware logic can be configured after manufacturing. They are often used in
specialized applications like telecommunications, signal processing, and
custom hardware acceleration tasks.

41
Applications of Microprocessors
1. Consumer Electronics
Examples:
ØPersonal Computers (PCs): Microprocessors control all operations, from data processing
to system management.
ØSmartphones & Tablets: Mobile devices use advanced microprocessors to handle
applications, communication, and processing tasks.
ØTelevisions & Smart TVs: Use microprocessors to manage video/audio processing,
network connectivity, and smart features.
2. Automobiles
Examples:
Ø Engine Control Units (ECUs): Microprocessors control fuel injection, ignition timing, and
other critical vehicle functions.
Ø Infotainment Systems: Modern cars use microprocessors for navigation, media controls, and
voice recognition.
Ø Safety Features: Microprocessors are integral to systems like ABS (Anti-lock Braking
System) and airbag deployment. 42
Applications of Microprocessors
3. Medical Devices
Examples:
Ø Diagnostic Equipment: Microprocessors control devices like ECGs, MRIs, and X-ray machines,
enabling data collection, processing, and display.
Ø Wearable Health Devices: Fitness trackers, smartwatches, and glucose monitoring devices use
microprocessors to process real-time health data.
Ø Surgical Robots: Microprocessors are used in precision control for robotic-assisted surgery.
4. Industrial Automation
Examples:
Ø PLC (Programmable Logic Controllers): Microprocessors are used in PLCs to control
machinery, manage assembly lines, and automate factory operations.
Ø Robotics: Microprocessors enable robots to perform complex tasks like assembly, packaging, and
quality control.
Ø Process Control Systems: Microprocessors regulate temperature, pressure, and other parameters
in chemical plants or manufacturing units. 43
Applications of Microprocessors
5. Communication Systems
Examples:
ØMobile Communication: Microprocessors are used in mobile phones, base stations, and
satellite communication systems for signal processing and data transmission.
ØNetwork Routers and Switches: Microprocessors handle routing, error checking, and data
traffic management in computer networks.
ØWi-Fi/Bluetooth Devices: Microprocessors control communication protocols and manage
data transfer in wireless devices.
6. Embedded Systems
Examples:
ØAppliances: Microprocessors control home appliances like microwave ovens, refrigerators,
and washing machines for efficient operation.
ØSmart Home Devices: Smart thermostats, lighting systems, and security systems use
microprocessors to control and automate tasks.
ØToys and Gadgets: Many toys use microprocessors for sound, motion, and interactive
44
features.
Microprocessor vs. Microcontroller
Aspect Microprocessor Microcontroller
Definition A microprocessor is a central processing A microcontroller is a compact integrated
unit (CPU) that performs arithmetic, system that includes a CPU, memory, and I/O
logic, and control operations. peripherals on a single chip.
Components Only the CPU, with external components CPU, RAM, ROM, I/O ports, and sometimes
like RAM, ROM, I/O devices. peripherals like timers and ADCs, all
integrated.
Purpose Primarily used for general-purpose Used for specific control applications,
processing in computing devices. typically embedded systems.
Power Typically consumes more power due to Designed for low power consumption, making
Consumption reliance on external components. them ideal for battery-powered applications.
Complexity More complex, designed for handling a Less complex, tailored for specific control or
variety of tasks. monitoring tasks.
Examples of Personal computers, laptops, servers. Home appliances, automotive systems,
Use robotics, medical devices.
Cost Generally more expensive due to higher Generally cheaper due to integrated design
processing capabilities. and simpler functionality. 45
Reading Assignment

Future trends in Microprocessor

46

You might also like