Rotate Bits Right operation in Ruby

后端 未结 3 755
谎友^
谎友^ 2021-01-06 04:21

Is there a Rotate Bits Right in Ruby ?

Or how can I do that please.

Thanks

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-06 04:46

    ROR is rotate right.

    Here's a C implementation that could be ported to Ruby.

    Ruby does have the

    • << Bitwise Shift Left and
    • Bitwise Shift Right

    operators

提交回复
热议问题