Significant digits calculation for floating point numbers

145 Views Asked by At

So I am trying to convert $x_1 = 0.3$ and $x_2 = -0.29$ to a FP number with $4$ bits mantissa, $3$ bits exponent and $1$ sign bit and I get:

$$x_1: \qquad 0 \qquad 001 \qquad 0011$$

$$x2: \qquad 1 \qquad 001 \qquad 0010$$

I am now trying to calculate the number of significant digits of $x_1$ and $x_2$ and I have found $2$ for each, but I am unsure of my result.

I am also trying to calculate $z = (FP)x_1 + (FP)x_2$ and the number of significant digits of $z$.

How would you go about calculating $z$ and its significant digits ?

Thanks in advance !