Bitwise Left Shift
Syntax
x << y
Explanation
Where x
is a 32-bit integer, appends y
zeros to the binary representation of x
Examples
1 << 2 // 1 (1) -> 100 (4)
2 << 4 // 2 (10) -> 100000 (32)
Last updated
Was this helpful?