JavaScript's Numbers are double-precision floats(*), the bitwise operators (<<,>>, &, | and ~) are defined in terms of operations on 32-bit integers. Doing a bitwise operation converts the number to a 32-bit signed int, losing any fractions and higher-place bits than 32, before doing the calculation and then converting back to Number.
Read more: Bitwise operators
I don't understand the explanation. A link would be useful to understand terms like 32-bit ints, higher-place bits, bitwise operators, double-precision floats...
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати