This document discusses logical operations and instructions for the 8051 microcontroller. It describes the AND, OR, XOR logical instructions and their mnemonics. It provides details on using these instructions with the accumulator register, direct addressing modes, and immediate operands. A table shows the byte count, execution time, and opcodes for each logical instruction.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
259 views7 pages
Logical Operations 8051 Microcontroller
This document discusses logical operations and instructions for the 8051 microcontroller. It describes the AND, OR, XOR logical instructions and their mnemonics. It provides details on using these instructions with the accumulator register, direct addressing modes, and immediate operands. A table shows the byte count, execution time, and opcodes for each logical instruction.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7
Logical Operations
8051 MICROCONTROLLER Instructions
AND OR XOR Compliment AND ANL
OR ORL
XOR XRL
Default Register = Accumulator
ANL destination, origin. AND (AND) logic. And so do it logical operation between the source byte and destination byte. ORL destination, origin. OR (O) logic of bits. So do it logical operation OR between the source byte and destination byte. XRL destination, origin. XOR (exclusive OR) logic bits. So do it exclusive OR logical operation between the source byte and destination byte. D7 D6 D5 D4 D3 D2 D1 D0 C D7 D6 D5 D4 D3 D2 D1 Mnemonics Byte Execution Opcode Mnemonics Byte Count Execution Opcode Count Time Count Time Count
ANL A, Rn 1 1 8 XRL A, @Ri 1 1 2
ANL A, a8 2 1 1 XRL A, #d8 2 1 1 ANL A, @Ri 1 1 2 XRL a8, A 2 1 1 ANL A, #d8 2 1 1 XRL a8, #d8 3 2 1 ANL a8, A 2 1 1 CLR A 1 1 1 ANL a8, #d8 3 2 1 CPL A 1 1 1 ORL A, Rn 1 1 8 RL A 1 1 1 ORL A, a8 2 1 1 RLC A 1 1 1 ORL A, @Ri 1 1 2 RR A 1 1 1 ORL A, #d8 2 1 1 RRC A 1 1 1 ORL a8, A 2 1 1 SWAP A 1 1 1 ORL a8, #d8 3 2 1 XRL A, Rn 1 1 8 XRL A, a8 2 1 1 Assignment
What are the special function register.
What are the uses of accumulator register. What is stack pointer (sp) What is data pointer (DTPR) What is the purpose of using instruction register Explain the two-power saving mode of operation. Differentiate between program memory and data memory What are addressing modes