1
I tried to do the method of turning the result of a calculation like this ->
public String converteResultado(String resultado) {
return String.valueOf(Double.doubleToLongBits(Double.valueOf(resultado)));
}
The result is Decimal numbers, ex:(1.1 or 0.12), I thought of turning the result String into Double, then turning Double into Binario, and then turning Binario into String, and then returning the result into String, OBS: I have to return a result in String.
a look at this link, it’s in Spanish, but it’s understandable: https://es.stackoverflow.com/questions/32796/c%C3%B3mo-pasar-de-decimal-a-binario-en-java
– Luiz Augusto