首页
社区
课程
招聘
rol ror用C/++怎么表示?
Editor 2021-4-12 1567

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回答)

回复