SlideShare a Scribd company logo
1 of 29
Topic
Logical Instruction Of 8085Logical Instruction Of 8085
Instruction Set of 8085
An instruction is a binary pattern designed inside a
microprocessor to perform a specific function.
The entire group of instructions that a microprocessor
supports is called Instruction Set.
8085 has 246 instructions.
Each instruction is represented by an 8-bit binary value.
These 8-bits of binary value is called Op-Code or
Instruction Byte.
Classification of Instruction Set
Data Transfer Instruction
Arithmetic Instructions
Branching Instructions
Control Instructions
Logical Instructions
Logical Instructions
These instructions perform logical operations on data
stored in registers, memory and status flags.
The logical operations are:
AND
OR
XOR
Rotate
Compare
Complement
AND, OR, XOR
Any 8-bit data, or the contents of register, or memory
location can logically have
AND operation
OR operation
XOR operation
with the contents of accumulator.
The result is stored in accumulator.
Rotate
Each bit in the accumulator can be shifted either left
or right to the next position.
Compare
Any 8-bit data, or the contents of register, or memory
location can be compares for:
Equality
Greater Than
Less Than
with the contents of accumulator.
The result is reflected in status flags.
Complement
The contents of accumulator can be complemented.
Each 0 is replaced by 1 and each 1 is replaced by 0.
Logical Instructions
Opcode Operand Description
CMP R
M
Compare register or memory with
accumulator
The contents of the operand (register or memory) are
compared with the contents of the accumulator.
Both contents are preserved .
The result of the comparison is shown by setting the
flags of the PSW as follows:
Logical Instructions
Opcode Operand Description
CMP R
M
Compare register or memory with
accumulator
if (A) < (reg/mem): carry flag is set
if (A) = (reg/mem): zero flag is set
if (A) > (reg/mem): carry and zero flags are reset.
Example: CMP B or CMP M
Logical Instructions
Opcode Operand Description
CPI 8-bit data Compare immediate with accumulator
The 8-bit data is compared with the contents of
accumulator.
The values being compared remain unchanged.
The result of the comparison is shown by setting the
flags of the PSW as follows:
Logical Instructions
Opcode Operand Description
CPI 8-bit data Compare immediate with accumulator
if (A) < data: carry flag is set
if (A) = data: zero flag is set
if (A) > data: carry and zero flags are reset
Example: CPI 89H
Logical Instructions
Opcode Operand Description
ANA R
M
Logical AND register or memory with
accumulator
The contents of the accumulator are logically ANDed with the
contents of register or memory.
The result is placed in the accumulator.
If the operand is a memory location, its address is specified by the
contents of H-L pair.
S, Z, P are modified to reflect the result of the operation.
CY is reset and AC is set.
Example: ANA B or ANA M.
Logical Instructions
Opcode Operand Description
ANI 8-bit data Logical AND immediate with accumulator
The contents of the accumulator are logically ANDed with
the 8-bit data.
The result is placed in the accumulator.
S, Z, P are modified to reflect the result.
CY is reset, AC is set.
Example: ANI 86H.
Logical Instructions
Opcode Operand Description
XRA R
M
Exclusive OR register or memory with
accumulator
 The contents of the accumulator are XORed with the contents of the register or
memory.
 The result is placed in the accumulator.
 If the operand is a memory location, its address is specified by the contents of H-L pair.
 S, Z, P are modified to reflect the result of the operation.
 CY and AC are reset.
 Example: XRA B or XRA M.
Logical Instructions
Opcode Operand Description
ORA R
M
Logical OR register or memory with
accumulator
 The contents of the accumulator are logically ORed with the contents of the register or
memory.
 The result is placed in the accumulator.
 If the operand is a memory location, its address is specified by the contents of H-L pair.
 S, Z, P are modified to reflect the result.
 CY and AC are reset.
 Example: ORA B or ORA M.
Logical Instructions
Opcode Operand Description
ORI 8-bit data Logical OR immediate with accumulator
The contents of the accumulator are logically ORed with
the 8-bit data.
The result is placed in the accumulator.
S, Z, P are modified to reflect the result.
CY and AC are reset.
Example: ORI 86H.
Logical Instructions
Opcode Operand Description
XRA R
M
Logical XOR register or memory with
accumulator
The contents of the accumulator are XORed with the contents
of the register or memory.
The result is placed in the accumulator.
If the operand is a memory location, its address is specified by
the contents of H-L pair.
S, Z, P are modified to reflect the result of the operation.
CY and AC are reset.
Example: XRA B or XRA M.
Logical Instructions
Opcode Operand Description
XRI 8-bit data XOR immediate with accumulator
The contents of the accumulator are XORed with the
8-bit data.
The result is placed in the accumulator.
S, Z, P are modified to reflect the result.
CY and AC are reset.
Example: XRI 86H.
Logical Instructions
Opcode Operand Description
RRC None Rotate accumulator right
Each binary bit of the accumulator is rotated right by one
position.
Bit D0 is placed in the position of D7 as well as in the
Carry flag.
CY is modified according to bit D0.
S, Z, P, AC are not affected.
Example: RRC.
Logical Instructions
Opcode Operand Description
RAL None Rotate accumulator left through carry
Each binary bit of the accumulator is rotated left by one
position through the Carry flag.
Bit D7 is placed in the Carry flag, and the Carry flag is
placed in the least significant position D0.
CY is modified according to bit D7.
S, Z, P, AC are not affected.
Example: RAL.
Logical Instructions
Opcode Operand Description
RAR None Rotate accumulator right through carry
Each binary bit of the accumulator is rotated right by one
position through the Carry flag.
Bit D0 is placed in the Carry flag, and the Carry flag is
placed in the most significant position D7.
CY is modified according to bit D0.
S, Z, P, AC are not affected.
Example: RAR.
Logical Instructions
Opcode Operand Description
CMA None Complement accumulator
The contents of the accumulator are complemented.
No flags are affected.
Example: CMA.
Logical Instructions
Opcode Operand Description
CMC None Complement carry
The Carry flag is complemented.
No other flags are affected.
Example: CMC.
Logical Instructions
Opcode Operand Description
STC None Set carry
The Carry flag is set to 1.
No other flags are affected.
Example: STC.
8085 Instruction Set
26
Summary Logical Group
This group performs logical (Boolean) operations on data in
registers and memory and on condition flags.
 These instructions enable you to set specific bits in the
accumulator ON or OFF.
ANA Logical AND with Accumulator
ANI Logical AND with Accumulator Using Immediate
Data
ORA Logical OR with Accumulator
OR Logical OR with Accumulator Using Immediate
Data
XRA Exclusive Logical OR with Accumulator
XRI Exclusive OR Using Immediate Data
8085 Instruction Set
27
The Compare instructions compare the content of an 8-bit value with
the contents of the accumulator;
CMP Compare
CPI Compare Using Immediate Data
The rotate instructions shift the contents of the accumulator one bit
position to the left or right:
RLC Rotate Accumulator Left
RRC Rotate Accumulator Right
RAL Rotate Left Through Carry
RAR Rotate Right Through Carry
Complement and carry flag instructions:
CMA Complement Accumulator
CMC Complement Carry Flag
STC Set Carry Flag
Reference
Microprocessor Architecture, programming, and
Application with the 8085 – Ramesh Gaonkar
Thank youThank you

More Related Content

What's hot

8085 branching instruction
8085 branching instruction8085 branching instruction
8085 branching instructionprashant1271
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051SARITHA REDDY
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorVikas Gupta
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086saurav kumar
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notesDr.YNM
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051hello_priti
 
PPT on 8085 Microprocessor
PPT on 8085 Microprocessor  PPT on 8085 Microprocessor
PPT on 8085 Microprocessor DebrajJana4
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directivesSARITHA REDDY
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkarSAQUIB AHMAD
 
