Skip to content
Related Articles

Related Articles

Improve Article
Logical instructions in 8086 microprocessor
  • Last Updated : 22 May, 2018

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 registorTEST [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.

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.

 

My Personal Notes arrow_drop_up
Recommended Articles
Page :