Logical instructions are the instructions which perform basic logical operations such as AND, OR, etc. In 8085 microprocessor, the destination operand is always the accumulator. Here logical operation works on a bitwise level.
Following is the table showing the list of logical instructions:
| OPCODE | OPERAND | DESTINATION | EXAMPLE |
|---|---|---|---|
| ANA | R | A = A AND R | ANA B |
| ANA | M | A = A AND Mc | ANA 2050 |
| ANI | 8-bit data | A = A AND 8-bit data | ANI 50 |
| ORA | R | A = A OR R | ORA B |
| ORA | M | A = A OR Mc | ORA 2050 |
| ORI | 8-bit data | A = A OR 8-bit data | ORI 50 |
| XRA | R | A = A XOR R | XRA B |
| XRA | M | A = A XOR Mc | XRA 2050 |
| XRI | 8-bit data | A = A XOR 8-bit data | XRI 50 |
| CMA | none | A = 1’s compliment of A | CMA |
| CMP | R | Compares R with A and triggers the flag register | CMP B |
| CMP | M | Compares Mc with A and triggers the flag register | CMP 2050 |
| CPI | 8-bit data | Compares 8-bit data with A and triggers the flag register | CPI 50 |
| RRC | none | Rotate accumulator right without carry | RRC |
| RLC | none | Rotate accumulator left without carry | RLC |
| RAR | none | Rotate accumulator right with carry | RAR |
| RAL | none | Rotate accumulator left with carry | RAR |
| CMC | none | Compliments the carry flag | CMC |
| STC | none | Sets the carry flag | STC |
In the table,
R stands for register
M stands for memory
Mc stands for memory contents
Read related post: Arithmetic instructions in 8085 microprocessor
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Recommended Posts:
- Arithmetic instructions in 8085 microprocessor
- Data transfer instructions in 8085 microprocessor
- Branching instructions in 8085 microprocessor
- Difference between SIM and RIM instructions in 8085 microprocessor
- Logical instructions in 8086 microprocessor
- 8085 program to multiply two 8 bit numbers using logical instructions
- Arithmetic instructions in 8086 microprocessor
- Data transfer instructions in 8086 microprocessor
- Process control instructions in 8086 microprocessor
- String manipulation instructions in 8086 microprocessor
- Program execution transfer instructions in 8086 microprocessor
- Machine Control Instructions in Microprocessor
- ROTATE Instructions in 8085
- COMPARE Instructions in 8085
- Interrupts in 8085 microprocessor
- Addressing modes in 8085 microprocessor
- Registers of 8085 microprocessor
- Flag register in 8085 microprocessor
- Instruction cycle in 8085 microprocessor
- Reset Accumulator (8085 & 8086 microprocessor)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

