Skip to content
Related Articles

Related Articles

Logical instructions in 8086 microprocessor

Improve Article
Save Article
  • Last Updated : 10 May, 2022
Improve Article
Save Article

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:

OPCODEOPERANDDESTINATIONEXAMPLE
ANDD, SD = D AND SAND AX, 0010
ORD, SD = D OR SOR AX, BX
NOTDD = NOT of DNOT AL
XORD, SD = D XOR SXOR AL, BL
TESTD, Sperforms bit-wise AND operation and affects the flag registerTEST [0250], 06
SHRD, Cshifts each bit in D to the right C times and 0 is stored at MSB positionSHR AL, 04
SHLD, Cshifts each bit in D to the left C times and 0 is stored at LSB positionSHL AX, BL
RORD, Crotates all bits in D to the right C timesROR BL, CL
ROLR, Crotates all bits in D to the left C timesROL BX, 06
RCRD, Crotates all bits in D to the right along with carry flag C timesRCR BL, CL
RCLR, Crotates all bits in D to the left along with carry flag C timesRCL 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.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!