convert number to printable string and vice versa