Creating a varible that stores hex values from an integer

I am having trouble trying to convert an existing integer variable into a variable that stores hex values.

In a very crude form this is what I want the code to do:

value //in decimal -> value_hex.

Any help would be greatly appreciated. :smiley:

You don't need to do that : all variables are stored in binary by the microcontroller, they are just displayed as decimal or hexadecimal forms when you ask for it.

Thankyou :smiley: