Home > Web Front-end > JS Tutorial > body text

JavaScript unsigned right shift assignment operation_Basic knowledge

WBOY
Release: 2016-05-16 18:53:56
Original
1358 people have browsed it

Example code:

result >>>= expression

where the parameter is any variable of result.
expression is any expression.

Instructions for unsigned right shift assignment in JavaScript
Using the >>>= operator is equivalent to using the following statement:
result = result >>> expression
>>>= operator shifts all bits of result to the right by the number of digits specified by expression. After the right shift, the vacated bits on the left are filled with zeros. Bits shifted out to the right are discarded. For example:
var temp
temp = -14
temp >>>= 2

The value of variable temp is -14 (i.e. binary 11111111 11111111 11111111 11110010), shift two to the right bits equals 1073741820 (that is, binary 00111111 11111111 11111111 11111100).

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template