Solved

Binary to BCD conversion of float value.

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
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…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now