SlideShare a Scribd company logo
1 of 17
B.RAMA PRABHA
ASSISTANT PROFESSOR,
DEPARTMENT OF COMPUTER SCIENCE,
K.C.S.KASI NADAR COLLEGE OF ARTS & SCIENCE,
CHENNAI-21
LOGICAL OPERATIONS
A Microprocessor is a programmable logic chip.it
can perform all logic functions of the hard wired
logic through its instruction set.The 8085 instruction
set includes such logic function such as
AND,OR,EX-OR,COMPLEMENT.
2
LOGICAL OPERATIONS
The opcode of the logical functions are as follows.
 AND – AND (Logical AND with a content of Register)
 ANI – AND IMMEDIATE (Logical AND 8-bit data)
 ORA – OR (Logical OR with a content of Register)
 ORI – OR IMMEDIATE(Logical OR 8-bit data)
 XRA – X-OR(Logical X-OR with a content of Register)
 XRI – X-OR IMMEDIATE(Logical X-OR 8-bit data)
3
AND Logic Instructions
ANA(LOGICAL AND)
 This is a one byte instruction
 The contents of a register or any memory location are logically
ANDed with the contents stored in the accumulator register. The
resulting answer is saved in the accumulator.
Example : ANA B , ANA 2000H
4
The Opcode The Operands Description
ANA
R Logical AND the register with accumulator
M
Logical AND the contents pointed by the memory
address pointed by the HL pair (M) with the contents
of the accumulator
ANI (AND IMMEDIATE)
 This is a two byte instruction
 The ANI instruction works exactly like the ANA instruction but
performs logical AND of 8-bit immediate value with the contents of
the accumulator register..
Example : ANI 04H 5
The Opcode The Operands Description
ANI 8-bit immediate data Logically AND immediate data with accumulator
OR Logic Instructions
ORA(LOGICAL OR)
 This is a one byte instruction
 The contents of a register or any memory location are logically
ORed with the contents stored in the accumulator register. The
resulting answer is saved in the accumulator.
Example : ORA B ,ORA 7580H
6
The Opcode The Operands Description
ORA
R Logical OR the register with accumulator
M
Logical OR the contents of the memory location
pointed by the HL pair (M) with the contents of the
accumulator
OR Logic Instructions
ORI(LOGICAL OR WITH DATA)
 This is a two byte instruction
 The ORI instruction works exactly like the ORA instruction but
performs logical OR of 8-bit immediate value with the contents of
the accumulator register.
Example : ORI 44H 7
The Opcode The Operands Description
ORI 8-bit immediate data Logically OR immediate data with accumulator
XRA (LOGICALLY OR WITH REGISTER OR MEMORY LOCATION)
 This is a one byte instruction
 The contents of a register or any memory location are logically
XORed with the contents stored in the accumulator register. The
resulting answer is saved in the accumulator. If the operand
happens to be a memory location, then its address is mentioned by
the contents of the H-L pair.
Example : XRA B ,XRA 7580H
8
The Opcode The Operands Description
XRA
R Logical XOR the register with accumulator
M
Logical XOR the contents of the memory address
pointed by the HL pair (M) with the contents of the
accumulator
XRI(LOGICALLY OR WITH DATA)
 This is a two byte instruction
 The XRI instruction works exactly like the XRA instruction but
performs logical XOR of 8-bit immediate value with the contents of
the accumulator register
Example : XRI 44H
9
The Opcode The Operands Description
XRI 8-bit immediate data Logically XOR immediate data with accumulator
Rotate Instructions
RLC(ROTATE ACCUMULATOR LEFT)
 This is a ONE byte instruction
 The RLC instruction causes each binary bit in the accumulator register to be rotated by one
position to its left. The MSB value is shifted to the LSB as well as the Carry Flag in the
PSW. The other PSW bits, such as S, Z, P, or AC, are not affected by this
operation.Example : RLC
10
The Opcode The Operands Description
RLC None Rotate Accumulator Left
Rotate Instructions
RRC(ROTATE ACCUMULATOR RIGHT)
 This is a ONE byte instruction
 The RRC instruction causes each binary bit in the accumulator register to be rotated by one
position to its right. The LSB value is shifted to the MSB as well as the Carry Flag in the
PSW. The other PSW bits, such as S, Z, P, or AC, are not affected by this
operation.Example : RRC
11
The Opcode The Operands Description
RRC None Rotate Accumulator Right
Rotate Instructions
RAL(ROTATE ACCUMULATOR LEFT WITH CARRY)
 This is a ONE byte instruction
 The RAL instruction causes each binary bit in the accumulator register to be rotated by one
