What does 1 << 32
mean in Go? If I understand correctly it means 2^32
. Or am I mistaken? And if my opinion above is right, what does this code do?
min := int(^uint(0) >> 1)
What does 1 << 32
mean in Go? If I understand correctly it means 2^32
. Or am I mistaken? And if my opinion above is right, what does this code do?
min := int(^uint(0) >> 1)
1 is shifted 32 times.
Shift is a bitwise operation. See: http://en.wikipedia.org/wiki/Logical_shift