SlideShare a Scribd company logo
1 of 30
Dr. Bassel Soudan
Microprocessors & Interfacing 1
Chapter 1
Introduction
Dr. Bassel Soudan
Microprocessors & Interfacing 2
What is a Microprocessor?
• The word comes from the combination micro and
processor.
– Processor means a device that processes
whatever. In this context processor means a
device that processes numbers, specifically binary
numbers, 0’s and 1’s.
• To process means to manipulate. It is a general term that
describes all manipulation. Again in this content, it
means to perform certain operations on the numbers that
depend on the microprocessor’s design.
Dr. Bassel Soudan
Microprocessors & Interfacing 3
Definition of the Microprocessor
The microprocessor is a programmable device that
takes in numbers, performs on them arithmetic or
logical operations according to the program stored
in memory and then produces other numbers as a
result.
Dr. Bassel Soudan
Microprocessors & Interfacing 4
Definition (Contd.)
– Arithmetic and Logic Operations:
• Every microprocessor has arithmetic operations such as
add and subtract as part of its instruction set.
– Most microprocessors will have operations such as
multiply and divide.
– Some of the newer ones will have complex operations
such as square root.
• In addition, microprocessors have logic operations as
well. Such as AND, OR, XOR, shift left, shift right, etc.
• Again, the number and types of operations define the
microprocessor’s instruction set and depends on the
specific microprocessor.
Dr. Bassel Soudan
Microprocessors & Interfacing 5
Definition (Contd.)
– Program: A program is a sequence of instructions
that bring data into the microprocessor, processes
it and sends it out.
• There are many programming languages (C, C++,
FORTRAN, and JAVA…) However, these programming
languages can be grouped into three main levels (these
days a fourth level is developing).
Dr. Bassel Soudan
Microprocessors & Interfacing 6
Definition (Contd.)
– Programming Languages
• Machine language
– Machine language is the lowest level programming
language. It is a language intended to be understood by
the microprocessor (the machine) only.
In this language, every instruction is described by binary
patterns.
e.g. 11001101 may mean 1 + 2
This is the form in which instructions are stored in memory.
This is the only form that the microprocessor understands.
Dr. Bassel Soudan
Microprocessors & Interfacing 7
Definition (Contd.)
– Programming Languages
• Assembly language
– This language is more understandable by humans. In this
language, the binary patterns are assigned mnemonics
(short abbreviated names).
e.g. “Add 1,2” is assigned to the machine language pattern
11001101 mentioned above to refer to the operation 1+2.
There is usually one assembly language instruction for
each machine language instruction.
Dr. Bassel Soudan
Microprocessors & Interfacing 8
Definition (Contd.)
– Programming Languages
• High level languages
– These are languages like C, PASCAL and FORTRON.
These are more natural for humans to use than assembly
or machine languages. They are also more compact (i.e. it
takes less statements to write the program).
One high level instruction translates into many assembly or
machine language instructions.
e.g. x = y + z may translate into:
MOV 1000, R1
MOV 1004, R2
ADD R1, R2
MOV R1, 1008
Dr. Bassel Soudan
Microprocessors & Interfacing 9
Definition (Contd.)
– Programming Languages
• The new level being developed: is ultra high level
languages which would contain things like C++, and
JAVA.
– Here a single instruction may translate into hundreds of
assembly or machine language instructions.
Dr. Bassel Soudan
Microprocessors & Interfacing 10
Memory
Output
Input
A Microprocessor-based system
From the above description, we can draw the
following block diagram to represent a
microprocessor-based system
Dr. Bassel Soudan
Microprocessors & Interfacing 11
Inside The Microprocessor
• Internally, the microprocessor is made up of 3
main units.
– The Arithmetic/Logic Unit (ALU)
– The Control Unit.
– An array of registers for holding data while it is
being manipulated.
Dr. Bassel Soudan
Microprocessors & Interfacing 12
Organization of a microprocessor-based system
I/O
Input / Output
Memory
ROM RAM
System Bus
ALU Register
Array
Control
• Let’s expand the picture a bit.
Dr. Bassel Soudan
Microprocessors & Interfacing 13
Organization of the Microprocessor
– The microprocessor can be divided into three
main pieces:
• Arithmetic/Logic Unit
– Performs all computing and logic operations such as
addition and subtraction as well as AND, OR and XOR.
• Register Array
– A collection of registers within the microprocessor itself.
These are used primarily for data storage during program
execution. The number and the size of these registers
differ from one microprocessor to the other.
• Control Unit
– As the name implies, the control Unit controls what is
happening in the microprocessor. It provides the necessary
control and timing signals to all operations in the
microprocessor as well as its contact to the outside world.
Dr. Bassel Soudan
Microprocessors & Interfacing 14
I/O Input/Output
• Input and output devices are the system’s means
of communicating with the outside world. These
devices are collectively known as peripherals.
– Input devices transfer binary information from the
outside world to the microprocessor.
• Examples of input devices are: keyboard, mouse, bar
code reader, scanner and the like.
– Output devices transfer binary information from
the microprocessor to the outside world.
• Theses include things like an LED, a monitor, a printer
and the like.
Dr. Bassel Soudan
Microprocessors & Interfacing 15
System Bus
• A communication path between the
microprocessor and peripherals.
– It is simply a group of wires carrying the voltages
and curents representing the different bit values.
• The microprocessor communicates with only one
peripheral at a time.
• Controlling the bus is done by the Control Unit.
Dr. Bassel Soudan
Microprocessors & Interfacing
Microprocessor Architecture
16
• The microprocessor can be programmed to
perform functions on given data by writing
specific instructions into its memory.
– The microprocessor reads one instruction at a
time, matches it with its instruction set, and
performs the data manipulation specified.
– The result is either stored back into memory or
displayed on an output device.
Dr. Bassel Soudan
Microprocessors & Interfacing 17
– The 8085 uses three separate busses to perform its
operations
» The address bus.
» The data bus.
» The control bus.
The 8085 Architecture
Dr. Bassel Soudan
Microprocessors & Interfacing 18
The Address Bus
– 16 bits wide (A0 A1…A15)
• Therefore, the 8085 can access locations with numbers
from 0 to 65,536. Or, the 8085 can access a total of 64K
addresses.
– “Unidirectional”.
• Information flows out of the microprocessor and into the
memory or peripherals.
– When the 8085 wants to access a peripheral or a
memory location, it places the 16-bit address on
the address bus and then sends the appropriate
control signals.
Dr. Bassel Soudan
Microprocessors & Interfacing 19
The Data Bus
– 8 bits wide (D0 D1…D7)
– “Bi-directional”.
• Information flows both ways between the microprocessor
and memory or I/O.
– The 8085 uses the data bus to transfer the binary
information.
– Since the data bus has 8-bits only, then the 8085
can manipulate data 8 bits at-a-time only.
Dr. Bassel Soudan
Microprocessors & Interfacing 20
The Control Bus
– There is no real control bus. Instead, the control
bus is made up of a number of single bit control
signals.
Dr. Bassel Soudan
Microprocessors & Interfacing 21
The 8085 Microprocessor
• The 8085 is an 8-bit microprocessor made by Intel.
• It has:
– 6 general purpose registers
– An accumulator
– A flag register
– A stack pointer
– A program counter
Accumulator Flags
B C
D E
H L
Program Counter
Stack Pointer
Dr. Bassel Soudan
Microprocessors & Interfacing 22
The ALU
• In addition to the arithmetic & logic circuits, the
ALU includes the accumulator, which is part of
every arithmetic & logic operation.
• Also, the ALU includes a temporary register used
for holding data temporarily during the execution
of the operation. This temporary register is not
accessible by the programmer.
Dr. Bassel Soudan
Microprocessors & Interfacing 23
The Flags register
– There is also the flags register whose bits are
affected by the arithmetic & logic operations.
• S-sign flag
– The sign flag is set if bit D7 of the accumulator is set after an arithmetic or
logic operation.
• Z-zero flag
– Set if the result of the ALU operation is 0. Otherwise is reset. This flag is
affected by operations on the accumulator as well as other registers. (DCR
B).
• AC-Auxiliary Carry
– This flag is set when a carry is generated from bit D3 and passed to D4 .
This flag is used only internally for BCD operations. (Section 10.5 describes
BCD addition including the DAA instruction).
• P-Parity flag
– After an ALU operation if the result has an even # of 1’s the p-flag is set.
Otherwise it is cleared. So, the flag can be used to indicate even parity.
• CY-carry flag
– Discussed earlier
Dr. Bassel Soudan
Microprocessors & Interfacing 24
The Internal Architecture
• The Stack pointer
– The stack pointer is also a 16-bit register that is
used to point into memory.
– The memory this register points to is a special
area called the stack.
– The stack is an area of memory used to hold data
that will be retreived soon.
– The stack is usually accessed in a Last In First
Out (LIFO) fashion.
Dr. Bassel Soudan
Microprocessors & Interfacing 25
Instruction with Immediate Date
• Operation: Load an 8-bit number into the
accumulator.
– MVI A, 32
• Operation: MVI A
• Operand: The number 32
• Binary Code:
0011 1110 3E 1st byte.
0011 0010 32 2nd byte.
Dr. Bassel Soudan
Microprocessors & Interfacing 26
Arithmetic Operations
– Addition (ADD, ADI):
– Any 8-bit number.
– The contents of a register.
– The contents of a memory location.
• Can be added to the contents of the accumulator and the
result is stored in the accumulator.
– Subtraction (SUB, SUI):
– Any 8-bit number
– The contents of a register
– The contents of a memory location
• Can be subtracted from the contents of the accumulator.
The result is stored in the accumulator.
Dr. Bassel Soudan
Microprocessors & Interfacing 27
Arithmetic Operations
– Increment (INR) and Decrement (DCR):
• The 8-bit contents of any memory location or any register
can be directly incremented or decremented by 1.
• No need to disturb the contents of the accumulator.
Dr. Bassel Soudan
Microprocessors & Interfacing 28
Logic Operations
• These instructions perform logic operations on
the contents of the accumulator.
– ANA, ANI, ORA, ORI, XRA and XRI
• Source: Accumulator and
– An 8-bit number
– The contents of a register
– The contents of a memory location
• Destination: Accumulator
ANA R/M AND Accumulator With Reg/Mem
ANI # AND Accumulator With an 8-bit number
ORA R/M OR Accumulator With Reg/Mem
ORI # OR Accumulator With an 8-bit number
XRA R/M XOR Accumulator With Reg/Mem
XRI # XOR Accumulator With an 8-bit number
Dr. Bassel Soudan
Microprocessors & Interfacing 29
Additional Logic Operations
• Rotate
– Rotate the contents of the accumulator one
position to the left or right.
– RLC Rotate the accumulator left.
Bit 7 goes to bit 0 AND the Carry flag.
– RAL Rotate the accumulator left through the carry.
Bit 7 goes to the carry and carry goes to bit 0.
– RRC Rotate the accumulator right.
Bit 0 goes to bit 7 AND the Carry flag.
– RAR Rotate the accumulator right through the carry.
Bit 0 goes to the carry and carry goes to bit 7.
Dr. Bassel Soudan
Microprocessors & Interfacing 30
RLC vs. RLA
• RLC
• RAL
Accumulator
Carry Flag
7 6 5 4 3 2 1 0
Accumulator
Carry Flag
7 6 5 4 3 2 1 0

More Related Content

Similar to chapter1.ppt

Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Mrunal Deshkar
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notesRavali Sunki
 
Module -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptxModule -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptxDrVaibhavMeshram
 
Computer engineering - overview of microprocessors
Computer engineering - overview of microprocessorsComputer engineering - overview of microprocessors
Computer engineering - overview of microprocessorsEkeedaPvtLtd
 
4CS3-MPI-Unit-1.pptx
4CS3-MPI-Unit-1.pptx4CS3-MPI-Unit-1.pptx
4CS3-MPI-Unit-1.pptxLofi19
 
MergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptxMergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptxbhaveshagrawal35
 
Micro controller
Micro controllerMicro controller
Micro controllerDevi Prasad
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notesManikanteswar Madala
 
Download
DownloadDownload
Downloadjaihooo
 
U proc ovw
U proc ovwU proc ovw
U proc ovwBrit4
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkarjemimajerome
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkarSAQUIB AHMAD
 
Msp 430 architecture module 1
Msp 430 architecture module 1Msp 430 architecture module 1
Msp 430 architecture module 1SARALA T
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessorRamaPrabha24
 
I. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.pptI. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.pptHAriesOa1
 
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptxsruti009988
 

Similar to chapter1.ppt (20)

Mechatronics ME8791
Mechatronics ME8791 Mechatronics ME8791
Mechatronics ME8791
 
Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes
 
