JavaScript Programmer’s Reference Bitwise (Web hosting contract) unsigned shift right (>>>)
JavaScript Programmer’s Reference Bitwise unsigned shift right (>>>) (Operator/bitwise) Bitwise shift right one operand according to another. Availability: ECMAScript edition 2 JavaScript 1.0 JScript 1.0 Internet Explorer 3.02 Netscape 2.0 Netscape Enterprise Server 2.0 Opera 3.0 Property/method value type: Number primitive JavaScript syntax: -anOperand1 >>> anOperand2 anOperand1 A value to be shifted Argument list: anOperand2 A distance to shift the left operand This is sometimes called shift right with zero extension. The bitwise unsigned shift right operator converts its left operand to a 32 bit integer and moves it rightwards by the number of bits indicated by the right operand. The sign bit is not propagated. As the value is shifted rightwards, bits that roll out of the right end of the register are discarded. The left-hand end of the register containing the sign bit is zero-filled as the contents are shifted. Shifting rightwards by 32 bits will fill the register with all zero bits. Because the value is converted to an integer, any fractional part is discarded as the shift begins. The right-hand operand is converted to a 5-bit value with a bitwise mask to limit the distance of the shift to 32 bits. This can cause unexpected results if the right-hand side is derived from an expression that may yield a value larger than 32. The associativity is left to right. Refer to the Operator Precedence topic for details of execution order.