SlideShare a Scribd company logo
1 of 10
LOGICAL INSTRUCTIONS AND,OR,NOT,XOR,ROTATE,SWAP
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bitwise Logic ANL    AND  ORL    OR  XRL    XOR CPL    Complement   Examples: 00001111 10101100 ANL 00001111 10101100 ORL 00001111 10101100 XRL 10101100 CPL 00001100 10101111 10100011 01010011
anl  PSW, #0xE7 ;PSW AND 11100111 orl PSW, #0x18 ;PSW OR 00011000 xrl P1, #0x40 ;P1 XRL 01000000
Other Logic Instructions CLR  - clear RL  – rotate left RLC  – rotate left  through Carry RR  – rotate right RRC  – rotate right  through Carry SWAP – swap accumulator  nibbles
CLR (  Set all bits to 0 ) CLR A CLR byte (direct mode) CLR Ri (register mode) CLR @Ri  (register indirect mode)
Rotate ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rotate through Carry RRC a mov a, #0A9h ; a    A9 add a, #14h   ; a    BD (10111101), C  0 rrc a ; a     01011110, C  1 RLC a mov a, #3ch   ; a    3ch(00111100) setb c   ; c    1 rlc a ; a     01111001, C  1 C C
Swap SWAP a mov a, #72h   ; a    27h swap a ; a    27h
Rotate and Multiplication/Division ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

8051 assembly programming
8051 assembly programming8051 assembly programming
8051 assembly programmingsergeiseq
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerSudhanshu Janwadkar
 
Temperature Controller
Temperature ControllerTemperature Controller
Temperature ControllerSupriya Gorai
 
Project Report On 0-9 decade counter
Project Report On 0-9 decade counterProject Report On 0-9 decade counter
Project Report On 0-9 decade counterOmkar Rane
 
Mems gyroscope working, principle of operation of disc resonator gyroscope
Mems gyroscope working, principle of operation of disc resonator gyroscopeMems gyroscope working, principle of operation of disc resonator gyroscope
Mems gyroscope working, principle of operation of disc resonator gyroscopeAnkush Wawoo
 
Micro Processor Lab Manual!
Micro Processor Lab Manual!Micro Processor Lab Manual!
Micro Processor Lab Manual!PRABHAHARAN429
 
Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Jay Patel
 
Control systems engineering
Control systems engineeringControl systems engineering
Control systems engineeringAnisur Rahman
 
8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacing8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacingAmitabh Shukla
 
Mobile phone detector
Mobile phone detectorMobile phone detector
Mobile phone detectorKundan Kumar
 
8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051daniemol
 
Sensors And Actuators
Sensors And ActuatorsSensors And Actuators
Sensors And ActuatorsJinesh Patel
 
Chapter 16 timers and counters
Chapter 16 timers and countersChapter 16 timers and counters
Chapter 16 timers and countersforgotteniman
 
Pe 4030 ch 2 sensors and transducers part 1 final sept 20 2016
Pe 4030 ch 2 sensors and transducers  part 1 final  sept 20 2016Pe 4030 ch 2 sensors and transducers  part 1 final  sept 20 2016
Pe 4030 ch 2 sensors and transducers part 1 final sept 20 2016Charlton Inao
 

What's hot (20)

8051 assembly programming
8051 assembly programming8051 assembly programming
8051 assembly programming
 
LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
Microprocessor interview questions
Microprocessor interview questionsMicroprocessor interview questions
Microprocessor interview questions
 
Temperature Controller
Temperature ControllerTemperature Controller
Temperature Controller
 
Project Report On 0-9 decade counter
Project Report On 0-9 decade counterProject Report On 0-9 decade counter
Project Report On 0-9 decade counter
 
Mems gyroscope working, principle of operation of disc resonator gyroscope
Mems gyroscope working, principle of operation of disc resonator gyroscopeMems gyroscope working, principle of operation of disc resonator gyroscope
Mems gyroscope working, principle of operation of disc resonator gyroscope
 
4 io port-programming
4 io port-programming4 io port-programming
4 io port-programming
 
8051 Inturrpt
8051 Inturrpt8051 Inturrpt
8051 Inturrpt
 
Micro Processor Lab Manual!
Micro Processor Lab Manual!Micro Processor Lab Manual!
Micro Processor Lab Manual!
 
Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051
 
Control systems engineering
Control systems engineeringControl systems engineering
Control systems engineering
 
8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacing8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacing
 
Mobile phone detector
Mobile phone detectorMobile phone detector
Mobile phone detector
 
8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
Sensors And Actuators
Sensors And ActuatorsSensors And Actuators
Sensors And Actuators
 
Chapter 16 timers and counters
Chapter 16 timers and countersChapter 16 timers and counters
Chapter 16 timers and counters
 
8254 PIT
8254 PIT8254 PIT
8254 PIT
 
Pe 4030 ch 2 sensors and transducers part 1 final sept 20 2016
Pe 4030 ch 2 sensors and transducers  part 1 final  sept 20 2016Pe 4030 ch 2 sensors and transducers  part 1 final  sept 20 2016
Pe 4030 ch 2 sensors and transducers part 1 final sept 20 2016
 

Similar to logical 8051

Logical, Shift, and Rotate Instruction
Logical, Shift, and Rotate InstructionLogical, Shift, and Rotate Instruction
Logical, Shift, and Rotate InstructionBadrul Alam
 
Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051logesh waran
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential CircuitHeman Pathak
 
