• C

Binary to BCD conversion of float value.

I have 26 bit binary data which is having 16 bit Integer part and 10 bits of fraction portion.I need to convert this data in to BCD format.I can't use "float" data type for any calculation.
rpatnaAsked:
Who is Participating?
 
ozoCommented:
long data = 0xc91;
printf("%d.%04d\n",data>>10,(data&0x3ff)*10000>>10);
0
 
eunicerCommented:
can u send in the code u have written to eunicer@propmart.com
0
 
rpatnaAuthor Commented:
I not understand  ur message
0
 
rpatnaAuthor Commented:
I didn't get proper answer so,
I want to delete this question.
Any body disagree, please add a comment here.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.