Meaning of bitwise and(&) of a positive and negative number?

后端 未结 8 1844
名媛妹妹
名媛妹妹 2021-02-04 11:59

Can anyone help what n&-n means?? And what is the significance of it.

8条回答
  •  感情败类
    2021-02-04 12:32

    On pretty much every system that most people actually care about, it will give you the highest power of 2 that n is evenly divisible by.

提交回复
热议问题