80486 microprocessor
80486 microprocessor80486 microprocessor
80486 microprocessorMihika Shah
 
Internal architecture-of-8086
Internal architecture-of-8086Internal architecture-of-8086
Internal architecture-of-8086Estiak Khan
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Urvashi Singh
 
Memory segmentation-of-8086
Memory segmentation-of-8086Memory segmentation-of-8086
Memory segmentation-of-8086mudulin
 

What's hot (20)

Arithmetic and logical instructions
Arithmetic and logical instructionsArithmetic and logical instructions
Arithmetic and logical instructions
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
8085 branching instruction
8085 branching instruction8085 branching instruction
8085 branching instruction
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessor
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notes
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
PPT on 8085 Microprocessor
PPT on 8085 Microprocessor  PPT on 8085 Microprocessor
PPT on 8085 Microprocessor
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directives
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
80486 microprocessor
80486 microprocessor80486 microprocessor
80486 microprocessor
 
Internal architecture-of-8086
Internal architecture-of-8086Internal architecture-of-8086
Internal architecture-of-8086
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Memory segmentation-of-8086
Memory segmentation-of-8086Memory segmentation-of-8086
Memory segmentation-of-8086
 

Similar to Logical instruction of 8085

itft-Instruction set-of-8085
itft-Instruction set-of-8085itft-Instruction set-of-8085
itft-Instruction set-of-8085Shifali Sharma
 
instruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).pptinstruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).pptssuserb448e2
 
Instructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRInstructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRTHEE CAVE
 
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORLOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORRamaPrabha24
 
Types of instruction in 8085 microprocessor
Types of instruction in 8085 microprocessorTypes of instruction in 8085 microprocessor
Types of instruction in 8085 microprocessorsamarthpawar9890
 
microprocessor ppt (branching and logical instructions)
microprocessor ppt (branching and logical instructions)microprocessor ppt (branching and logical instructions)
microprocessor ppt (branching and logical instructions)Nemish Bhojani
 
Microprocessor Basics CH-3
Microprocessor Basics CH-3Microprocessor Basics CH-3
Microprocessor Basics CH-3Neelam Kapoor
 
Instruction set of 8085 microprocessor
Instruction set of 8085 microprocessorInstruction set of 8085 microprocessor
Instruction set of 8085 microprocessorRahul Sahu
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction setJLoknathDora
 
Mpmc i nstruction_ppt1.6_-_arthamatic_logic
Mpmc i nstruction_ppt1.6_-_arthamatic_logicMpmc i nstruction_ppt1.6_-_arthamatic_logic
Mpmc i nstruction_ppt1.6_-_arthamatic_logickalpana ravinder
 
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSINTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSSwapnil Mishra
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Shubham Singh
 
Unit 2 Instruction set.pdf
Unit 2 Instruction set.pdfUnit 2 Instruction set.pdf
Unit 2 Instruction set.pdfHimanshuPant41
 

Similar to Logical instruction of 8085 (20)

itft-Instruction set-of-8085
itft-Instruction set-of-8085itft-Instruction set-of-8085
itft-Instruction set-of-8085
 
8085 Instructions.pdf
8085 Instructions.pdf8085 Instructions.pdf
8085 Instructions.pdf
 
Instruction set of 8085
Instruction set of 8085Instruction set of 8085
Instruction set of 8085
 
instruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).pptinstruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).ppt
 
Instructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRInstructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIR
 
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORLOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
 
8085 instructions
8085 instructions8085 instructions
8085 instructions
 
8085 instructions details
8085 instructions details8085 instructions details
8085 instructions details
 
Types of instruction in 8085 microprocessor
Types of instruction in 8085 microprocessorTypes of instruction in 8085 microprocessor
Types of instruction in 8085 microprocessor
 
