What does the >> operator do? For example, what does the following operation 10 >> 1 = 5 do?
>>
10 >> 1 = 5
It's the right bit shift operator, 'moves' all bits once to the right.
10 in binary is
1010
shifted to the right it turns to
0101
which is 5
1.4m articles
1.4m replys
5 comments
57.0k users