Can anyone please tell me how can I convert this float number: 12.25 to binary? I know how to convert the \"12\" but not the 0.25
Any help is much appreciated. Thank
void transfer(double x) { unsigned long long* p = (unsigned long long*)&x; for (int i = sizeof(unsigned long long) * 8 - 1; i >= 0; i--) {cout<< ((*p) >>i & 1);}}