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:
|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 , 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.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Arithmetic instructions in 8086 microprocessor
- String manipulation instructions in 8086 microprocessor
- Data transfer instructions in 8086 microprocessor
- Process control instructions in 8086 microprocessor
- Program execution transfer instructions in 8086 microprocessor
- Logical instructions in 8085 microprocessor
- Machine Control Instructions in Microprocessor
- Branching instructions in 8085 microprocessor
- Arithmetic instructions in 8085 microprocessor
- Difference between SIM and RIM instructions in 8085 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
- Bus Cycles of 8086 Microprocessor
- Addressing modes in 8086 microprocessor
- Differences between 8085 and 8086 microprocessor
- Flag register of 8086 microprocessor
- Memory Segmentation in 8086 Microprocessor
- General purpose registers in 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 firstname.lastname@example.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.