нужно решить проблему типами. Выражение 1 << 32 выдает единицу, т.к. число 1 ,видимо, имеет внутренний тип int, который переполняется. Как сказать javasciprt, что число 1 имеет другой тип (больше 4 байт, как int) ??
Цитата:
The bitwise operators such as bitwise OR (|) and bitwise AND (&) operate on numbers so they type-convert their operands to numbers. However, they also only operate on 32 bit signed integers so given the (possibly type-converted) numeric value they call the internal ToInt32 function with that number as its argument and use the returned value as their operand. That returned value is always a 32 bit signed integer.