This code takes the decimal value 85196900, shifts its binary representation 16 bits to the right, and then performs a bitwise AND operation with the binary representation of 65535 (which is all ones in the lowest 16 bits and zeroes in the upper 16 bits). The result is the value of the 16-bit number that was shifted out of the original number, which in this case is 1298.

JavaScript Bitwise Operations: Extracting 16-Bit Values

原文地址: https://www.cveoy.top/t/topic/l0yg 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录