Bitwise Operations
This library provides bitwise operations. It provides all its functions inside the table bit32.
all functions accept numeric arguments in the range (-2^51,+2^51);
each argument is normalized to the remainder of its division by 2^32 and truncated to an integer (in some unspecified way),
so that its final value falls in the range [0,2^32 - 1].
all results are in the range [0,2^32 - 1]. Note that bit32.bnot(0) is 0xFFFFFFFF, which is different from -1
在bit32 table中提供位操作运算。所有位操作运算可以接受数值的范围为(-2^51,+2^51);
但是每一个参数都通过除以2^32取得余数来做统一化。把参数转换成一个整型。最终,每一个参数的范围为[0,2^32 - 1].
同样,所有结果的范围为[0,2^32 - 1].
bit32.rshift (x, disp)
Returns the number x shifted disp bits to the right.
The number disp may be any representable integer. Negative displacements shift to the left.
In any direction, vacant bits are fille