Assembly: Bit Shifting

Contributor Icon Contributed by William_Wilson  
Tag Icon Tagged: Computer programming  

Shift bits left or right by a desired numebr of places

Bit shifting is an easy task.
Shift left (in this case by 8):

shl EAX,8

or to Shift right (in this case by 8):

shr EAX,8

you simply provide the 2 operands:
1) the register to shift
2) the number of places to shift

This method will autmoatically fill the slots without data as 0.

Questions/Comments: william_a_wilson@hotmail.com
-William. ยง (marvin_gohan)

 

No Comments -


No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment -