Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 831
  • Last Modified:

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.
0
rpatna
Asked:
rpatna
  • 2
1 Solution
 
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now