- 1
convert the following decimals numbers to 10 bit binary (a) 37.31 (b) 6.215 (c) 33.333
chapter data representation
2 Antworten
- 1
I think in C++ you could create a float variable and cast the pointer to it to int. That way you'd get the decimal representation of it. Then you just have to convert from decimal to binary.
- 2
For Java it would be Integer.toBinary(number, numberOfBits);
Better check StackOverflow.com for this