8086 Rotate Instructions

8086 Rotate Instructions:

The 8086 Rotate Instructions are namely

  • ROL
  • ROR
  • RCL
  • RCR

ROL Instruction : ROL destination, count.

This 8086 Rotate Instructions all bits in a specified byte or word to the left some number of bit positions. MSB is placed as a new LSB and a new CF.

Diagram shows ROL instruction for byte rotation.

8086 Rotate Instructions

The destination can be a byte or a word. It can be in a register or in a memory location. The number of shifts are indicated by count. If number of shifts required is one you can place 1 in the count position. If number of shifts are greater than 1 then shift count must be loaded in CL register and CL must be placed in the count position of the instruction.

8086 Rotate Instructions

ROR Instruction : ROR destination, count.

This 8086 Rotate Instructions all bits in a specified byte or word to the left some number of bit positions. LSB is placed as a new MSB and a new CF.

The destination can be a byte or a word. It can be in a register or in a memory location. The number of shifts are indicated by count. If number of shifts required is one, you can place 1 in the count position. If number of shifts are greater than 1 then shift count must be loaded in CL register and CL must be placed in the count position of the instruction.

Diagram shows ROR instruction for byte rotation.

8086 Rotate Instructions

8086 Rotate Instructions

RCL Instruction : RCL destination, count.

This 8086 Rotate Instructions all of the bits in a specified word or byte some number of bit positions to the left along with the carry flag. MSB is placed as a new carry and previous carry is placed as a new LSB.

The destination can be a byte or a word. It can be in a register or in a memory location. The number of shifts are indicated by count. If number of shifts required is one, you can place 1 in the count position. If number of shifts are greater than 1 then shift count must be loaded in CL register and CL must be placed in the count position of the instruction.

Diagram shows RCL instruction for byte rotation.

8086 Rotate Instructions

8086 Rotate Instructions

RCR Instruction : RCR destination, count.

This 8086 Rotate Instructions all of the bits in a specified word or byte some number of bit positions to the left along with the carry flag. LSB is placed as a new carry and previous carry is placed as a new MSB.

The destination can be a byte or a word. It can be in a register or in a memory location. The number of shifts are indicated by count. If number of shifts required is one you can place 1 in the count position. If number of shifts are greater than 1 then shift count must be loaded in CL register and CL must be placed in the count position in the instruction.

Diagram shows RCR instruction for byte rotation.

8086 Rotate Instructions

8086 Rotate 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