Used unsigned int for quotient in getHex

This should circumvent errors in negative values.