I want to find the most significant bit that is set to 1
. I have tried every possible way from &
to ORing all of the bits from 1
to 31
and it doesn't work.
Like if 1000000
I would like to have 7
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…