JavaScript converts operands to 32-bit signed ints before doing bitwise operations. It also does the operation with 32-bit signed ints, meaning that the result is a 32-bit s
JavaScript takes care of this problem by offering two bit shift operators, >> and >>>. You want >>> to do a shift without shifting the sign bit.
>>
>>>