dongtuanzi1080 2014-09-19 17:18
浏览 152
已采纳

1 << 32在Go中是什么意思?

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条回答 默认 最新

  • douci2015 2014-09-19 18:55
    关注

    1 is shifted 32 times.

    Shift is a bitwise operation. See: http://en.wikipedia.org/wiki/Logical_shift

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?