Solved

Binary to BCD conversion of float value.

Posted on 2002-03-08
5
788 Views
Last Modified: 2012-08-14
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
Comment
Question by:rpatna
  • 2
5 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 50 total points
ID: 6854169
long data = 0xc91;
printf("%d.%04d\n",data>>10,(data&0x3ff)*10000>>10);
0
 

Expert Comment

by:eunicer
ID: 6895829
can u send in the code u have written to eunicer@propmart.com
0
 

Author Comment

by:rpatna
ID: 6896260
I not understand  ur message
0
 

Author Comment

by:rpatna
ID: 9329335
I didn't get proper answer so,
I want to delete this question.
Any body disagree, please add a comment here.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question