8086 Bit Manipulation Instructions

8086 Bit Manipulation Instructions(Logical Instructions):

The 8086 Bit Manipulation Instructions or Logical Instructions are

  • NOT
  • AND
  • OR
  • XOR
  • TEST

NOT Instruction : NOT destination.

The NOT instruction inverts each bit of a byte or a word. The destination can be register or a memory location.

Flags : NOT instruction affects no flag.

8086 Bit Manipulation Instructions

AND Instruction : AND destination, source.

This instruction logically ANDs each bit of the source byte or word with the corresponding bit in the destination and stores result in the destination. The source may be an immediate number, a register or a memory location. The destination may be a register or a memory location. The source and destination both cannot be memory locations in the same instruction. The CF and OF are both 0 after AND. The PF, SF and ZF are affected. AF is undefined.

8086 Bit Manipulation Instructions

OR Instruction : OR destination, source.

This instruction logically ORs each bit of the source byte or word with the corresponding bit in the destination and stores result in the destination. The source may be an immediate number, a register or a memory location. The destination may be a register or a memory location. The source and destination both can not be memory locations in the same instruction. The CF and OF are both 0 after OR. The PF, SF and ZF are affected. AF is undefined.

8086 Bit Manipulation Instructions

XOR Instruction : XOR destination, source.

This instruction logically XORs each bit of the source byte or word with the corresponding bit in the destination and stores result in the destination. The source may be an immediate number, a register or a memory location. The destination may be a register or a memory location. The source and destination both cannot be memory locations in the same instruction. The CF and OF are both 0 after XOR. The PF, SF and ZF are affected. AF is undefined.

TEST Instruction : TEST destination, source.

This 8086 Bit Manipulation Instructions ANDs the contents of a source byte or word with the contents of the specified destination word. Flags are affected. But neither operand is changed. PF, SF and ZF will be updated to show the results of the ANDing. PF has meaning only for the lower 8 bits of the destination. AF will be undefined.

8086 Bit Manipulation Instructions

MORE RELATED ARTICLE

Leave a Reply

Your email address will not be published. Required fields are marked *

COPYRIGHT © 2014 TO 2018 EEEGUIDE.COM ALL RIGHTS RESERVED | HOME | SITEMAP | CONTACT US | ABOUT US | PRIVACY POLICY | Frontier Theme