Assembly: How to define the Format Shifting (SHL,SHR) -


how can know how shifted using shl or shr in assembly. example :

0x111111111111116f 

to remove 11111111111111 use shl , shr.

 mov    rsi, 0x111111111111116f  shl    rsi, 0x38  shr    rsi, 0x38 

so, meaning 0x38 specifically? how can know how shifted?

i'm sorry if bothered questions. i'm new in assembly. maybe can provide resource can learn that.

so, meaning 0x38 specifically? how can know how shifted?

0x38 number in hexadecimal notation. in decimal represents 56.

shl    rsi, 0x38 

the value in rsi (whatever may represent) shifted left 56 bits.

shr    rsi, 0x38 

the value in rsi (whatever may represent) shifted right 56 bits.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -