conv_to_hex: another version of expand_nibble proc