x >> y
Where x is a 32-bit integer, discards last y binary digits of x
x
y
8 >> 1 // 1000 (8) -> 100 (4) 31 >> 2 // 11111 (31) -> 111 (7)
Last updated 4 years ago