首頁
社區(qū)
課程
招聘
rol ror用C/++怎么表示?
Editor 2021-4-12 1756

rol ror用C/++怎么表示?

收藏
1條回答
kanxue 2021-4-12

ROL:
int rol = 18;
int cnt = rol%32;
int Result = (eax << rol) | eax >> (32-cnt);

 

ROR:
int ror = 9;
int cnt = ror%32;
int Result = ((eax >> cnt) | (eax << (32-cnt));
(ViperDodge回答)

回復