Lecture 1
Lecture 1
MICROPROCESSORS
Dr. Eliel Keelson
1
Outline
• Number Systems
• Fundamentals of Microprocessors
• Memories
• Microprocessor Interfacing
• Assembly Language
2
NUMBER SYSTEMS
3
Number Systems
• The Study of Number Systems is important from the viewpoint of
how data are represented before they are processed by a
microprocessor (computing system).
• We would focus on four main weighted number systems and
their conversions:
• Binary
• Octal
• Decimal
• Hexadecimal
4
Conversion of Number Systems
5
Conversion of Number Systems
6
Axiom 1: Conversion of Number Systems
7
Axiom 1: Binary to Decimal Conversion
8
Axiom 1: Binary to Decimal Conversion
9
Axiom 1: Binary to Decimal Conversion
10
Axiom 1: Binary to Decimal Conversion
11
Axiom 1: Octal to Decimal Conversion
12
Axiom 1: Octal to Decimal Conversion
13
Axiom 1: Hexadecimal to Decimal Conversion
14
Axiom 2: Conversion of Number Systems
15
Axiom 2: Decimal to Binary Conversion
16
Axiom 2: Decimal to Octal Conversion
17
Axiom 2: Decimal to Hexadecimal Conversion
18
Axiom 3: Conversion of Number Systems
19
Axiom 3: Conversion Table
20
Axiom 3: Binary to Octal Conversion
21
Axiom 3: Binary to Hexadecimal Conversion
22
Axiom 3: Octal to Binary Conversion
23
Axiom 3: Hexadecimal to Binary Conversion
24
Axiom 4: Conversion of Number Systems
25
Axiom 4: Conversion Table
26
Axiom 4: Octal to Hexadecimal Conversion
27
Axiom 4: Hexadecimal to Octal Conversion
28
FUNDAMENTALS OF
MICROPROCESSORS
29
Microprocessors
• It has become common knowledge that the Central Processing
Unit (CPU) is the “Brain” (thinking/processing unit) of the
computer.
• This CPU is a typical example of a Microprocessor
• The word “micro” has been used to connote its size
• Long before today the size of our CPU was not as small as we see
it now
30
Microprocessors
• Early CPUs consisted of several components.
• In the 1970’s Very Large-Scale Integration (VLSI)
technology made it possible for CPUs and
additional circuitry to be fabricated on a single
chip.
• This advancement in VLSI made it feasible to have
the processor on a small chip, inheriting the word
“micro”.
• And so, when the Processor (eg. CPU) is
fabricated as a single chip (or as a part of a single
chip) then that chip is known as a Microprocessor
31
Microprocessors
• A Microprocessor can therefore be described
as a computer processor where the data
processing logic and control is included on a
single integrated circuit, or a small number of
integrated circuits (ICs).
• The microprocessor contains the arithmetic,
logic, and control circuitry required to perform
the functions of a computer's central
processing unit.
• The integrated circuit is capable of interpreting
and executing program instructions and
performing arithmetic operations.
32
Evolution of Computers
34
Evolution of Microprocessors
This video explains
the various
generations of
Microprocessors
35
Microprocessors
• The Microprocessor consists of
basically the following units:
• Arithmetic and Logic Unit (ALU)
• Control Unit (CU) and some
• Registers
• With these units it processes several
complex instructions.
36
Microprocessors
• To be able to fetch instructions and produce outputs it interfaces
with other devices like external memory as well as input and
output (I/O) devices
37
Microprocessors: Von Neumann
Architecture
• The image we saw in the previous slide is very similar to an
architecture we refer to as the Von Neumann computer
architecture
• It is the architecture of most general-purpose computers.
• General-purpose computers are computing systems that are
designed to be as versatile as possible
• They usually consist of generalized microprocessor and an
expandable printed circuit board (PCB) just like the motherboard
in most computers
• They are made for multipurpose functions and applications
38
Microprocessors: Von Neumann
Architecture
• And so, the Von Neumann Architecture is made to be
multipurpose in nature. It is shown below
39
Microprocessors: Von Neumann
Architecture
• From the architecture we can say that Instructions and Data
reside in the same memory bank.
• This makes the architecture simple and economical as compared
to other architectures like the Harvard Architecture.
• Using the same memory means that the same buses (signal
path) are used to fetch instructions and data.
• This means the CPU cannot do both things at the same time (ie.
read the instruction and read/write data)
• A Bus is a communication system or signal path which is used
in transferring data between components inside a computer.
40
Microprocessors: Harvard Architecture
• Harvard Architecture is the computer architecture that contains
separate storage and separate buses (signal path) for instruction
and data.
• It was basically developed to overcome the bottleneck of Von
Neumann Architecture.
• The main advantage of having separate buses for instruction and
data is that the CPU can access instructions and read/write data
at the same time.
41
Microprocessors: Harvard Architecture
46
Disadvantages of Microprocessors
• Overheating occurs due to overuse
• Performance depends on the size of the data
• Large board size than microcontrollers
• Most microprocessors do not support floating-point operations
• Overall product design requires more time
• It is only based on machine language
47
Characteristics of Microprocessors
• Microprocessors are generally characterized by the
following
1. Instruction Set
2. Word Length
3. Clock Speed
48
Characteristics of Microprocessors : The
Instruction Set
• It is the set of instructions that
the microprocessor executes
• There is a fixed number of
instructions that the CPU
understands.
• They can range from 10
instruction set of the SIMP
computer (single Instruction
Stream/multiple Instruction
Pipelining) to 150-200 for
advanced computers
49
Characteristics of Microprocessors : The
Instruction Set
• There are many different CPUs,
and they don’t all use the same
instruction set. That means they
will not interpret numbers for
instructions the same way.
• In one CPU architecture 501012
may mean add r10, r12 while in
another architecture it may
mean load r10, 12.
50
Characteristics of Microprocessors : The
Instruction Set
• The combination of instructions
a CPU understands and the
registers it knows about is called
the Instruction Set Architecture
(ISA).
• Intel and AMD chips understand
the x86 ISA. While the chips
Apple use in their iPhone and
iPad devices, such as the A12,
A13, A14, M1, M2 etc., all
understand the ARM ISA. 51
Characteristics of Microprocessors : The
Word Length
• Each instruction sent to the
microprocessor has a word length.
• The Word Length/Size is the number of
bits processed in a single instruction.
• The Word Length of a microprocessor is
directly proportional to its processing
power
• If the microprocessor can process 8 bits
at a time then its internal registers can
hold 8-bit of data during processing.
• If it can process 16 bits at a time then
they can hold up to 16 bits.
• E.g. 8-bit, 16- bit, 32-bit, 64-bit, etc.
52
Characteristics of Microprocessors : The
Clock Speed
• It determines the rate at which
instructions are executed
• It also synchronises all activities of
connected components
• It generates pulses which are
measured in millions of cycles per
second (MHz)
• The faster the clock, the more
instructions can be executed
• Current microprocessors have clock
speeds in several GHz 53
Microprocessor Classification
• Microprocessors can be classified based on their instruction set.
• There are 3 types of Microprocessors. They are
1. RISC Processors
2. CISC Processors
3. Special Processors
54
Microprocessor Classification: RISC
• RISC stands for Reduced Instruction Set
Computer
• It emphasises on reducing execution
time per instruction
• It has a small and simple set of
instructions of uniform length
• It utilises simple addressing modes
• They are designed to reduce the
execution time by using the simplified
instruction set.
55
Microprocessor Classification: RISC
• Each instruction is executed in one
clock cycle
• It makes use of multiple registers so
that interaction with memory is less.
• It uses less number of transistors
• It is less complex and also less
expensive to produce
• Examples include Power PC, SPARC, etc.
56
Microprocessor Classification: CISC
• CISC stands for Complex Instruction Set
Computer
• They are designed to minimize the
number of instructions per program
and ignore the number of cycles per
instruction.
• It has large number of instructions of
variable sizes
• It utilizes a variety of addressing modes
57
Microprocessor Classification: CISC
• Here the program size is reduced
• There are lesser number of memory
cycles required (fetch, read/write)
• It has large number of instructions of
variable sizes
• It results in faster execution time
• Examples include IBM 370/168, VAX
11/780 , Intel 80486
58
Microprocessor Classification: Special
• The are special processors made to
meet specific needs.
• Examples include the Superscalar
microprocessor which is used in
performing multiple tasks at a go.
• Also there are the application-specific
processors like those used in PDAs and
digital signal multiprocessors.
• These processors are optimized to meet
some special use cases
59
Microprocessor Classification: Special
• For example, the Epic (Explicitly Parallel
Instruction Computing) Microprocessor
combines the best features of both RISC
and CISC
• Aim at parallel processing of
instructions
• They add up to the basic instructions,
other instructions which contain
information on how to run the
instructions in parallel with other
instructions.
• This greatly increases the efficiency of
the EPIC microprocessor 60
Factors affecting CPU performance
• Even though today's processors are tremendously fast, their
performance can be affected by several factors, such as:
• clock speed
• cache size
• number of cores
• We would look at each of these factors
61
Factors affecting CPU performance: Clock
Speed
• Clock speed is the number of pulses the central processing unit’s
(CPU) clock generates per second.
• It is measured in hertz (Hz).
• The faster the clock speed, the faster the computer can run fetch-
decode-execute cycles.
• This means that it can process more instructions in the same
amount of time.
62
Factors affecting CPU performance: Clock
Speed
• CPU clocks can sometimes be sped up by the user. This process is
known as overclocking.
• When the number of pulses per second is increased, more fetch-
decode-execute cycles can be performed, and more instructions
can be processed in a given time.
• This increases performance, but also requires more power, which
results in a greater need for heat dissipation and can strain the
life of the battery.
• Overclocking causes the CPU to work harder and produce more
heat, which can lead to long-term damage to the hardware.
63
Factors affecting CPU performance:
Cache
• Cache is a small amount of high-speed random-access memory
(RAM) built directly within the processor.
• It is used to temporarily hold data and instructions that the
processor is likely to reuse.
• This allows for faster processing as the processor does not have to
wait for the data and instructions to be fetched from RAM.
• The larger the cache size, the less time a processor has to wait for
instructions to be fetched. This improves performance.
64
Factors affecting CPU performance: Core
• A processing unit within a CPU is known as a core. Each core is
capable of fetching, decoding and executing its own instructions.
• A CPU with more cores can process more instructions in a given
time.
• However, sometimes one core will have to wait for the output
from another before carrying out the next phase of the
instruction, which can cause a delay.
• Multiple cores increase the processor cost.
• Many modern CPUs are dual-core (two) or quad-core (four)
processors. This provides vastly superior processing power.
65
Thank You
66