convert hamming return value to int