SlideShare ist ein Scribd-Unternehmen logo
1 von 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]

Weitere ähnliche Inhalte

Was ist angesagt?

INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
 INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER   INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER SIRILsam
 
Unit ii microcontrollers final
Unit ii microcontrollers finalUnit ii microcontrollers final
Unit ii microcontrollers finalSARITHA REDDY
 
Flip flops, counters & registers
Flip flops, counters & registersFlip flops, counters & registers
Flip flops, counters & registersDharit Unadkat
 
Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Jay Patel
 
PIN Specification of 8086 Microprocessor
PIN Specification of 8086 MicroprocessorPIN Specification of 8086 Microprocessor
PIN Specification of 8086 MicroprocessorNikhil Kumar
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerSudhanshu Janwadkar
 
Multiplexer & de multiplexer
Multiplexer & de multiplexerMultiplexer & de multiplexer
Multiplexer & de multiplexervishalgohel12195
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration AKHIL MADANKAR
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsVinoth Loganathan
 

Was ist angesagt? (20)

Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
 INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER   INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
 
Unit ii microcontrollers final
Unit ii microcontrollers finalUnit ii microcontrollers final
Unit ii microcontrollers final
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Flip flops, counters & registers
Flip flops, counters & registersFlip flops, counters & registers
Flip flops, counters & registers
 
Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051
 
Interrupts of microcontroller 8051
Interrupts of microcontroller 8051Interrupts of microcontroller 8051
Interrupts of microcontroller 8051
 
PIN Specification of 8086 Microprocessor
PIN Specification of 8086 MicroprocessorPIN Specification of 8086 Microprocessor
PIN Specification of 8086 Microprocessor
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
Chapter 5 counter
Chapter 5 counterChapter 5 counter
Chapter 5 counter
 
Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 
Multiplexer & de multiplexer
Multiplexer & de multiplexerMultiplexer & de multiplexer
Multiplexer & de multiplexer
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
8051 memory
8051 memory8051 memory
8051 memory
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
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
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
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
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

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.