X86-assembly/Instructions/rol

From aldeid
Jump to navigation Jump to search
You might also see: rol/ror encryption
You are here:
rol

Description

The rol instruction is similar to shl except the shifted bits are rotated to the other end.

Syntax

rol destination, count

Example

mov eax, 0xA  ; set EAX to 0xA (00001010 in binary)
rol eax, 2    ; rotate 2 bits left in EAX, now equal to 0x28 (00101000 in binary)

Comments