开发者

How to do bit-wise zero-filling right shift in Scheme?

According to here, arithmetic-shift will bit-shift left and right. The right shift preserves the sign. Is there any unsigned right-shift operato开发者_如何学编程r, which fills the vacated bits with zero instead of the sign bit?


Shift it right by 1 bit, then zero out the sign bit. Then shift it by however many extra bits you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