Basic methods for conversion between decimal, binary and hexadecimal numbers