In addition to the default IEEE doubleprecision format 8 byt
In addition to the default IEEE double-precision format (8 bytes, 64 bits) to store floating-point numbers, computer can also store the numbers in half-precision format (2 bytes, 16 bits). Each value is stored in 2 bytes with 1 bit for the sign, 10 bits for the mantissa, and 5 bits for the signed exponent. Determine (show your work! the smallest and largest positive floating-point numbers (in decimal value) as well as the machine epsilon for this half-precision representation. Note that the exponents range from -14 to 15.
Solution
As given in the question exponent ranges from -14(min) to 15 (max).
Therefore
the min. positive value is 2^-14 = 6.10 * 10-5
and the maximum positive value can be (2-2^-10)*2^15 = 65504 = 0 11110 1111111111(binary).
Ex:
0 01111 0000000000 = 1
0 11110 1111111111 = 65504 max for the half precision.
