I want to get the low 32 bit of a int64 as int32

前端 未结 5 1269
梦如初夏
梦如初夏 2021-01-04 05:02

I have an Int64 value, but I only need the lower 32 bits. Thus I want a quick way to get the Int32 value from the lower 32 bits of the Int64 value.

Thanks

5条回答
  •  甜味超标
    2021-01-04 05:20

    You didn't specify the language, but in many, all you need to do is cast it to an Int32. The top bits will be discarded.

提交回复
热议问题