Solved

Binary to BCD conversion of float value.

Posted on 2002-03-08
5
795 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
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 conditional statements in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

829 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