How can i convert float or double to binary?

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...