The use of masks, and the right and left shift operators, come in handy here.
在这里使用掩码、右移和左移运算符很方便。
Performs an arithmetic left shift on a bit pattern.
对位模式执行数学左移位。
In an arithmetic left shift, the bits shifted beyond the range of the result data type are discarded, and the bit positions vacated on the right are set to zero.
在算术左移位中,位元移动的范围若超过结果资料型别会予以舍弃,而且右方空出的位元位置会设定成零。
In an arithmetic left shift, the bits shifted beyond the range of the result data type are discarded, and the bit positions vacated on the right are set to zero.
在算术左移位中,位元移动的范围若超过结果资料型别会予以舍弃,而且右方空出的位元位置会设定成零。
应用推荐