Logical instructions in 8086 microprocessor
Logical instructions are the instructions which perform basic logical operations such as AND, OR, etc. In 8086 microprocessor, the destination operand need not be the accumulator.
Following is the table showing the list of logical instructions:
| OPCODE | OPERAND | DESTINATION | EXAMPLE |
|---|---|---|---|
| AND | D, S | D = D AND S | AND AX, 0010 |
| OR | D, S | D = D OR S | OR AX, BX |
| NOT | D | D = NOT of D | NOT AL |
| XOR | D, S | D = D XOR S | XOR AL, BL |
| TEST | D, S | performs bit-wise AND operation and affects the flag registor | TEST [0250], 06 |
| SHR | D, C | shifts each bit in D to the right C times and 0 is stored at MSB position | SHR AL, 04 |
| SHL | D, C | shifts each bit in D to the left C times and 0 is stored at LSB position | SHL AX, BL |
| ROR | D, C | rotates all bits in D to the right C times | ROR BL, CL |
| ROL | R, C | rotates all bits in D to the left C times | ROL BX, 06 |
| RCR | D, C | rotates all bits in D to the right along with carry flag C times | RCR BL, CL |
| RCL | R, C | rotates all bits in D to the left along with carry flag C times | RCL BX, 06 |
Here D stands for destination, S stands for source and C stands for count.
They can either be register, data or memory address.
Recommended Posts:
- Arithmetic instructions in 8086 microprocessor
- Process control instructions in 8086 microprocessor
- Data transfer instructions in 8086 microprocessor
- String manipulation instructions in 8086 microprocessor
- Program execution transfer instructions in 8086 microprocessor
- Logical instructions in 8085 microprocessor
- Arithmetic instructions in 8085 microprocessor
- Branching instructions in 8085 microprocessor
- Machine Control Instructions in Microprocessor
- Data transfer instructions in 8085 microprocessor
- 8086 program to transfer a block of 4 bytes by using string instructions
- Pin diagram of 8086 microprocessor
- Interrupts in 8086 microprocessor
- 8085 program to multiply two 8 bit numbers using logical instructions
- Flag register of 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.



