How can I convert a number from decimal into hexadecimal and vice versa?