0% found this document useful (0 votes)
36 views18 pages

Microprocessor, Microcontrollers & Embedded System CSE 3523 Shifat

microprocessor note

Uploaded by

prantostart
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views18 pages

Microprocessor, Microcontrollers & Embedded System CSE 3523 Shifat

microprocessor note

Uploaded by

prantostart
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Microprocessor, Microcontroller & Embedded System

Course Code: CSE-3523


Course Instructor:
Shefayatuj Johara Chowdhury
Assistant Lecturer
Dept. of CSE, IIUC
Segment1: Introductory Concept: Evaluation of Microprocessor,
Types of microprocessor, system bus, hardware of a
microprocessor, memory addressing technique.

Introduction of Microprocessor
A Microprocessor is an important part of a computer architecture without which you will not
be able to perform anything on your computer. It is a programmable device that takes in input
performs some arithmetic and logical operations over it and produces the desired output. In
simple words, a Microprocessor is a digital device on a chip that can fetch instructions from
memory, decode and execute them and give results.

Basics of Microprocessor –
A Microprocessor takes a bunch of instructions in machine language and executes them, telling
the processor what it has to do. Microprocessor performs three basic things while executing the
instruction:

1. It performs some basic operations like addition, subtraction, multiplication, division, and
some logical operations using its Arithmetic and Logical Unit (ALU). New
Microprocessors also perform operations on floating-point numbers also.

2. Data in microprocessors can move from one location to another.

3. It has a Program Counter (PC) register that stores the address of the next instruction
based on the value of the PC, Microprocessor jumps from one location to another and
takes decisions.

Fig: A typical Microprocessor structure looks like this.


Types of Microprocessor:
● Complex Instruction Set Computer (CISC) –
CISC or Complex Instruction Set Computer is a computer architecture where instructions
are such that a single instruction can execute multiple low-level operations like loading
from memory, storing into memory, or an arithmetic operation, etc. It has multiple
addressing nodes within a single instruction. CISC makes use of very few registers.

Example:

1. Intel 386
2. Intel 486
3. Pentium

● Reduced Instruction Set Computer (RISC) –


RISC or Reduced Instruction Set Computer is a computer architecture where instruction
is simple and designed to get executed quickly. Instructions get completed in one clock
cycle this is because of the optimization of instructions and pipelining (a technique that
allows for simultaneous execution of parts, or stages, of instructions more efficiently
process instructions). RISC makes use of multiple registers to avoid large interactions
with memory. It has few addressing nodes.

Example:

1. IBM RS6000
2. MC88100
3. DEC Alpha 21064

● Explicitly Parallel Instruction Computing (EPIC) –


EPIC or Explicitly Parallel Instruction Computing permits computers to execute
instructions parallel using compilers. It allows complex instructions execution without
using higher clock frequencies. EPIC encodes its instruction into 128-bit bundles. Each
bundle contains three instructions which are encoded in 41 bits each and a 5-bit template
field (contains information about types of instructions in a bundle and which instructions
can be executed in parallel).

Example:

1. IA-64 (Intel Architecture-64)


 Superscalar microprocessor –
These processors can perform many tasks at a time. They can be used for ALUs and
multiplier-like arrays. They have multiple operation units and perform tasks by executing
multiple commands.

 Application-specific integrated circuit –


These processors are application-specific like personal digital assistant computers. They are
designed according to proper specifications.

 Digital signal multiprocessor –


These processors are used to convert signals like analog to digital or digital to analog. The chips
of these processors are used in many devices such as RADAR SONAR home theatres etc.

Advantages of the microprocessor –

1. High processing speed


2. Compact size
3. Easy maintenance
4. Can perform complex mathematics
5. Flexible
6. Can be improved according to a requirement

Disadvantages of microprocessors –

1. Overheating occurs due to overuse


2. Performance depends on the size of the data
3. Large board size than microcontrollers
4. Most microprocessors do not support floating-point operations

Top of Form
Bottom of Form
Top of Form
Top of Form
Bottom of Form
Top of Form
Bottom of Form
Characteristics of a microprocessor:

1. It assimilates the functions of a CPU on to a single IC.


2. It can perform some basic operations like addition, subtraction, multiplication, division
and some logical operations using its Arithmetic and Logical Unit (ALU).
3. Move data from one location to another.
4. It has a program counter that can store the addresses of next instruction.
5. Computational capacity is very high.
6. Perform the instruction cycle like as fetch, decode and execute repeatedly.
7. To design a system with microprocessor, it needs to connect with RAM, ROM, I/O devices
etc.
8. Building cost is high.
9. Power consumption and dissipation is high.
10.The clock frequency is very high.
11.Instruction throughput is given higher priority than interrupt latency.
12.Have few bit manipulation instructions.
13.Microprocessors is not used in real time systems.

Three basic characteristics that differentiate microprocessors are-


• Instruction set: The set of instructions that the microprocessor can execute. MIPS stands
for "millions of instructions per second" and is a rough measure of the performance of a CPU.
Modern CPUs can do so many different things that MIPS ratings lose a lot of their meaning, but
you can get a general sense of the relative power of the CPUs from this column.
• Bandwidth or Data Width: The number of bits processed in a single instruction. Data
Width is the width of the ALU. An 8-bit ALU can add/subtract/multiply/etc. two 8-bit numbers,
while a 32-bit ALU can manipulate 32-bit numbers. An 8-bit ALU would have to execute four
instructions to add two 32-bit numbers, while a 32-bit ALU can do it in one instruction. In many
cases, the external data bus is the same width as the ALU, but not always. The 8088 had a
16-bit ALU and an 8-bit bus, while the modern Pentiums fetch data 64 bits at a time for their
32-bit ALUs.
• Clock speed: Given in megahertz (MHz), the clock speed determines how many instructions
per second the processor can execute. In all cases, the higher the value, the more powerful
the CPU. For example, a 32 bit microprocessor that runs at 50MHz is more powerful than a
16-bit microprocessor that runs at 25MHz.
Evolution of Microprocessors
Transistor was invented in 1948 (23 December 1947 in Bell lab). IC was invented in 1958 (Fair Child
Semiconductors) By Texas Instruments J Kilby. The first microprocessor was invented by INTEL (INTegrated
Electronics).

Size of the microprocessor – 4 bit

Name Year of Invention Clock speed Number of transistors Inst. per sec
60,000
INTEL 4004/4040 1971 by Ted Hoff and Stanley Mazor 740 kHz 2300

Size of the microprocessor – 8 bit

Name Year of Invention Clock speed Number of transistors Inst. per sec
8008 1972 500 kHz 3500 50,000
8080 1974 2 MHz 6000 10 times faster than 8008
8085 1976 (16-bit address bus) 3 MHz 6500 769230
Size of the microprocessor – 16 bit

Number of Inst. per


Name Year of Invention Clock speed
transistors sec
4.77 MHz, 8
1978 (multiply and divide instruction, 16-bit data bus 2.5
8086 MHz, 10 29000
and 20-bit address bus) Million
MHz
2.5
8088 1979 (cheaper version of 8086 and 8-bit external bus)
Million
1982 (80188 cheaper version of 80186, and additional
80186/80188 components like interrupt controller, clock generator, 6 MHz
local bus controller, counters)
80286 1982 (data bus 16bit and address bus 24 bit) 8 MHz 134000 4 Million

Size of the microprocessor – 32 bit

Clock Number of
Name Year of Invention Inst. per sec
speed transistors
1986 (other versions 80386DX, 80386SX,
INTEL 16 MHz –
80386SL , and data bus 32-bit address bus 275000
80386 33 MHz
32 bit)
INTEL 1986 (other versions 80486DX, 80486SX, 16 MHz – 1.2 Million
8 KB of cache memory
80486 80486DX2, 80486DX4) 100 MHz transistors
Cache memory 8 bit for
PENTIUM 1993 66 MHz
instructions 8 bit for data

Size of the microprocessor – 64 bit

Number of
Name Year of Invention Clock speed Inst. per sec
transistors
2006 (other versions core2 64 KB of L1 cache
INTEL 291 Million
duo, core2 quad, core2 1.2 GHz to 3 GHz per core 4 MB of L2
core 2 transistors
extreme) cache
2.2GHz – 3.3GHz, 2.4GHz –
i3, i5, i7 2007, 2009, 2010
3.6GHz, 2.93GHz – 3.33GHz

Generations of microprocessors:
1. First-generation –
From 1971 to 1972 the era of the first generation came which brought microprocessors
like INTEL 4004 Rockwell international PPS-4 INTEL 8008 etc.

2. Second generation –
The second generation marked the development of 8-bit microprocessors from 1973 to
1978. Processors like INTEL 8085 Motorola 6800 and 6801 etc. came into existence.

3. Third generation –
The third generation brought forward the 16-bit processors like INTEL
8086/80186/80286 Motorola 68000 68010 etc. From 1979 to 1980 this generation used
the HMOS technology.
4. Fourth generation –
The fourth-generation came into existence from 1981 to 1995. The 32-bit processors
using HMOS fabrication came into existence. INTEL 80386 and Motorola 68020 are
some of the popular processors of this generation.
5. Fifth-generation –
From 1995 till now we are in the fifth generation. 64-bit processors like PENTIUM,
Celeron, dual, quad, and octa-core processors came into existence.

Microprocessor-based Computer System


Hardware of a microprocessor:
1. Arithmetic & Logic Unit (ALU) :

❑ The part of the central processing unit that deals with operations such as addition,
subtraction and multiplication of integers and Boolean operations. It receives control
signals from the control unit telling it to carry out these operations.

❑ It works in conjunction with the register array for many of these, in particular, the
accumulator and flag registers. The accumulator holds the results of operations, while
the flag register contains a number of individual bits that are used to store information
about the last operation carried out by the ALU.

❑ Some of the tasks performed by the ALU are given below:

Addition and subtraction: These two tasks are performed by constructs of logic gates, such as
half adders and full adders. While they may be termed 'adders', with the aid of they can also
perform subtraction via use of inverters and 'two's complement' arithmetic.
Multiplication and division: In most modern processors, the multiplication and division of
integer values is handled by specific floating-point hardware within the CPU. Earlier processors
used either additional chips known as maths co-processors, or used a completely different
method to perform the task.
Logical tests: Further logic gates are used within the ALU to perform a number of different
logical tests, including seeing if an operation produces a result of zero. Most of these logical
tests are used to then change the values stored in the flag register, so that they may be
checked later by separate operations or instructions. Others produce a result which is then
stored, and used later in further processing.
Comparison: Comparison operations compare values in order to determine such things as
whether one number is greater than, less than or equal to another. These operations can be
performed by subtraction of one of the numbers from the other, and as such can be handled
by the aforementioned logic gates. However, it is not strictly necessary for the result of the
calculation to be stored in this instance; the amount by which the values differ is not required.
Instead, the appropriate status flags in the flag register are set and checked to determine the
result of the operation.
Bit shifting: Shifting operations move bits left or right within a word, with different operations
filling the gaps created in different ways. This is accomplished via the use of a shift register,
which uses pulses from the clock within the control unit to trigger a chain reaction of
movement across the bits that make up the word. Again, this is a quite complicated logical
procedure, and further reading may aid your understanding.

2. Control Unit (CU):


This controls the movement of instructions in and out of the processor, and also controls the
operation of the ALU. It consists of a decoder, control logic circuits, and a clock to ensure
everything happens at the correct time. It is also responsible for performing the instruction
execution cycle.
The three main elements of the control unit are as follows:
Decoder: This is used to decode the instructions that make up a program when they are being
processed, and to determine in what actions must be taken in order to process them. These
decisions are normally taken by looking at the opcode of the instruction, together with the
addressing mode used.
Timer or clock: The timer or clock ensures that all processes and instructions are carried out
and completed at the right time. Pulses are sent to the other areas of the CPU at regular
intervals (related to the processor clock speed), and actions only occur when a pulse is
detected. This ensures that the actions themselves also occur at these same regular intervals,
meaning that the operations of the CPU are synchronized.
Control logic circuits: The control logic circuits are used to create the control signals
themselves, which are then sent around the processor. These signals inform the arithmetic and
logic unit and the register array what they actions and steps they should be performing, what
data they should be using to perform said actions, and what should be done with the results.
3. Memory Array Register
This is a small amount of internal memory that is used for the quick storage and retrieval of
data and instructions. All processors include some common registers used for specific
functions, namely the programcounter, instruction register, accumulator, memory address
register and stack pointer. Many different types of registers are common between most
microprocessor designs. These are:
• Program Counter (PC): This register is used to hold the memory address of the next
instruction that has to execute in a program. This is to ensure the CPU knows at all times
where it has reached, that is able to resume following an execution at the correct point,
and that the program is executed correctly.
• Instruction Register (IR): This is used to hold the current instruction in the processor
while it is being decoded and executed, in order for the speed of the whole execution
process to be reduced. This is because the time needed to access the instruction register
is much less than continual checking of the memory location itself.
• Accumulator (A, or ACC): The accumulator is used to hold the result of operations
performed by the arithmetic and logic unit.
• Memory Address Register (MAR): Used for storage of memory addresses, usually the
addresses involved in the instructions held in the instruction register. The control unit
then checks this register when needs to know which memory address to check or obtain
data from.
• Memory Buffer Register (MBR): When an instruction or data is obtained from the
memory or elsewhere, it is first placed in the memory buffer register. The next action to
take is then determined and carried out, and the data is moved on to the desired
location.
• Flag register / status flags: The flag register is specially designed to contain all the
appropriate 1-bit status flags, which are changed as a result of operations involving the
arithmetic and logic unit.
• Other general purpose registers: These registers have no specific purpose, but are
generally used for the quick storage of pieces of data that are required later in the
program execution. In the model used here these are assigned the names A and B, with
suffixes of L and U indicating the lower and upper sections of the register respectively.
4.System Bus:
It is used for connections between the processor, memory and peripherals, and transferal of
data between the various parts. The system bus consists of three different groups of wiring,
called the data bus, control bus and address bus. These all have separate responsibilities
and characteristics, which can be outlined as follows:
Control Bus: The control bus contains lines that select the memory or I/O and cause them
to perform a read or write operation. In most computer system, there are four control bus
connections:

