I am using freescaale mc9s08lg32,i want to convert the hex value from ADCR registers to decimal for sum calculation.
HEX is taken as a 4 bit value. So if you have 0x00, it will be 0b00000000, and if you have 0xFF it will be 0b11111111. To put this in programmatically you can either use a function which is mostly likely available in the IDE but you shouldn't have to do this you can do things directly as Swanand described
Also I'd like to add that hex values are an easy representation for humans to understand rather than reading a whole lot of zeros and ones
You don't have to.
At the end, in Processor Core, All Calculations will be done in binary.
It doesn't matter if you do
value = 0x10 + 10;
value will be 26 or 0x1A or 0b11010.
And this is valid for all mathematical calculations like Addition, Substraction, Multiplication, Division, Mod etc.
IMO, Number system doesn't matter for calculation.