0% found this document useful (0 votes)
49 views

Microprocessor 1 (Slide)

The document discusses microprocessors including their evolution, architecture, pin functions, and assembly language programming. It introduces different types of microprocessors and covers topics like their introduction, evolution over time from 4-bit to 32-bit processors, internal architecture and operation, and programming using assembly language. The document provides an overview of microprocessors and related concepts.

Uploaded by

Alif Mahmud Nafi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Microprocessor 1 (Slide)

The document discusses microprocessors including their evolution, architecture, pin functions, and assembly language programming. It introduces different types of microprocessors and covers topics like their introduction, evolution over time from 4-bit to 32-bit processors, internal architecture and operation, and programming using assembly language. The document provides an overview of microprocessors and related concepts.

Uploaded by

Alif Mahmud Nafi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Microprocessors

• Introduction to different types of


microprocessors
• Microprocessor evolution
• Architecture and operation
• Pin diagram and functions of
microprocessors
• Assembly language programming

Diba Das, Lecturer, Dept. of EEE, CUET


How to give binary data as input?

Diba Das, Lecturer, Dept. of EEE, CUET


Diba Das, Lecturer, Dept. of EEE, CUET
?

Diba Das, Lecturer, Dept. of EEE, CUET


• Microprocessor consists of only • Micro Controller contains a CPU,
a Central Processing Unit. Memory, I/O all integrated into one chip.

• The microprocessor is useful in • Micro Controller is useful in an


Personal Computers. embedded system*.

• Microprocessor uses an external • Microcontroller uses an internal


bus to interface to RAM, ROM, controlling bus.
and other peripherals.
Bus is a set of parallel connection in
between the components and the (*Digital cameras, Digital wristwatches, MP3 players).

microprocessor/microcontroller. Diba Das, Lecturer, Dept. of EEE, CUET


What is Microprocessor
• A microprocessor is a computer processor which incorporates the functions of a
computer's central processing unit (CPU) on a single integrated circuit (IC) or at
most a few integrated circuits.
• Microprocessor, the heart of the microprocessor-based computer system is an
IC.
• Microprocessor is the controlling element in a computer system.
• It controls memory and I/O devices through buses and transfer instructions and
data between microprocessor and memory or I/O device.
• The microprocessor is a multipurpose, clock driven, register based, digital-
integrated circuit which accepts binary data as input, processes it according to
instructions stored in its memory, and provides results as output.

Diba Das, Lecturer, Dept. of EEE, CUET


Programming Language
• A computer program is a collection of instructions that performs a specific task
when executed by a computer.

• A programming language is a formally constructed language designed to


communicate instructions to a machine, particularly a computer.

• Simply, writing a program is called programming and the language used are
called programming language.

Diba Das, Lecturer, Dept. of EEE, CUET


Programming Language

Diba Das, Lecturer, Dept. of EEE, CUET


Programming Language
▪ Low-level language

➢ a medium of communication that is machine dependent or specific to a given computer.

➢ Machine & Assembly languages of a computer considered low-level languages.

➢ Program does not transferable.

• High level language

➢ a medium of communication that is machine independent.

➢ programs written in English like word.

➢ executed on a machine using a translator.

➢ e.g. BASIC, PASCAL, C,C+, FORTRAN

➢ easy to learn

Diba Das, Lecturer, Dept. of EEE, CUET


Programming Language
• Machine language
➢ a type of MP programming language that uses binary or hexadecimal numbers.
➢ It was constructed of ones and zeros using binary codes.
➢ e.g. 0000 0010 1100 1010
➢ All programs are converted into machine language before they can be executed.
• Assembly language
➢ Uses symbolic operation code to represent the machine operation code.
➢ Specific to a given computer.
➢ removes the complexity of machine language.

Diba Das, Lecturer, Dept. of EEE, CUET


Programming Language

• Source code
a program written either in mnemonics of an assembly language or
in English-like statements of high level language.
• Object code
the binary (M/C) code into which a source program is translated by
a compiler, assembler or interpreter.
Diba Das, Lecturer, Dept. of EEE, CUET
Programming Language
• Compiler

A program that translates English like words of a high level language into machine
language. Reads a given program (source code) in its entirely, translates program into
machine language(object code).

• Interpreter

A program that translates English like statements of a high level language into
machine language.

translates one statement at a time from source code to an object code.

• Assembler

A computer program that translates assembly language program from mnemonics


to binary machine code.

Diba Das, Lecturer, Dept. of EEE, CUET


Programming Language

Diba Das, Lecturer, Dept. of EEE, CUET


Programming Language
Firmware
permanently stored, unalterable program instructions contained in ROM section
of computer memory.
Hardware
the physical electronic circuit & electromechanical devices that makes up
computer system.
Software
Group of instructions or Program in a computer.

Diba Das, Lecturer, Dept. of EEE, CUET


Evaluation of
Microprocessor
History of Intel Processor With Full Details _
Evaluation of Intel Processor (2).mp4

https://www.youtube.co
m/watch?v=Gy7POHk8
NRk

Diba Das, Lecturer, Dept. of EEE, CUET


Evaluation of Microprocessor
•1st Microprocessor
❑ 1971, INTEL corp., 4004
❑ 4-bit microprocessor
❑ 4-bit memory, contain only 45 instructions
❑ Fabricated with P-channel MOSFET
❑ Execute instructions at the slow rate of 50 KIPs (Kilo-instructions per second)

•2nd Microprocessor
❑ Later in 1971, INTEL corp., 8008
❑ 8-bit microprocessor
❑ 16kB memory, contain only 48 instructions,
❑ Execution time 20 micro-seconds

Diba Das, Lecturer, Dept. of EEE, CUET


Evaluation of Microprocessor
•3rd Microprocessor (1st modern microprocessor)
❑ 1973, INTEL 8080
❑ 8-bit microprocessor
❑ 64kB memory
❑ TTL technology
❑ Execution time 2 micro-seconds
•The 8085 Microprocessor
❑ 1977, Intel 8085
❑ 8-bit microprocessor (Data bus 8 bits, address bus 8 bits)
❑ 64kB memory
❑ Execution time 1.3 micro-seconds

Advantage:
1. internal clock generator
2. Internal system controller
3. Higher clock frequency (3MHz)

Diba Das, Lecturer, Dept. of EEE, CUET


Evaluation of Microprocessor
•The 8086 Microprocessor
❑ 1978, Intel 8086
❑ 16-bit microprocessor (Data bus 16 bits, address bus 20 bits)
❑ 1MB memory
❑ Execution time 400 nano-seconds
❑ Clock frequency 5MHz
❑ Cache or queue memory 6 byte
•The 8088 Microprocessor
❑ 1979, Intel 8088
❑ Same as 8086 but speedy than 8086

• The 80286 Microprocessor


❑ 1983, INTEL 80286
❑ 16-bit microprocessor
❑ 16MB memory
❑ Execution time 250 nano-seconds
❑ Clock frequency 8MHz

Diba Das, Lecturer, Dept. of EEE, CUET


Evaluation of Microprocessor
•The 80386 Microprocessor (1st practical 32-bit MP)
❑ 1986, Intel 80386
❑ 32-bit microprocessor (Data bus 32 bits, address bus 32 bits)
❑ 4GB memory
❑ Cache or queue memory 8kB
❑ Have few modified version (80386SX, 80386SL/ 80386SLC, 80386EX

•The 80486 Microprocessor


❑ 1989, INTEL 80486
❑ Same as 80386
❑ Execution time 25 nano-seconds
❑ Clock frequency 50MHz

Diba Das, Lecturer, Dept. of EEE, CUET


Evaluation of Microprocessor
•The Intel Pentium Microprocessor
❑ 1993
❑ 64-bit microprocessor
❑ 4GB memory
❑ Cache or queue memory 16kB
❑ Pentium contained 8KB instruction cache & 8KB data cache
❑ Execute instructions at the rate of 110 MIPs
❑ two version of Pentium operated with a clocking frequency of 60MHz & 66MHz
❑ Double-clock Pentium, operating at 120MHz & 133MHz also available

The Future of the Microprocessors


❑ No one can really make accurate Predictions.
❑ Beginning in late 2002, 64 bits in width, 128 bit data bus, code name Merced, joint venture called EPIC(Explicitly Parallel
Instruction Computing) of Intel & Hewlett-Packard.

Diba Das, Lecturer, Dept. of EEE, CUET


Main tasks of Microprocessor
• The microprocessor performs three main tasks for the computer
system:
1.Data transfer between microprocessor and memory or I/O devices.

2.Simple arithmetic and logic operations.

3.Program flow via simple decisions.

• The power of the microprocessor is in its capability to execute


billions of millions of instructions per second from a program or
software (group of instructions) stored in memory.

Diba Das, Lecturer, Dept. of EEE, CUET


Buses
A group of lines used to transfer bits between microprocessor and other components (microprocessor,
RAM, ROM, I/O) of computer is called bus.
There are 3 types of buses-
1. Data bus (Bi-directional)
transfers information between microprocessor and its memory and I/O address space.
2. Address bus (Unidirectional)
requests a memory location from the memory or I/O location from I/O devices.
3. Control bus (Unidirectional)
contains lines that select memory or I/O and cause them to perform a read or write operation.
A microprocessor addresses device memory via a memory address bus. Electrical
signals are sent via the address lines and data is returned in response from a memory
device. Usually, there is a memory controller or memory management unit hardware
designed to handle the details.
Diba Das, Lecturer, Dept. of EEE, CUET
Buses

Fig:The block diagram of a computer system showing the address, data and control bus structure
The control bus is active-low, that is, it is active
when a logic zero appears on the control line.

Diba Das, Lecturer, Dept. of EEE, CUET


Cache Memory
• An ultra-high speed, directly accessible, relatively small semiconductor memory
block used to store data/instructions that computer may need in the immediate
future.
• Increases system bandwidth by reducing no. of external memory fetches required by
the processor i.e. speed up the operation.

Diba Das, Lecturer, Dept. of EEE, CUET


Microcontroller
• A device/microcomputer that includes microprocessor, memory, several signal lines on a single chip
fabricated using VLSI technology. A single chip microcomputer is called a microcontroller.

• The microcontroller on single chip, which typically includes a microprocessor, 64 byte RAM, 1-2 kilo
byte ROM and several signal lines to connect I/O devices.

• Microcontroller are used for such as controlling appliances, traffic lights etc.

Diba Das, Lecturer, Dept. of EEE, CUET


Some Important Terms
• Bit (b) - a binary digit, 0 or 1.

• Byte (B) - a group of 08 bits. (1 byte = 8 bits)

• Instruction - a command in binary, recognized & executed by the computer.

Diba Das, Lecturer, Dept. of EEE, CUET


Microprocessor
and
Its architecture

Diba Das, Lecturer, Dept. of EEE, CUET


8, 16, 32 & 64-bit MP
• 8, 16, 32 and now 64 define the bitness of a MP. For a simple answer we can say that it relates to the maximum
memory a processor register can address. A ‘x’ bit CPU can handle 2^x bytes of memory.
• Each MP recognizes & processes a group of bits called word & MP classified according to their word length.
• For example: A processor with an 8-bits is known as 8-bit MP. Intel 8080, 8085, etc. are 8-bit MP.
• Similarly, a processor with an 16-bits is known as 16-bit MP. The 8086 is Intel’s 1st 16-bit MP.
• 8086 MP’s registers are 16-bit in size. That’s why it is called 16-bit MP.

Diba Das, Lecturer, Dept. of EEE, CUET


Registers
• A register is one of a small set of data holding places that are part of a computer
processor.
• Registers are two types:
1.General-purpose or multipurpose Registers
these registers hold various data sizes and used for almost any purpose
2.Special purpose Registers
used in special purposes

Diba Das, Lecturer, Dept. of EEE, CUET


General-purpose or multipurpose
Registers
• The MP has 07 general purpose registers.
• Each registers are 16-bit in size, while some registers can be divided into two 8-bit
register.
• The acceptable 8-bit register pairs are AH-AL, BH-BL, CH-CL, DH-DL. These pairs
forms AX, BX, CX, DX registers respectively.

Diba Das, Lecturer, Dept. of EEE, CUET


General-purpose
Registers

Diba Das, Lecturer, Dept. of EEE, CUET


1.AX register

• Called 16-bit accumulator while AH/AL is 8-bit


accumulator
• Used for instructions such as Multiplication &
division

DS 2.BX register

• 16-bit Base index register while BH/BL is 8-bits


General- • sometimes holds offset address

purpose 3.CX register


Registers • 16-bit Count register while CH/CL is 8-bits
• Holds the count for various instructions such as
SHIFT, ROTATE, LOOP, etc

4.DX register

• 16-bit Data register while DH/DL is 8-bits


• Holds a part of the result from multiplication
or part of the dividend before a division.
• Need for I/O devices
Diba Das, Lecturer, Dept. of EEE, CUET
SS
5.BP register

• 16-bit Base Pointer register


• Points to a memory location

DS
6.SI register
General-
• 16-bit Source Index register
purpose • Addresses source string data for the string
instructions
Registers
DS,ES
7.DI register

• 16-bit Destination Index register


• Addresses string destination data for the
string instructions

Diba Das, Lecturer, Dept. of EEE, CUET


Special-purpose registers include IP, SP, FLAGS
CS 1.IP register
• Called 16-bit Instruction Pointer.
• The Instruction pointer, which points to the next
instruction in a program, is used by the
microprocessor to find the next sequential
instruction in a program located within the code
Special- segment.
SS 2.SP register
purpose • 16-bit Stack Pointer, addresses an area of
memory called the stack.
Registers • The stack memory stores data through this
pointer.

3.FLAGS register
• A flag resister (F or FL) is a 16-bit registers
which indicates some condition produced by the
execution of an instruction and controls certain
operation of the MP.

Diba Das, Lecturer, Dept. of EEE, CUET


Special-purpose Register
FLAGS register
Flag resister contains 09 active flags.
Among them 06 are status flags (indicate some condition produced by an
instruction) and 03 are control flags (control certain operation of processor).
The flags are -
Carry (C) C-PAZ-S-TIDO
Parity (P)
Auxiliary carry (A)
Zero (Z)
Sign (S)
Trap (T)
Interrupt (I)
Direction (D)
Overflow (O)
Diba Das, Lecturer, Dept. of EEE, CUET
Special-purpose Registers (FLAGS Register)

Diba Das, Lecturer, Dept. of EEE, CUET


Special-purpose Registers (FLAGS Register)

Diba Das, Lecturer, Dept. of EEE, CUET


Special-purpose Registers (FLAGS Register)

Diba Das, Lecturer, Dept. of EEE, CUET


Special-purpose Registers (FLAGS Register)

Diba Das, Lecturer, Dept. of EEE, CUET


Special-purpose Registers (FLAGS Register)

Diba Das, Lecturer, Dept. of EEE, CUET


Special-purpose Registers (FLAGS Register)

Diba Das, Lecturer, Dept. of EEE, CUET


Special-purpose Registers (FLAGS Register)

Diba Das, Lecturer, Dept. of EEE, CUET


Special-purpose Registers (FLAGS Register)

Diba Das, Lecturer, Dept. of EEE, CUET


Diba Das, Lecturer, Dept. of EEE, CUET
Segment Registers

Diba Das, Lecturer, Dept. of EEE, CUET


Segment Registers

Diba Das, Lecturer, Dept. of EEE, CUET


Segment Registers

Diba Das, Lecturer, Dept. of EEE, CUET


Real Mode Memory Addressing

• Real mode operation allows MP to address only the first 1MB of memory space—
even if it is the Pentium 4 or Core2 microprocessor.

• The first 1M byte of memory is called the real memory, conventional memory, or
DOS memory system.

Diba Das, Lecturer, Dept. of EEE, CUET


Segment and Offset address

Real mode operation allows to


address 1MB of memory space.
This first 1MB memory is known
as the real memory or the
standard memory. Segment
registers offers the beginning
address of just about any 64KB
memory segment. The offset
address prefers the any location
from the 64KB memory space. Diba Das, Lecturer, Dept. of EEE, CUET
Segment and Offset address

Diba Das, Lecturer, Dept. of EEE, CUET


Segment and Offset address

Diba Das, Lecturer, Dept. of EEE, CUET


Default Segment and Offset Registers

Diba Das, Lecturer, Dept. of EEE, CUET


Diba Das, Lecturer, Dept. of EEE, CUET
Diba Das, Lecturer, Dept. of EEE, CUET
• 8086 MP is internally
8086 divided into two separate
Internal functional units:
Architecture 1.Bus Interface Unit (BIU)
2.Execution Unit (EU)

Diba Das, Lecturer, Dept. of EEE, CUET


8086 Internal Architecture

Diba Das, Lecturer, Dept. of EEE, CUET


8086 Architecture
Diba Das, Lecturer, Dept. of EEE, CUET
8086 Architecture
Diba Das, Lecturer, Dept. of EEE, CUET
8086 Internal Architecture
Instruction Queue:
•To increase the execution speed, BIU fetches as many as six instruction bytes ahead to
time from memory.
•All six bytes are then held in first in first out 6 byte register called instruction queue.
•Then all bytes have to be given to EU one by one.
•This pre fetching operation of BIU may be in parallel with execution operation of EU,
which improves the speed execution of the instruction.
•Fetching the next instruction while the current instruction executes is called pipelining.

Diba Das, Lecturer, Dept. of EEE, CUET


Microprocessor
• Ref:The Intel Microprocessors By Barry B. Brey
• Chapter:1-6

Diba Das, Lecturer, Dept. of EEE, CUET

You might also like