Changing number of words to hex notation