in reply to Re^2: Decimal to Hexadecimal conversion and extraction MSB
in thread Decimal to Hexadecimal conversion and extraction MSB
The OP could also have been asking for the position of the leftmost "1" bit. If the integer is not zero, this is the integer portion of the quotient "log(number) / log(2)" (for a non-zero base log).
I read the tea leaves and inferred that the OP wanted to work with integers of a fixed size. (The part of the question that asked about bit shifting gave me a strong push in this direction. That is surely a prejudice based on my experience.)
|
|---|