dcsimg
 

Submitted by: Octavia Anghel(octaviaanghel@gmail.com)

Friday Apr 17th 2020 by Octavia Anghel

Language: Java, Expertise: Intermediate: See how to convert a float number to bits in Java.

Java provide a built-in method for converting a float number to bits as shown below:

long longBits = Double.doubleToLongBits(someDouble);
System.out.println(Long.toBinaryString(longBits)); 
Home
Mobile Site | Full Site