Bitwise Right Shift

Syntax

x >> y

Explanation

Where x is a 32-bit integer, discards last y binary digits of x

Examples

8  >> 1  // 1000 (8) -> 100 (4)
31 >> 2  // 11111 (31) -> 111 (7)

Last updated