199k views
3 votes
Consider a computer that uses 10 bits to represent floating-point numbers, 1 bit for s, 5 bits for c(c=e+15), and 4 bits for f. In terms of s, e, and f, the base 10 numbers are given by x=(− 1)ˢ2ᵉ(1+f), c is non-negative, and 0 ≤ f ≤ 1.

If δ=0.5, what is the result of 1+δ on this computer?

User Juangalf
by
7.9k points

1 Answer

4 votes

Final answer:

To find the result of 1+δ on a computer using a specific floating-point representation, convert 1 to the given representation, add δ to the fraction part, and adjust the exponent if needed.

Step-by-step explanation:

To find the result of 1+δ on this computer, we need to consider the given 10-bit representation for floating-point numbers. In this representation, 1 bit is used for the sign (s), 5 bits for the exponent (c), and 4 bits for the fraction (f). The base 10 numbers are represented by x = (-1)^s * 2^e * (1+f). Since δ = 0.5, we can determine the result of 1+δ as follows:

  1. Convert 1 into the given floating-point representation.
  2. Add δ (0.5) to the fraction part (f) of the representation.
  3. If the addition results in a carry (c) to the exponent part (e), adjust the exponent accordingly.

By following these steps, you can obtain the result of 1+δ on this computer.

User Msouth
by
7.6k points