i search in this site and other for converting double value like .4 to binary but there is no useful answers ! i know the procedure multiply by 2 if the number is bigger than 1 save the 1 subtract it and more time multiply it by 2 and so on . help me !
double d = .4 ;
double e ;
while ()
{
e = d*2;
if (e>1) {
s[i]= 1;
e=d-1;
} else {
s[i] = 0;
}
System.out.print(s[i]);
}