microprocessor ppt (branching and logical instructions)
microprocessor ppt (branching and logical instructions)microprocessor ppt (branching and logical instructions)
microprocessor ppt (branching and logical instructions)
 
Microprocessor Basics CH-3
Microprocessor Basics CH-3Microprocessor Basics CH-3
Microprocessor Basics CH-3
 
Instruction set of 8085 microprocessor
Instruction set of 8085 microprocessorInstruction set of 8085 microprocessor
Instruction set of 8085 microprocessor
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Mpmc i nstruction_ppt1.6_-_arthamatic_logic
Mpmc i nstruction_ppt1.6_-_arthamatic_logicMpmc i nstruction_ppt1.6_-_arthamatic_logic
Mpmc i nstruction_ppt1.6_-_arthamatic_logic
 
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSINTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085
 
UNIT II.pptx
UNIT II.pptxUNIT II.pptx
UNIT II.pptx
 
8085 instructions
8085 instructions8085 instructions
8085 instructions
 
8085 instruction-set part 1
8085 instruction-set part 18085 instruction-set part 1
8085 instruction-set part 1
 
Unit 2 Instruction set.pdf
Unit 2 Instruction set.pdfUnit 2 Instruction set.pdf
Unit 2 Instruction set.pdf
 

More from vishalgohel12195

Variable frequency drive and variable frequency control
Variable frequency drive and variable frequency controlVariable frequency drive and variable frequency control
Variable frequency drive and variable frequency controlvishalgohel12195
 
Self control of synchronous motor drives
Self control of synchronous motor drivesSelf control of synchronous motor drives
Self control of synchronous motor drivesvishalgohel12195
 
Owen’s bridge and measurement of increment inductance
Owen’s bridge and measurement of increment inductanceOwen’s bridge and measurement of increment inductance
Owen’s bridge and measurement of increment inductancevishalgohel12195
 
Initial and final condition for circuit
Initial and final condition for circuitInitial and final condition for circuit
Initial and final condition for circuitvishalgohel12195
 
FSK , FM DEMODULATOR & VOLTAGE REGULATOR ICS
FSK , FM DEMODULATOR & VOLTAGE REGULATOR ICS  FSK , FM DEMODULATOR & VOLTAGE REGULATOR ICS
FSK , FM DEMODULATOR & VOLTAGE REGULATOR ICS vishalgohel12195
 
Differential equations of first order
Differential equations of first orderDifferential equations of first order
Differential equations of first ordervishalgohel12195
 
Cost for production including breaking analysis
Cost for production including breaking  analysisCost for production including breaking  analysis
Cost for production including breaking analysisvishalgohel12195
 
Concept of general terms pertaining to rotating machines
Concept of general terms pertaining to rotating machinesConcept of general terms pertaining to rotating machines
Concept of general terms pertaining to rotating machinesvishalgohel12195
 
Transfer function and mathematical modeling
Transfer  function  and  mathematical  modelingTransfer  function  and  mathematical  modeling
Transfer function and mathematical modelingvishalgohel12195
 
Sag in overhead transmission line, sag calculation &amp; string chart
Sag in overhead transmission line, sag   calculation &amp; string chartSag in overhead transmission line, sag   calculation &amp; string chart
Sag in overhead transmission line, sag calculation &amp; string chartvishalgohel12195
 
Protection against overvoltage
Protection against overvoltageProtection against overvoltage
Protection against overvoltagevishalgohel12195
 
Pantograph,catenary wire,smothing reactor
Pantograph,catenary wire,smothing reactorPantograph,catenary wire,smothing reactor
Pantograph,catenary wire,smothing reactorvishalgohel12195
 
On load tap changer in a.c. locomotive transformer &amp; air blast circuit b...
On load tap changer in a.c. locomotive transformer  &amp; air blast circuit b...On load tap changer in a.c. locomotive transformer  &amp; air blast circuit b...
On load tap changer in a.c. locomotive transformer &amp; air blast circuit b...vishalgohel12195
 
