Same poster again, I figured out how to go from hex to decimal floating point, but I can't go the opposite way. How do I go from decimal 8.5 to a hex representation of that floating point in java? I know how to do it on paper, but I can't figure out how to code it. 8.5 is 1000.1 in binary, how do I code that in java? And also, how do I move on from that?
System.out.println("Enter Float you want to convert: ");
String f = input.nextLine();
double de = Double.parseDouble(f);
String binFl = Long.toBinaryString(Double.doubleToRawLongBits(de));
I feel like what I am doing is completely wrong. I can't figure out how to go from a double to binary.