Module -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptxModule -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptx
 
Computer engineering - overview of microprocessors
Computer engineering - overview of microprocessorsComputer engineering - overview of microprocessors
Computer engineering - overview of microprocessors
 
4CS3-MPI-Unit-1.pptx
4CS3-MPI-Unit-1.pptx4CS3-MPI-Unit-1.pptx
4CS3-MPI-Unit-1.pptx
 
MergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptxMergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptx
 
Micro controller
Micro controllerMicro controller
Micro controller
 
Embeded system
Embeded systemEmbeded system
Embeded system
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes
 
Download
DownloadDownload
Download
 
U proc ovw
U proc ovwU proc ovw
U proc ovw
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
LECT 2.pptx
LECT 2.pptxLECT 2.pptx
LECT 2.pptx
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
M&i(lec#01)
M&i(lec#01)M&i(lec#01)
M&i(lec#01)
 
Msp 430 architecture module 1
Msp 430 architecture module 1Msp 430 architecture module 1
Msp 430 architecture module 1
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessor
 
I. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.pptI. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.ppt
 
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
 

More from jeronimored

Computer Networks 7.Physical LayerComputer Networks 7.Physical Layer
Computer Networks 7.Physical LayerComputer Networks 7.Physical LayerComputer Networks 7.Physical LayerComputer Networks 7.Physical Layer
Computer Networks 7.Physical LayerComputer Networks 7.Physical Layerjeronimored
 
Android – Open source mobile OS developed ny the Open Handset Alliance led by...
Android – Open source mobile OS developed ny the Open Handset Alliance led by...Android – Open source mobile OS developed ny the Open Handset Alliance led by...
Android – Open source mobile OS developed ny the Open Handset Alliance led by...jeronimored
 
Intel microprocessor history lec12_x86arch.ppt
Intel microprocessor history lec12_x86arch.pptIntel microprocessor history lec12_x86arch.ppt
Intel microprocessor history lec12_x86arch.pptjeronimored
 
Intro Ch 01BA business alliance consisting of 47 companies to develop open st...
Intro Ch 01BA business alliance consisting of 47 companies to develop open st...Intro Ch 01BA business alliance consisting of 47 companies to develop open st...
Intro Ch 01BA business alliance consisting of 47 companies to develop open st...jeronimored
 
preKnowledge-InternetNetworking Android's mobile operating system is based on...
preKnowledge-InternetNetworking Android's mobile operating system is based on...preKnowledge-InternetNetworking Android's mobile operating system is based on...
preKnowledge-InternetNetworking Android's mobile operating system is based on...jeronimored
 
TelecommunicationsThe Internet Basic Telecom Model
TelecommunicationsThe Internet Basic Telecom ModelTelecommunicationsThe Internet Basic Telecom Model
TelecommunicationsThe Internet Basic Telecom Modeljeronimored
 
Functional Areas of Network Management Configuration Management
Functional Areas of Network Management Configuration ManagementFunctional Areas of Network Management Configuration Management
Functional Areas of Network Management Configuration Managementjeronimored
 
Coding, Information Theory (and Advanced Modulation
Coding, Information Theory (and Advanced ModulationCoding, Information Theory (and Advanced Modulation
Coding, Information Theory (and Advanced Modulationjeronimored
 
A microprocessor is the main component of a microcomputer system and is also ...
A microprocessor is the main component of a microcomputer system and is also ...A microprocessor is the main component of a microcomputer system and is also ...
A microprocessor is the main component of a microcomputer system and is also ...jeronimored
 
Erroneous co-routines can block system Formal interfaces slow down system
Erroneous co-routines can block system Formal  interfaces slow down systemErroneous co-routines can block system Formal  interfaces slow down system
Erroneous co-routines can block system Formal interfaces slow down systemjeronimored
 
Welcome to Introduction to Algorithms, Spring 2004
Welcome to Introduction to Algorithms, Spring 2004Welcome to Introduction to Algorithms, Spring 2004
Welcome to Introduction to Algorithms, Spring 2004jeronimored
 
Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systemsjeronimored
 
Management Tools Desirable features Management Architectures Simple Network ...
Management Tools  Desirable features Management Architectures Simple Network ...Management Tools  Desirable features Management Architectures Simple Network ...
Management Tools Desirable features Management Architectures Simple Network ...jeronimored
 
MICMicrowave Tubes – klystron, reflex klystron, magnetron and TWT.
MICMicrowave Tubes – klystron, reflex klystron, magnetron and TWT.MICMicrowave Tubes – klystron, reflex klystron, magnetron and TWT.
MICMicrowave Tubes – klystron, reflex klystron, magnetron and TWT.jeronimored
 
Network Management Network Management Model
Network Management Network Management ModelNetwork Management Network Management Model
Network Management Network Management Modeljeronimored
 
Saumya Debray The University of Arizona Tucson
Saumya Debray The University of Arizona TucsonSaumya Debray The University of Arizona Tucson
Saumya Debray The University of Arizona Tucsonjeronimored
 
An operating system (OS) provides a virtual execution environment on top of h...
An operating system (OS) provides a virtual execution environment on top of h...An operating system (OS) provides a virtual execution environment on top of h...
An operating system (OS) provides a virtual execution environment on top of h...jeronimored
 
application Fundamentals Android Introduction
application Fundamentals  Android Introductionapplication Fundamentals  Android Introduction
application Fundamentals Android Introductionjeronimored
 
linux-lecture1.ppt
linux-lecture1.pptlinux-lecture1.ppt
linux-lecture1.pptjeronimored
 
5 - System Administration.ppt
5 - System Administration.ppt5 - System Administration.ppt
5 - System Administration.pptjeronimored
 

More from jeronimored (20)

Computer Networks 7.Physical LayerComputer Networks 7.Physical Layer
Computer Networks 7.Physical LayerComputer Networks 7.Physical LayerComputer Networks 7.Physical LayerComputer Networks 7.Physical Layer
Computer Networks 7.Physical LayerComputer Networks 7.Physical Layer
 
Android – Open source mobile OS developed ny the Open Handset Alliance led by...
Android – Open source mobile OS developed ny the Open Handset Alliance led by...Android – Open source mobile OS developed ny the Open Handset Alliance led by...
Android – Open source mobile OS developed ny the Open Handset Alliance led by...
 
Intel microprocessor history lec12_x86arch.ppt
Intel microprocessor history lec12_x86arch.pptIntel microprocessor history lec12_x86arch.ppt
Intel microprocessor history lec12_x86arch.ppt
 
Intro Ch 01BA business alliance consisting of 47 companies to develop open st...
Intro Ch 01BA business alliance consisting of 47 companies to develop open st...Intro Ch 01BA business alliance consisting of 47 companies to develop open st...
Intro Ch 01BA business alliance consisting of 47 companies to develop open st...
 
preKnowledge-InternetNetworking Android's mobile operating system is based on...
preKnowledge-InternetNetworking Android's mobile operating system is based on...preKnowledge-InternetNetworking Android's mobile operating system is based on...
preKnowledge-InternetNetworking Android's mobile operating system is based on...
 
TelecommunicationsThe Internet Basic Telecom Model
TelecommunicationsThe Internet Basic Telecom ModelTelecommunicationsThe Internet Basic Telecom Model
TelecommunicationsThe Internet Basic Telecom Model
 
Functional Areas of Network Management Configuration Management
Functional Areas of Network Management Configuration ManagementFunctional Areas of Network Management Configuration Management
Functional Areas of Network Management Configuration Management
 
Coding, Information Theory (and Advanced Modulation
Coding, Information Theory (and Advanced ModulationCoding, Information Theory (and Advanced Modulation
Coding, Information Theory (and Advanced Modulation
 
A microprocessor is the main component of a microcomputer system and is also ...
A microprocessor is the main component of a microcomputer system and is also ...A microprocessor is the main component of a microcomputer system and is also ...
A microprocessor is the main component of a microcomputer system and is also ...
 
Erroneous co-routines can block system Formal interfaces slow down system
Erroneous co-routines can block system Formal  interfaces slow down systemErroneous co-routines can block system Formal  interfaces slow down system
Erroneous co-routines can block system Formal interfaces slow down system
 
Welcome to Introduction to Algorithms, Spring 2004
Welcome to Introduction to Algorithms, Spring 2004Welcome to Introduction to Algorithms, Spring 2004
Welcome to Introduction to Algorithms, Spring 2004
 
Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systems
 
Management Tools Desirable features Management Architectures Simple Network ...
Management Tools  Desirable features Management Architectures Simple Network ...Management Tools  Desirable features Management Architectures Simple Network ...
Management Tools Desirable features Management Architectures Simple Network ...
 
MICMicrowave Tubes – klystron, reflex klystron, magnetron and TWT.
MICMicrowave Tubes – klystron, reflex klystron, magnetron and TWT.MICMicrowave Tubes – klystron, reflex klystron, magnetron and TWT.
MICMicrowave Tubes – klystron, reflex klystron, magnetron and TWT.
 
Network Management Network Management Model
Network Management Network Management ModelNetwork Management Network Management Model
Network Management Network Management Model
 
Saumya Debray The University of Arizona Tucson
Saumya Debray The University of Arizona TucsonSaumya Debray The University of Arizona Tucson
Saumya Debray The University of Arizona Tucson
 
An operating system (OS) provides a virtual execution environment on top of h...
An operating system (OS) provides a virtual execution environment on top of h...An operating system (OS) provides a virtual execution environment on top of h...
An operating system (OS) provides a virtual execution environment on top of h...
 
application Fundamentals Android Introduction
application Fundamentals  Android Introductionapplication Fundamentals  Android Introduction
application Fundamentals Android Introduction
 
linux-lecture1.ppt
linux-lecture1.pptlinux-lecture1.ppt
linux-lecture1.ppt
 
5 - System Administration.ppt
5 - System Administration.ppt5 - System Administration.ppt
5 - System Administration.ppt
 

Recently uploaded

9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...Pooja Nehwal
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhisoniya singh
 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...Pooja Nehwal
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...Amil baba
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Call Girls in Nagpur High Profile
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...Pooja Nehwal
 
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...Call Girls in Nagpur High Profile
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...ranjana rawat
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样qaffana
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service ThanePooja Nehwal
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaUnited Arab Emirates
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Recently uploaded (20)

🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
 
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Sakshi Call 7001035870 Meet With Nagpur Escorts
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
 
Call Girls In Vaishali 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vaishali 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In Vaishali 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vaishali 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
 

chapter1.ppt

  • 1. Dr. Bassel Soudan Microprocessors & Interfacing 1 Chapter 1 Introduction
  • 2. Dr. Bassel Soudan Microprocessors & Interfacing 2 What is a Microprocessor? • The word comes from the combination micro and processor. – Processor means a device that processes whatever. In this context processor means a device that processes numbers, specifically binary numbers, 0’s and 1’s. • To process means to manipulate. It is a general term that describes all manipulation. Again in this content, it means to perform certain operations on the numbers that depend on the microprocessor’s design.
  • 3. Dr. Bassel Soudan Microprocessors & Interfacing 3 Definition of the Microprocessor The microprocessor is a programmable device that takes in numbers, performs on them arithmetic or logical operations according to the program stored in memory and then produces other numbers as a result.
  • 4. Dr. Bassel Soudan Microprocessors & Interfacing 4 Definition (Contd.) – Arithmetic and Logic Operations: • Every microprocessor has arithmetic operations such as add and subtract as part of its instruction set. – Most microprocessors will have operations such as multiply and divide. – Some of the newer ones will have complex operations such as square root. • In addition, microprocessors have logic operations as well. Such as AND, OR, XOR, shift left, shift right, etc. • Again, the number and types of operations define the microprocessor’s instruction set and depends on the specific microprocessor.
  • 5. Dr. Bassel Soudan Microprocessors & Interfacing 5 Definition (Contd.) – Program: A program is a sequence of instructions that bring data into the microprocessor, processes it and sends it out. • There are many programming languages (C, C++, FORTRAN, and JAVA…) However, these programming languages can be grouped into three main levels (these days a fourth level is developing).
  • 6. Dr. Bassel Soudan Microprocessors & Interfacing 6 Definition (Contd.) – Programming Languages • Machine language – Machine language is the lowest level programming language. It is a language intended to be understood by the microprocessor (the machine) only. In this language, every instruction is described by binary patterns. e.g. 11001101 may mean 1 + 2 This is the form in which instructions are stored in memory. This is the only form that the microprocessor understands.
  • 7. Dr. Bassel Soudan Microprocessors & Interfacing 7 Definition (Contd.) – Programming Languages • Assembly language – This language is more understandable by humans. In this language, the binary patterns are assigned mnemonics (short abbreviated names). e.g. “Add 1,2” is assigned to the machine language pattern 11001101 mentioned above to refer to the operation 1+2. There is usually one assembly language instruction for each machine language instruction.
  • 8. Dr. Bassel Soudan Microprocessors & Interfacing 8 Definition (Contd.) – Programming Languages • High level languages – These are languages like C, PASCAL and FORTRON. These are more natural for humans to use than assembly or machine languages. They are also more compact (i.e. it takes less statements to write the program). One high level instruction translates into many assembly or machine language instructions. e.g. x = y + z may translate into: MOV 1000, R1 MOV 1004, R2 ADD R1, R2 MOV R1, 1008
  • 9. Dr. Bassel Soudan Microprocessors & Interfacing 9 Definition (Contd.) – Programming Languages • The new level being developed: is ultra high level languages which would contain things like C++, and JAVA. – Here a single instruction may translate into hundreds of assembly or machine language instructions.
  • 10. Dr. Bassel Soudan Microprocessors & Interfacing 10 Memory Output Input A Microprocessor-based system From the above description, we can draw the following block diagram to represent a microprocessor-based system
  • 11. Dr. Bassel Soudan Microprocessors & Interfacing 11 Inside The Microprocessor • Internally, the microprocessor is made up of 3 main units. – The Arithmetic/Logic Unit (ALU) – The Control Unit. – An array of registers for holding data while it is being manipulated.
  • 12. Dr. Bassel Soudan Microprocessors & Interfacing 12 Organization of a microprocessor-based system I/O Input / Output Memory ROM RAM System Bus ALU Register Array Control • Let’s expand the picture a bit.
  • 13. Dr. Bassel Soudan Microprocessors & Interfacing 13 Organization of the Microprocessor – The microprocessor can be divided into three main pieces: • Arithmetic/Logic Unit – Performs all computing and logic operations such as addition and subtraction as well as AND, OR and XOR. • Register Array – A collection of registers within the microprocessor itself. These are used primarily for data storage during program execution. The number and the size of these registers differ from one microprocessor to the other. • Control Unit – As the name implies, the control Unit controls what is happening in the microprocessor. It provides the necessary control and timing signals to all operations in the microprocessor as well as its contact to the outside world.
  • 14. Dr. Bassel Soudan Microprocessors & Interfacing 14 I/O Input/Output • Input and output devices are the system’s means of communicating with the outside world. These devices are collectively known as peripherals. – Input devices transfer binary information from the outside world to the microprocessor. • Examples of input devices are: keyboard, mouse, bar code reader, scanner and the like. – Output devices transfer binary information from the microprocessor to the outside world. • Theses include things like an LED, a monitor, a printer and the like.
  • 15. Dr. Bassel Soudan Microprocessors & Interfacing 15 System Bus • A communication path between the microprocessor and peripherals. – It is simply a group of wires carrying the voltages and curents representing the different bit values. • The microprocessor communicates with only one peripheral at a time. • Controlling the bus is done by the Control Unit.
  • 16. Dr. Bassel Soudan Microprocessors & Interfacing Microprocessor Architecture 16 • The microprocessor can be programmed to perform functions on given data by writing specific instructions into its memory. – The microprocessor reads one instruction at a time, matches it with its instruction set, and performs the data manipulation specified. – The result is either stored back into memory or displayed on an output device.
  • 17. Dr. Bassel Soudan Microprocessors & Interfacing 17 – The 8085 uses three separate busses to perform its operations » The address bus. » The data bus. » The control bus. The 8085 Architecture
  • 18. Dr. Bassel Soudan Microprocessors & Interfacing 18 The Address Bus – 16 bits wide (A0 A1…A15) • Therefore, the 8085 can access locations with numbers from 0 to 65,536. Or, the 8085 can access a total of 64K addresses. – “Unidirectional”. • Information flows out of the microprocessor and into the memory or peripherals. – When the 8085 wants to access a peripheral or a memory location, it places the 16-bit address on the address bus and then sends the appropriate control signals.
  • 19. Dr. Bassel Soudan Microprocessors & Interfacing 19 The Data Bus – 8 bits wide (D0 D1…D7) – “Bi-directional”. • Information flows both ways between the microprocessor and memory or I/O. – The 8085 uses the data bus to transfer the binary information. – Since the data bus has 8-bits only, then the 8085 can manipulate data 8 bits at-a-time only.
  • 20. Dr. Bassel Soudan Microprocessors & Interfacing 20 The Control Bus – There is no real control bus. Instead, the control bus is made up of a number of single bit control signals.
  • 21. Dr. Bassel Soudan Microprocessors & Interfacing 21 The 8085 Microprocessor • The 8085 is an 8-bit microprocessor made by Intel. • It has: – 6 general purpose registers – An accumulator – A flag register – A stack pointer – A program counter Accumulator Flags B C D E H L Program Counter Stack Pointer
  • 22. Dr. Bassel Soudan Microprocessors & Interfacing 22 The ALU • In addition to the arithmetic & logic circuits, the ALU includes the accumulator, which is part of every arithmetic & logic operation. • Also, the ALU includes a temporary register used for holding data temporarily during the execution of the operation. This temporary register is not accessible by the programmer.
  • 23. Dr. Bassel Soudan Microprocessors & Interfacing 23 The Flags register – There is also the flags register whose bits are affected by the arithmetic & logic operations. • S-sign flag – The sign flag is set if bit D7 of the accumulator is set after an arithmetic or logic operation. • Z-zero flag – Set if the result of the ALU operation is 0. Otherwise is reset. This flag is affected by operations on the accumulator as well as other registers. (DCR B). • AC-Auxiliary Carry – This flag is set when a carry is generated from bit D3 and passed to D4 . This flag is used only internally for BCD operations. (Section 10.5 describes BCD addition including the DAA instruction). • P-Parity flag – After an ALU operation if the result has an even # of 1’s the p-flag is set. Otherwise it is cleared. So, the flag can be used to indicate even parity. • CY-carry flag – Discussed earlier
  • 24. Dr. Bassel Soudan Microprocessors & Interfacing 24 The Internal Architecture • The Stack pointer – The stack pointer is also a 16-bit register that is used to point into memory. – The memory this register points to is a special area called the stack. – The stack is an area of memory used to hold data that will be retreived soon. – The stack is usually accessed in a Last In First Out (LIFO) fashion.
  • 25. Dr. Bassel Soudan Microprocessors & Interfacing 25 Instruction with Immediate Date • Operation: Load an 8-bit number into the accumulator. – MVI A, 32 • Operation: MVI A • Operand: The number 32 • Binary Code: 0011 1110 3E 1st byte. 0011 0010 32 2nd byte.
  • 26. Dr. Bassel Soudan Microprocessors & Interfacing 26 Arithmetic Operations – Addition (ADD, ADI): – Any 8-bit number. – The contents of a register. – The contents of a memory location. • Can be added to the contents of the accumulator and the result is stored in the accumulator. – Subtraction (SUB, SUI): – Any 8-bit number – The contents of a register – The contents of a memory location • Can be subtracted from the contents of the accumulator. The result is stored in the accumulator.
  • 27. Dr. Bassel Soudan Microprocessors & Interfacing 27 Arithmetic Operations – Increment (INR) and Decrement (DCR): • The 8-bit contents of any memory location or any register can be directly incremented or decremented by 1. • No need to disturb the contents of the accumulator.
  • 28. Dr. Bassel Soudan Microprocessors & Interfacing 28 Logic Operations • These instructions perform logic operations on the contents of the accumulator. – ANA, ANI, ORA, ORI, XRA and XRI • Source: Accumulator and – An 8-bit number – The contents of a register – The contents of a memory location • Destination: Accumulator ANA R/M AND Accumulator With Reg/Mem ANI # AND Accumulator With an 8-bit number ORA R/M OR Accumulator With Reg/Mem ORI # OR Accumulator With an 8-bit number XRA R/M XOR Accumulator With Reg/Mem XRI # XOR Accumulator With an 8-bit number
  • 29. Dr. Bassel Soudan Microprocessors & Interfacing 29 Additional Logic Operations • Rotate – Rotate the contents of the accumulator one position to the left or right. – RLC Rotate the accumulator left. Bit 7 goes to bit 0 AND the Carry flag. – RAL Rotate the accumulator left through the carry. Bit 7 goes to the carry and carry goes to bit 0. – RRC Rotate the accumulator right. Bit 0 goes to bit 7 AND the Carry flag. – RAR Rotate the accumulator right through the carry. Bit 0 goes to the carry and carry goes to bit 7.
  • 30. Dr. Bassel Soudan Microprocessors & Interfacing 30 RLC vs. RLA • RLC • RAL Accumulator Carry Flag 7 6 5 4 3 2 1 0 Accumulator Carry Flag 7 6 5 4 3 2 1 0