更新时间:2022-05-04 21:46:14
(myint + 3) & ~0x03
3的加法使得4的下一个倍数成为4的上一个倍数,这是通过模运算产生的,因为除数是2的幂,所以可以通过掩膜实现.
The addition of 3 is so that the next multiple of 4 becomes previous multiple of 4, which is produced by a modulo operation, doable by masking since the divisor is a power of 2.