Home > Engineering > Detail
search_icon
Question

Your company has developed a technology that uses HexBits storage units, which have six storage states. Your task is to create a floating point system based on HexBits with B=6. You need to set aside 1 HexBit to save the sign of the floating-point number, p HexBits to save the significand, and q HexBits to save the exponent. The system must meet three requirements. Firstly, its machine epsilon must be less than or equal to a binary 64 number in the IEEE Standard-754, about 1.11 x 10-16. Secondly, the largest number it can represent must be greater than or equal to the largest binary 64 number in the IEEE Standard-754, +1.7976931348623157x10-308. Thirdly, it needs to use an offset to represent the exponent. Answer the following questions about this system.

Answer

1. p=5. 2. q=10. 3. The offset for the exponent is 31. 4. The concept of wobble is not mentioned in the question, and there is no relevant formula or knowledge to calculate. 5. Machine epsilon is about 1.096785 x 10^-10.

To calculate p, use the formula 2p >= B+1, therefore p=5. To calculate q, use the formula 2^{q-1} < w <2^q, with w being the largest integer that can be represented by the system, as determined by the number of HexBits available. Thus, 2^9 < 10 < 2^10, therefore q=10. To calculate the offset of the exponent, use the formula 2^{q-1} - 1, which is equal to 2^9 - 1=511. To calculate the machine epsilon, use the formula B^{1-p}. Therefore, machine epsilon = 6^(1-5) = 1.096785 x 10^-10.