[General] Required hexadecimal to decimal conversion code

Status
Not open for further replies.

DINESHSOUP

Newbie level 1
Joined
Dec 24, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
8
Kindly send embedded c code for converting hexadecimal to decimal to mail id Controller used is aduc848 and keil compiler

thank you very much in advance
 
Last edited by a moderator:

Hey You can try by yourself.............
Store the hexadecimal number in one array and compare the value with switch logic.
you have to write 16 (0 to F) switch cases.....
Just try it.............
 

Hello!

As said above (reply #2), it's not a good approach to ask directly for source code.
Write down what you tried, explain where the problems are and other people are more likely to
reply with useful hints.

That said, it depends on what you are trying to do, the question is not very clear.

For example, if you write:
int a = 10;
or
int a = 0x0A;
One is setup in decimal, the other is setup in hexadecimal, but it's exactly the same value and there
is no need for any kind of conversion.

So what are you trying to do?
Are you trying to read an ascii string containing a number coded in hexa?

Dora.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…