How can i convert float or double to binary?

Recommended Answers

All 4 Replies

How can i convert float or double to binary?

Same way I convert.

I would not mind giving you the answer, but let us see what have you tried. We only give answers to those who have at least made an effort to find them,
So first show us your code then we will help you.

Same way I convert.

I would not mind giving you the answer, but let us see what have you tried. We only give answers to those who have at least made an effort to find them,
So first show us your code then we will help you.

What we have tried is as follows:

String binary=Integer.toBinaryString(Float.toRawIntBits(1.1));

You ain't doing it right. Maybe this would help.

commented: It was really helpful!! +1

Thank you very much...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.