Effect of non sinusoidal waveform of a.c. machine performance
Effect of non sinusoidal waveform of a.c. machine performanceEffect of non sinusoidal waveform of a.c. machine performance
Effect of non sinusoidal waveform of a.c. machine performancevishalgohel12195
 
Disadvantages of corona, radio interference, inductive interference between p...
Disadvantages of corona, radio interference, inductive interference between p...Disadvantages of corona, radio interference, inductive interference between p...
Disadvantages of corona, radio interference, inductive interference between p...vishalgohel12195
 
Design, Planning and Layout of high voltage laboratory
Design, Planning and Layout of high voltage laboratory Design, Planning and Layout of high voltage laboratory
Design, Planning and Layout of high voltage laboratory vishalgohel12195
 
Design considerations of electrical installations
Design considerations of electrical installationsDesign considerations of electrical installations
Design considerations of electrical installationsvishalgohel12195
 

More from vishalgohel12195 (20)

Variable frequency drive and variable frequency control
Variable frequency drive and variable frequency controlVariable frequency drive and variable frequency control
Variable frequency drive and variable frequency control
 
Self control of synchronous motor drives
Self control of synchronous motor drivesSelf control of synchronous motor drives
Self control of synchronous motor drives
 
Owen’s bridge and measurement of increment inductance
Owen’s bridge and measurement of increment inductanceOwen’s bridge and measurement of increment inductance
Owen’s bridge and measurement of increment inductance
 
Initial and final condition for circuit
Initial and final condition for circuitInitial and final condition for circuit
Initial and final condition for circuit
 
FSK , FM DEMODULATOR & VOLTAGE REGULATOR ICS
FSK , FM DEMODULATOR & VOLTAGE REGULATOR ICS  FSK , FM DEMODULATOR & VOLTAGE REGULATOR ICS
FSK , FM DEMODULATOR & VOLTAGE REGULATOR ICS
 
Differential equations of first order
Differential equations of first orderDifferential equations of first order
Differential equations of first order
 
Cost for production including breaking analysis
Cost for production including breaking  analysisCost for production including breaking  analysis
Cost for production including breaking analysis
 
Concept of general terms pertaining to rotating machines
Concept of general terms pertaining to rotating machinesConcept of general terms pertaining to rotating machines
Concept of general terms pertaining to rotating machines
 
Transfer function and mathematical modeling
Transfer  function  and  mathematical  modelingTransfer  function  and  mathematical  modeling
Transfer function and mathematical modeling
 
armature Winding
armature Windingarmature Winding
armature Winding
 
Switching regulators
Switching regulatorsSwitching regulators
Switching regulators
 
Sag in overhead transmission line, sag calculation &amp; string chart
Sag in overhead transmission line, sag   calculation &amp; string chartSag in overhead transmission line, sag   calculation &amp; string chart
Sag in overhead transmission line, sag calculation &amp; string chart
 
Rectifier
RectifierRectifier
Rectifier
 
Protection against overvoltage
Protection against overvoltageProtection against overvoltage
Protection against overvoltage
 
Pantograph,catenary wire,smothing reactor
Pantograph,catenary wire,smothing reactorPantograph,catenary wire,smothing reactor
Pantograph,catenary wire,smothing reactor
 
On load tap changer in a.c. locomotive transformer &amp; air blast circuit b...
On load tap changer in a.c. locomotive transformer  &amp; air blast circuit b...On load tap changer in a.c. locomotive transformer  &amp; air blast circuit b...
On load tap changer in a.c. locomotive transformer &amp; air blast circuit b...
 
Effect of non sinusoidal waveform of a.c. machine performance
Effect of non sinusoidal waveform of a.c. machine performanceEffect of non sinusoidal waveform of a.c. machine performance
Effect of non sinusoidal waveform of a.c. machine performance
 
Disadvantages of corona, radio interference, inductive interference between p...
Disadvantages of corona, radio interference, inductive interference between p...Disadvantages of corona, radio interference, inductive interference between p...
Disadvantages of corona, radio interference, inductive interference between p...
 
Design, Planning and Layout of high voltage laboratory
Design, Planning and Layout of high voltage laboratory Design, Planning and Layout of high voltage laboratory
Design, Planning and Layout of high voltage laboratory
 
Design considerations of electrical installations
Design considerations of electrical installationsDesign considerations of electrical installations
Design considerations of electrical installations
 

Recently uploaded

IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...Call girls in Ahmedabad High profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Recently uploaded (20)

IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 

Logical instruction of 8085

  • 1. Topic Logical Instruction Of 8085Logical Instruction Of 8085
  • 2. Instruction Set of 8085 An instruction is a binary pattern designed inside a microprocessor to perform a specific function. The entire group of instructions that a microprocessor supports is called Instruction Set. 8085 has 246 instructions. Each instruction is represented by an 8-bit binary value. These 8-bits of binary value is called Op-Code or Instruction Byte.
  • 3. Classification of Instruction Set Data Transfer Instruction Arithmetic Instructions Branching Instructions Control Instructions Logical Instructions
  • 4. Logical Instructions These instructions perform logical operations on data stored in registers, memory and status flags. The logical operations are: AND OR XOR Rotate Compare Complement
  • 5. AND, OR, XOR Any 8-bit data, or the contents of register, or memory location can logically have AND operation OR operation XOR operation with the contents of accumulator. The result is stored in accumulator.
  • 6. Rotate Each bit in the accumulator can be shifted either left or right to the next position.
  • 7. Compare Any 8-bit data, or the contents of register, or memory location can be compares for: Equality Greater Than Less Than with the contents of accumulator. The result is reflected in status flags.
  • 8. Complement The contents of accumulator can be complemented. Each 0 is replaced by 1 and each 1 is replaced by 0.
  • 9. Logical Instructions Opcode Operand Description CMP R M Compare register or memory with accumulator The contents of the operand (register or memory) are compared with the contents of the accumulator. Both contents are preserved . The result of the comparison is shown by setting the flags of the PSW as follows:
  • 10. Logical Instructions Opcode Operand Description CMP R M Compare register or memory with accumulator if (A) < (reg/mem): carry flag is set if (A) = (reg/mem): zero flag is set if (A) > (reg/mem): carry and zero flags are reset. Example: CMP B or CMP M
  • 11. Logical Instructions Opcode Operand Description CPI 8-bit data Compare immediate with accumulator The 8-bit data is compared with the contents of accumulator. The values being compared remain unchanged. The result of the comparison is shown by setting the flags of the PSW as follows:
  • 12. Logical Instructions Opcode Operand Description CPI 8-bit data Compare immediate with accumulator if (A) < data: carry flag is set if (A) = data: zero flag is set if (A) > data: carry and zero flags are reset Example: CPI 89H
  • 13. Logical Instructions Opcode Operand Description ANA R M Logical AND register or memory with accumulator The contents of the accumulator are logically ANDed with the contents of register or memory. The result is placed in the accumulator. If the operand is a memory location, its address is specified by the contents of H-L pair. S, Z, P are modified to reflect the result of the operation. CY is reset and AC is set. Example: ANA B or ANA M.
  • 14. Logical Instructions Opcode Operand Description ANI 8-bit data Logical AND immediate with accumulator The contents of the accumulator are logically ANDed with the 8-bit data. The result is placed in the accumulator. S, Z, P are modified to reflect the result. CY is reset, AC is set. Example: ANI 86H.
  • 15. Logical Instructions Opcode Operand Description XRA R M Exclusive OR register or memory with accumulator  The contents of the accumulator are XORed with the contents of the register or memory.  The result is placed in the accumulator.  If the operand is a memory location, its address is specified by the contents of H-L pair.  S, Z, P are modified to reflect the result of the operation.  CY and AC are reset.  Example: XRA B or XRA M.
  • 16. Logical Instructions Opcode Operand Description ORA R M Logical OR register or memory with accumulator  The contents of the accumulator are logically ORed with the contents of the register or memory.  The result is placed in the accumulator.  If the operand is a memory location, its address is specified by the contents of H-L pair.  S, Z, P are modified to reflect the result.  CY and AC are reset.  Example: ORA B or ORA M.
  • 17. Logical Instructions Opcode Operand Description ORI 8-bit data Logical OR immediate with accumulator The contents of the accumulator are logically ORed with the 8-bit data. The result is placed in the accumulator. S, Z, P are modified to reflect the result. CY and AC are reset. Example: ORI 86H.
  • 18. Logical Instructions Opcode Operand Description XRA R M Logical XOR register or memory with accumulator The contents of the accumulator are XORed with the contents of the register or memory. The result is placed in the accumulator. If the operand is a memory location, its address is specified by the contents of H-L pair. S, Z, P are modified to reflect the result of the operation. CY and AC are reset. Example: XRA B or XRA M.
  • 19. Logical Instructions Opcode Operand Description XRI 8-bit data XOR immediate with accumulator The contents of the accumulator are XORed with the 8-bit data. The result is placed in the accumulator. S, Z, P are modified to reflect the result. CY and AC are reset. Example: XRI 86H.
  • 20. Logical Instructions Opcode Operand Description RRC None Rotate accumulator right Each binary bit of the accumulator is rotated right by one position. Bit D0 is placed in the position of D7 as well as in the Carry flag. CY is modified according to bit D0. S, Z, P, AC are not affected. Example: RRC.
  • 21. Logical Instructions Opcode Operand Description RAL None Rotate accumulator left through carry Each binary bit of the accumulator is rotated left by one position through the Carry flag. Bit D7 is placed in the Carry flag, and the Carry flag is placed in the least significant position D0. CY is modified according to bit D7. S, Z, P, AC are not affected. Example: RAL.
  • 22. Logical Instructions Opcode Operand Description RAR None Rotate accumulator right through carry Each binary bit of the accumulator is rotated right by one position through the Carry flag. Bit D0 is placed in the Carry flag, and the Carry flag is placed in the most significant position D7. CY is modified according to bit D0. S, Z, P, AC are not affected. Example: RAR.
  • 23. Logical Instructions Opcode Operand Description CMA None Complement accumulator The contents of the accumulator are complemented. No flags are affected. Example: CMA.
  • 24. Logical Instructions Opcode Operand Description CMC None Complement carry The Carry flag is complemented. No other flags are affected. Example: CMC.
  • 25. Logical Instructions Opcode Operand Description STC None Set carry The Carry flag is set to 1. No other flags are affected. Example: STC.
  • 26. 8085 Instruction Set 26 Summary Logical Group This group performs logical (Boolean) operations on data in registers and memory and on condition flags.  These instructions enable you to set specific bits in the accumulator ON or OFF. ANA Logical AND with Accumulator ANI Logical AND with Accumulator Using Immediate Data ORA Logical OR with Accumulator OR Logical OR with Accumulator Using Immediate Data XRA Exclusive Logical OR with Accumulator XRI Exclusive OR Using Immediate Data
  • 27. 8085 Instruction Set 27 The Compare instructions compare the content of an 8-bit value with the contents of the accumulator; CMP Compare CPI Compare Using Immediate Data The rotate instructions shift the contents of the accumulator one bit position to the left or right: RLC Rotate Accumulator Left RRC Rotate Accumulator Right RAL Rotate Left Through Carry RAR Rotate Right Through Carry Complement and carry flag instructions: CMA Complement Accumulator CMC Complement Carry Flag STC Set Carry Flag
  • 28. Reference Microprocessor Architecture, programming, and Application with the 8085 – Ramesh Gaonkar