Edit: This question is out of date as the Polyfill example has been updated. I\'m leaving the question here just for reference. Read the correct answer for usef
The ECMAScript specification states that the value is converted to UInt32 in step 5 and 8 of http://www.ecma-international.org/ecma-262/5.1/#sec-11.7:
11.7.3 The Unsigned Right Shift Operator ( >>> )
Performs a zero-filling bitwise right shift operation on the left operand by the amount > specified by the right operand.
The production
ShiftExpression : ShiftExpression >>> AdditiveExpressionis evaluated as follows:
- Let
lrefbe the result of evaluatingShiftExpression.- Let
lvalbeGetValue(lref).- Let
rrefbe the result of evaluatingAdditiveExpression.- Let
rvalbeGetValue(rref).- Let
lnumbeToUint32(lval).- Let
rnumbeToUint32(rval).- Let
shiftCountbe the result of masking out all but the least significant 5 bits ofrnum, that is, computernum & 0x1F.- Return the result of performing a zero-filling right shift of
lnumbyshiftCountbits. Vacated bits are filled with zero. The result is an unsigned 32-bit integer.