14827 unit 4_clocked_flip_flops
14827 unit 4_clocked_flip_flops14827 unit 4_clocked_flip_flops
14827 unit 4_clocked_flip_flopsSandeep Kumar
 
Arithmetic and logical instructions set
Arithmetic and logical instructions setArithmetic and logical instructions set
Arithmetic and logical instructions setRobert Almazan
 
B sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuitB sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuitRai University
 
Arithmetic instructions
Arithmetic instructionsArithmetic instructions
Arithmetic instructionsRobert Almazan
 
best slides latches.pdf
best slides latches.pdfbest slides latches.pdf
best slides latches.pdfAreebaShoukat4
 
ARM Architecture Instruction Set
ARM Architecture Instruction SetARM Architecture Instruction Set
ARM Architecture Instruction SetDwight Sabio
 
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-FlopsFYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-FlopsArti Parab Academics
 
Ir reverse engineering (1)
Ir reverse engineering (1)Ir reverse engineering (1)
Ir reverse engineering (1)raptor0102
 
Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4Asif Iqbal
 
Rs flipflop or SR flipFlop
Rs flipflop or SR flipFlop Rs flipflop or SR flipFlop
Rs flipflop or SR flipFlop Easy n Inspire L
 
SEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptxSEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptxThanmayiKumar
 

Similar to logical 8051 (20)

Logical, Shift, and Rotate Instruction
Logical, Shift, and Rotate InstructionLogical, Shift, and Rotate Instruction
Logical, Shift, and Rotate Instruction
 
Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051
 
[ASM]Lab7
[ASM]Lab7[ASM]Lab7
[ASM]Lab7
 
Shift register
Shift registerShift register
Shift register
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential Circuit
 
14827 unit 4_clocked_flip_flops
14827 unit 4_clocked_flip_flops14827 unit 4_clocked_flip_flops
14827 unit 4_clocked_flip_flops
 
tCh09.ppt
tCh09.ppttCh09.ppt
tCh09.ppt
 
Arithmetic and logical instructions set
Arithmetic and logical instructions setArithmetic and logical instructions set
Arithmetic and logical instructions set
 
flip-flop1.ppt
flip-flop1.pptflip-flop1.ppt
flip-flop1.ppt
 
B sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuitB sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuit
 
Logic Micro Operation
Logic Micro OperationLogic Micro Operation
Logic Micro Operation
 
Arithmetic instructions
Arithmetic instructionsArithmetic instructions
Arithmetic instructions
 
best slides latches.pdf
best slides latches.pdfbest slides latches.pdf
best slides latches.pdf
 
ARM Architecture Instruction Set
ARM Architecture Instruction SetARM Architecture Instruction Set
ARM Architecture Instruction Set
 
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-FlopsFYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
 
Ir reverse engineering (1)
Ir reverse engineering (1)Ir reverse engineering (1)
Ir reverse engineering (1)
 
Cs1104 11
Cs1104 11Cs1104 11
Cs1104 11
 
Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4
 
Rs flipflop or SR flipFlop
Rs flipflop or SR flipFlop Rs flipflop or SR flipFlop
Rs flipflop or SR flipFlop
 
SEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptxSEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptx
 

More from VJ Aiswaryadevi (15)

8051
80518051
8051
 
memory 8051
memory  8051memory  8051
memory 8051
 
interrupts
interruptsinterrupts
interrupts
 
mup
mupmup
mup
 
branch ins 8051
branch ins 8051branch ins 8051
branch ins 8051
 
boolean 8051
boolean 8051boolean 8051
boolean 8051
 
arithmetic ins in 8051
arithmetic ins in 8051arithmetic ins in 8051
arithmetic ins in 8051
 
8051 archi
8051 archi8051 archi
8051 archi
 
8051 microprocessor
8051 microprocessor8051 microprocessor
8051 microprocessor
 
8051 microprocessor
8051 microprocessor8051 microprocessor
8051 microprocessor
 
Groupware
GroupwareGroupware
Groupware
 
Db
DbDb
Db
 
302 B+Tree Ind Hash
302 B+Tree Ind Hash302 B+Tree Ind Hash
302 B+Tree Ind Hash
 
storage media
storage mediastorage media
storage media
 
B Trees
B TreesB Trees
B Trees
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

logical 8051

  • 2.
  • 3. Bitwise Logic ANL  AND ORL  OR XRL  XOR CPL  Complement Examples: 00001111 10101100 ANL 00001111 10101100 ORL 00001111 10101100 XRL 10101100 CPL 00001100 10101111 10100011 01010011
  • 4. anl PSW, #0xE7 ;PSW AND 11100111 orl PSW, #0x18 ;PSW OR 00011000 xrl P1, #0x40 ;P1 XRL 01000000
  • 5. Other Logic Instructions CLR - clear RL – rotate left RLC – rotate left through Carry RR – rotate right RRC – rotate right through Carry SWAP – swap accumulator nibbles
  • 6. CLR ( Set all bits to 0 ) CLR A CLR byte (direct mode) CLR Ri (register mode) CLR @Ri (register indirect mode)
  • 7.
  • 8. Rotate through Carry RRC a mov a, #0A9h ; a  A9 add a, #14h ; a  BD (10111101), C  0 rrc a ; a  01011110, C  1 RLC a mov a, #3ch ; a  3ch(00111100) setb c ; c  1 rlc a ; a  01111001, C  1 C C
  • 9. Swap SWAP a mov a, #72h ; a  27h swap a ; a  27h
  • 10.