I'm assuming you mean i
in place of r
...
<<n
means "shift left by n* bits". Since you start with 1=binary 00...00001, if you shift left 4 times you get binary 00...10000 = 16 (it helps if you are familiar with binary arithmetic - otherwise "calc.exe" has a binary converter).
Each bit moves left n
places, filling (on the right) with 0s. *=note that n
is actually "mod 32" for int
, so (as a corner case) 1 << 33 = 2, not 0 which you might expect.
There is also >>
(right shift), which moves for the right, filling with 0
for uint
s and +ve int
s, and 1
for -ve int
s.