# Floating Point Arithmetic with 3 bits mantissa

Find all values of $$x ∈ R$$ such that x + 1 = 1 in floating point arithmetic with 3 bits mantissa.

How do we represent number 1 in floating point arithmetic with 3 bits mantissa I wonder? After that, I think we can subtract 1 on both side? I am a little confused about representations of numbers in floating point arithmetic with a specific number of bits in mantissa.

• There are many conventions that the problem should specify, but a common way to represent $1$ is to not store the $1$ itself and represent it as $000$. Here those zeros are the three digits after the decimal point in $1.000$. No, don't subtract, since floating point arithmetic is not associative. Do they say what is the base, what is the range of exponents? Do they allow denormal numbers?
– plop
Apr 19 at 20:32
• @plop Thank you very much for your response. I don't think they specified any of those. Let's use the base of 2, 1 bit for sign, 4 bits for exponents (exponent + 7) and 3 bits for mantissa. We may use denormal numbers? Can you help explain this problem? Much appreciation. Apr 19 at 20:36
• See how you add $1.000$ to some other floating point number. You have to sift that other number to fixed point (imagine arbitrary precision), then add it to $1.000$, then bring the result to floating point and finally round. By the way they should also tell you the rounding convention that they are going to apply. So, if at the end the result is again $1$, it means that the rounding cut off any new digits. So, they must be after the three zeros after the decimal point. So, numbers like $1.a_1a_2a_3\times 2^{k}$, with $k\leq -4$ and also the number $0$.
– plop
Apr 19 at 20:47
• Thank you very much for the helpful insights @plop. I understand the problem much more clearly now. Apr 19 at 22:13

If $$a$$ is the next smallest representable number below 1, and $$b$$ is 1.001, then sums in the interval $$\left[\frac{a+1}2, \frac{1+b}2\right]$$ will be rounded to 1. (It's closed on both ends because round-to-even breaks the tie in favor of 1.) From there it's easy to answer the question.
• Thank you and @plop. Thanks to you, I finally understand that this problem mainly has to do with rounding and significant figures. And I agree that this problem is under-specified. One can also say that 1 can be represented as $(1.00)_{2} x 2^{0}$ in 3-bit mantissa here. Apr 19 at 22:28