import math


def highest_bit(num):
    """highest_bit(num) -> n
    Determines the bit position of the highest bit in the given number.
    Example: 0x800000 returns 24.
    """
    try:
        return int(math.floor(math.log10(num) / math.log10(2))) + 1
    except OverflowError:
        assert(num == 0)
        return 0