lojix/power_model/src/main/com/thesett/aima/attribute/time/BitHackUtils.java
public static int getCharacterCountInt32(int value)
    {
        if (value >= 0)
        {
            return getCharacterCountUInt32(value);
        }
        else if (value == Integer.MIN_VALUE)
        {
            return getCharacterCountUInt32(Integer.MAX_VALUE) + 1;
        }
        else
        {
            return getCharacterCountUInt32(-value) + 1;
        }
    }
public static int getCharacterCountInt32(int value)
    {
        if (value >= 0)
        {
            return getCharacterCountUInt32(value);
        }
        else if (value == Integer.MIN_VALUE)
        {
            return getCharacterCountUInt32(Integer.MAX_VALUE) + 1;
        }
        else
        {
            return getCharacterCountUInt32(-value) + 1;
        }
    }
Calculates the number of ASCII characters that will be needed to represent a specifed signed 32-bit integer.

@param  value The value to get the character count for.

@return The number of ASCII character need to represent an signed 32-bit integer.