Fig: System Bus


• Data Bus: This is used for the exchange of data between the processor, memory and
peripherals, and is bi-directional so that it allows data flow in both directions along the
wires. Data bus may be 8 bits, 16 bits, 32 bits or 64 bits.
• Address Bus: This is a unidirectional bus. This bus is usually 8 to 32 bits wide.
Information transfer takes place from the microprocessor to the memory or I/O
elements. For a 16 bit address bus, microprocessor can generate 216 = 65,536 different
possible address. Each one of these addresses represents a definite memory location or
an I/O element.
5. Memory: The memory is not an actual part of the CPU itself, and is instead housed
elsewhere on the motherboard. However, it is here that the program being executed is stored,
and as such is a crucial part of the overall structure involved in program execution.
Moor’s law (Gordon Moore is Intel co-founder):
• The number of transistors incorporated in a chip will approximately double every 24
months.
• The implication of this law is that the processing power of microprocessor also increase.

• Transistors: Transistors is the number of transistors on the chip. You can see that the
number of transistors on a single chip has risen steadily over the years.
• Microns: Microns is the width, in microns, of the smallest wire on the chip. For
comparison, a human hair is 100 microns thick. As the feature size on the chip goes
down, the number of transistors rises.

Memory-addressing techniques:
Microprocessor Memory Address is the location of a program counter in a
microprocessor. When a microprocessor is booted up, it loads the microcode that
contains the addresses of the processor’s registers. These registers are used to hold
values that the microprocessor can read and write. The microprocessor places a value at
the beginning of each register in the stack and places a value at the end of each register
in the stack. When the microprocessor is called, it fetches the value at the location in the
microcode that corresponds to the register on the stack.
Addressing Memory:
• Using 3-bit we can address 23=8 distinct memory location. So, n number of bits can
address 2n memory locations. 1K Byte = 1024 Byte. 210=1024
• So, for addressing 1KB of memory we need at least 10 bits. And the addresses will be- 0
to 1023(decimal) or, 000H to 3FF (HEX) or, 0000 0000 0000 to 0011 1111 1111 B (Binary)
• Similarly, for addressing 64 KB of memory we need at least 16 bits.

• How many bits are necessary to address 1MB memory?


1MB= 1024Kbyte= 1,048,576 Byte = 220 Byte. So, we need 20 bits to address 1MByte
memory. Addresses will be-
0 to 1,048,575 (Decimal)
00000H to FFFFFH (Hex)
0000 0000 0000 0000 0000 -
1111 1111 1111 1111 1111 B (Binary)
N.B. 8086 has 20-bit address bus. So, it can addresses 1 MB memory
Figure 1–13a The physical memory systems of the 8086 through the Core2 microprocessors.

Figure 1–13bThe physical memory systems of the 8086 through the Core2
microprocessors.
References:
1. The Intel Microprocessor By Barry B. Bray
2. Microprocessor and Microcomputer-Based System
Design by Dr. M. Rafiquzzaman
3. Internet collection and web sources (the course materials used here are for educational
purpose and they are the properties of their respective owners.)

You might also like