|
bitwise operators
JavaScript bitwise operators (&, |, ^, ~, <<, >>, >>>) work on numbers, just like arithmetic operators (+, -, /, *) do. But whereas arithmetic operators work on the actual values of numbers, bitwise operators work on their binary representations. Bitwise operators treat their operands as a set of bits (zeros and ones) rather than as decimal, hexadecimal, or octal numbers. Although the operators act upon binary representations of the operands, they return standard JavaScript numerical values. |