In an arithmetic right shift, the bits shifted beyond the rightmost bit position are discarded, and the leftmost bit is propagated into the bit positions vacated at the left.
在算术右移位运算中,将丢弃移出最右侧数位位置的数位,并将最左侧的数位传播到左端空出的数位位置。
Recall from the discussion in the first article of this series that whenever I want to use multi-byte integer format, I must set the leftmost bit of the first length byte to 1.
回想在本系列第一篇文章中的讨论,在希望使用多字节整数格式的时候,必须将第一个长度字节的最左边一位设置为1。
Another way to understand why we discard that extra bit is to remember that the leftmost bit of the lower number possesses a negative weight, in this case equal to negative eight.
另一种方式来理解我们为什么放弃额外位是要记住,最左边的位低一些具有负面重量,在这种情况下,等于否定8。
应用推荐