position to its left through the carry flag as well. The MSB value is shifted to the Carry
Flag, and the Carry Flag in the PSW is shifted to the LSB.Example : RAL
12
The Opcode The Operands Description
RAL None Rotate Accumulator Left including the Carry
Rotate Instructions
RAL(ROTATE ACCUMULATOR LEFT)
 This is a ONE byte instruction
 The RAL instruction causes each binary bit in the accumulator register to be rotated by one
position to its left through the carry flag as well. The MSB value is shifted to the Carry
Flag, and the Carry Flag in the PSW is shifted to the LSB.Example : RAL
13
The Opcode The Operands Description
RAL None Rotate Accumulator Left including the Carry
Complement Instructions
CMA(COMPLEMENT ACCUMULATOR)
 This is a ONE byte instruction
 The CMA instruction complements the Content of the accumulator. No flags are affected.
 Example : CMA
14
The Opcode The Operands Description
CMA None Complement Accumulator
Complement Instructions
CMC(COMPLEMENT CARRY FLAG)
 This is a ONE byte instruction
 The CMC instruction complements the Carry Flag bit. The other PSW bits, such as S, Z, P,
or AC, are not affected by this operation.
Example : CMC
15
The Opcode The Operands Description
CMC None Complement Carry Flag
Set Instruction
STC(SET CARRY FLAG)
 This is a ONE byte instruction
 The STC instruction sets the Carry Flag bit to 1. The other PSW bits, such as S, Z, P, or
AC, are not affected by this operation
Example : STC
16
The Opcode The Operands Description
STC None Set Carry Flag
“
17

More Related Content

What's hot

8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkarSAQUIB AHMAD
 
PPT on 8085 Microprocessor
PPT on 8085 Microprocessor  PPT on 8085 Microprocessor
PPT on 8085 Microprocessor DebrajJana4
 
Logical instruction of 8085
Logical instruction of 8085Logical instruction of 8085
Logical instruction of 8085vishalgohel12195
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introductionShubham Singh
 
Stack in 8085 microprocessor
Stack in 8085 microprocessorStack in 8085 microprocessor
Stack in 8085 microprocessorhepzijustin
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA ControllerShivamSood22
 
Modes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationModes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationMOHIT AGARWAL
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086saurav kumar
 
Direct memory access
Direct memory accessDirect memory access
Direct memory accessshubham kuwar
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chipsSrikrishna Thota
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorRavi Anand
 

What's hot (20)

8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
PPT on 8085 Microprocessor
PPT on 8085 Microprocessor  PPT on 8085 Microprocessor
PPT on 8085 Microprocessor
 
8251 USART
8251 USART8251 USART
8251 USART
 
Logical instruction of 8085
Logical instruction of 8085Logical instruction of 8085
Logical instruction of 8085
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introduction
 
Stack in 8085 microprocessor
Stack in 8085 microprocessorStack in 8085 microprocessor
Stack in 8085 microprocessor
 
Memory interfacing of microprocessor 8085
Memory interfacing of microprocessor 8085Memory interfacing of microprocessor 8085
Memory interfacing of microprocessor 8085
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Memory interfacing
Memory interfacingMemory interfacing
Memory interfacing
 
Modes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationModes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output Organization
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Timing diagram 8085 microprocessor
Timing diagram 8085 microprocessorTiming diagram 8085 microprocessor
Timing diagram 8085 microprocessor
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Direct memory access
Direct memory accessDirect memory access
Direct memory access
 
Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
 
JK flip flops
JK flip flopsJK flip flops
JK flip flops
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
 
8051 memory
8051 memory8051 memory
8051 memory
 

Similar to LOGICAL OPERATIONS IN 8085 MICROPROCESSOR

itft-Instruction set-of-8085
itft-Instruction set-of-8085itft-Instruction set-of-8085
itft-Instruction set-of-8085Shifali Sharma
 
Microprocessor Basics CH-3
Microprocessor Basics CH-3Microprocessor Basics CH-3
Microprocessor Basics CH-3Neelam Kapoor
 
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORRamaPrabha24
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085saleForce
 
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
 
unit2-8085-programminG.pptx
unit2-8085-programminG.pptxunit2-8085-programminG.pptx
unit2-8085-programminG.pptxRajaSekhar533255
 
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
 
8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONSRamaPrabha24
 
Lecture 04 Logical Group of Instructions
Lecture 04 Logical Group of InstructionsLecture 04 Logical Group of Instructions
Lecture 04 Logical Group of InstructionsZeeshan Ahmed
 
microcontroller_instruction_set for ENGINEERING STUDENTS
microcontroller_instruction_set for  ENGINEERING STUDENTSmicrocontroller_instruction_set for  ENGINEERING STUDENTS
microcontroller_instruction_set for ENGINEERING STUDENTSssuser2b759d
 
8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).pptKanikaJindal9
 

Similar to LOGICAL OPERATIONS IN 8085 MICROPROCESSOR (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
 
Microprocessor Basics CH-3
Microprocessor Basics CH-3Microprocessor Basics CH-3
Microprocessor Basics CH-3
 
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
 
UNIT II.pptx
UNIT II.pptxUNIT II.pptx
UNIT II.pptx
 
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
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Instruction set of 8085
Instruction set of 8085Instruction set of 8085
Instruction set of 8085
 
8085 instructions
8085 instructions8085 instructions
8085 instructions
 
Microcontroller .pptx
Microcontroller .pptxMicrocontroller .pptx
Microcontroller .pptx
 
8085 instructions details
8085 instructions details8085 instructions details
8085 instructions details
 
Instructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRInstructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIR
 
unit2-8085-programminG.pptx
unit2-8085-programminG.pptxunit2-8085-programminG.pptx
unit2-8085-programminG.pptx
 
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
 
8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS
 
Lecture 04 Logical Group of Instructions
Lecture 04 Logical Group of InstructionsLecture 04 Logical Group of Instructions
Lecture 04 Logical Group of Instructions
 
microcontroller_instruction_set for ENGINEERING STUDENTS
microcontroller_instruction_set for  ENGINEERING STUDENTSmicrocontroller_instruction_set for  ENGINEERING STUDENTS
microcontroller_instruction_set for ENGINEERING STUDENTS
 
8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt
 

More from RamaPrabha24

Dynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorDynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorRamaPrabha24
 
programming techniques
programming techniquesprogramming techniques
programming techniquesRamaPrabha24
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modesRamaPrabha24
 
instruction set and classificaion
instruction set and classificaioninstruction set and classificaion
instruction set and classificaionRamaPrabha24
 
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONSRamaPrabha24
 
PINDIAGRAM OF 8085 MICROPROCESSOR
PINDIAGRAM OF 8085 MICROPROCESSORPINDIAGRAM OF 8085 MICROPROCESSOR
PINDIAGRAM OF 8085 MICROPROCESSORRamaPrabha24
 
memory classification
memory classificationmemory classification
memory classificationRamaPrabha24
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessorRamaPrabha24
 
Basic terms used in microprocessor
Basic terms used in microprocessorBasic terms used in microprocessor
Basic terms used in microprocessorRamaPrabha24
 

More from RamaPrabha24 (10)

Dynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorDynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessor
 
programming techniques
programming techniquesprogramming techniques
programming techniques
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
instruction set and classificaion
instruction set and classificaioninstruction set and classificaion
instruction set and classificaion
 
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
 
PINDIAGRAM OF 8085 MICROPROCESSOR
PINDIAGRAM OF 8085 MICROPROCESSORPINDIAGRAM OF 8085 MICROPROCESSOR
PINDIAGRAM OF 8085 MICROPROCESSOR
 
memory classification
memory classificationmemory classification
memory classification
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessor
 
Basic terms used in microprocessor
Basic terms used in microprocessorBasic terms used in microprocessor
Basic terms used in microprocessor
 
Applets in Java
Applets in JavaApplets in Java
Applets in Java
 

Recently uploaded

Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 

Recently uploaded (20)

Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 

LOGICAL OPERATIONS IN 8085 MICROPROCESSOR

  • 1. B.RAMA PRABHA ASSISTANT PROFESSOR, DEPARTMENT OF COMPUTER SCIENCE, K.C.S.KASI NADAR COLLEGE OF ARTS & SCIENCE, CHENNAI-21
  • 2. LOGICAL OPERATIONS A Microprocessor is a programmable logic chip.it can perform all logic functions of the hard wired logic through its instruction set.The 8085 instruction set includes such logic function such as AND,OR,EX-OR,COMPLEMENT. 2
  • 3. LOGICAL OPERATIONS The opcode of the logical functions are as follows.  AND – AND (Logical AND with a content of Register)  ANI – AND IMMEDIATE (Logical AND 8-bit data)  ORA – OR (Logical OR with a content of Register)  ORI – OR IMMEDIATE(Logical OR 8-bit data)  XRA – X-OR(Logical X-OR with a content of Register)  XRI – X-OR IMMEDIATE(Logical X-OR 8-bit data) 3
  • 4. AND Logic Instructions ANA(LOGICAL AND)  This is a one byte instruction  The contents of a register or any memory location are logically ANDed with the contents stored in the accumulator register. The resulting answer is saved in the accumulator. Example : ANA B , ANA 2000H 4 The Opcode The Operands Description ANA R Logical AND the register with accumulator M Logical AND the contents pointed by the memory address pointed by the HL pair (M) with the contents of the accumulator
  • 5. ANI (AND IMMEDIATE)  This is a two byte instruction  The ANI instruction works exactly like the ANA instruction but performs logical AND of 8-bit immediate value with the contents of the accumulator register.. Example : ANI 04H 5 The Opcode The Operands Description ANI 8-bit immediate data Logically AND immediate data with accumulator
  • 6. OR Logic Instructions ORA(LOGICAL OR)  This is a one byte instruction  The contents of a register or any memory location are logically ORed with the contents stored in the accumulator register. The resulting answer is saved in the accumulator. Example : ORA B ,ORA 7580H 6 The Opcode The Operands Description ORA R Logical OR the register with accumulator M Logical OR the contents of the memory location pointed by the HL pair (M) with the contents of the accumulator
  • 7. OR Logic Instructions ORI(LOGICAL OR WITH DATA)  This is a two byte instruction  The ORI instruction works exactly like the ORA instruction but performs logical OR of 8-bit immediate value with the contents of the accumulator register. Example : ORI 44H 7 The Opcode The Operands Description ORI 8-bit immediate data Logically OR immediate data with accumulator
  • 8. XRA (LOGICALLY OR WITH REGISTER OR MEMORY LOCATION)  This is a one byte instruction  The contents of a register or any memory location are logically XORed with the contents stored in the accumulator register. The resulting answer is saved in the accumulator. If the operand happens to be a memory location, then its address is mentioned by the contents of the H-L pair. Example : XRA B ,XRA 7580H 8 The Opcode The Operands Description XRA R Logical XOR the register with accumulator M Logical XOR the contents of the memory address pointed by the HL pair (M) with the contents of the accumulator
  • 9. XRI(LOGICALLY OR WITH DATA)  This is a two byte instruction  The XRI instruction works exactly like the XRA instruction but performs logical XOR of 8-bit immediate value with the contents of the accumulator register Example : XRI 44H 9 The Opcode The Operands Description XRI 8-bit immediate data Logically XOR immediate data with accumulator
  • 10. Rotate Instructions RLC(ROTATE ACCUMULATOR LEFT)  This is a ONE byte instruction  The RLC instruction causes each binary bit in the accumulator register to be rotated by one position to its left. The MSB value is shifted to the LSB as well as the Carry Flag in the PSW. The other PSW bits, such as S, Z, P, or AC, are not affected by this operation.Example : RLC 10 The Opcode The Operands Description RLC None Rotate Accumulator Left
  • 11. Rotate Instructions RRC(ROTATE ACCUMULATOR RIGHT)  This is a ONE byte instruction  The RRC instruction causes each binary bit in the accumulator register to be rotated by one position to its right. The LSB value is shifted to the MSB as well as the Carry Flag in the PSW. The other PSW bits, such as S, Z, P, or AC, are not affected by this operation.Example : RRC 11 The Opcode The Operands Description RRC None Rotate Accumulator Right
  • 12. Rotate Instructions RAL(ROTATE ACCUMULATOR LEFT WITH CARRY)  This is a ONE byte instruction  The RAL instruction causes each binary bit in the accumulator register to be rotated by one position to its left through the carry flag as well. The MSB value is shifted to the Carry Flag, and the Carry Flag in the PSW is shifted to the LSB.Example : RAL 12 The Opcode The Operands Description RAL None Rotate Accumulator Left including the Carry
  • 13. Rotate Instructions RAL(ROTATE ACCUMULATOR LEFT)  This is a ONE byte instruction  The RAL instruction causes each binary bit in the accumulator register to be rotated by one position to its left through the carry flag as well. The MSB value is shifted to the Carry Flag, and the Carry Flag in the PSW is shifted to the LSB.Example : RAL 13 The Opcode The Operands Description RAL None Rotate Accumulator Left including the Carry
  • 14. Complement Instructions CMA(COMPLEMENT ACCUMULATOR)  This is a ONE byte instruction  The CMA instruction complements the Content of the accumulator. No flags are affected.  Example : CMA 14 The Opcode The Operands Description CMA None Complement Accumulator
  • 15. Complement Instructions CMC(COMPLEMENT CARRY FLAG)  This is a ONE byte instruction  The CMC instruction complements the Carry Flag bit. The other PSW bits, such as S, Z, P, or AC, are not affected by this operation. Example : CMC 15 The Opcode The Operands Description CMC None Complement Carry Flag
  • 16. Set Instruction STC(SET CARRY FLAG)  This is a ONE byte instruction  The STC instruction sets the Carry Flag bit to 1. The other PSW bits, such as S, Z, P, or AC, are not affected by this operation Example : STC 16 The Opcode The Operands Description STC None Set Carry Flag