0

I have the following number in binary:

$$ 0.111_2 = 0 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} $$

I need to find the number such that it's bigger than the current and there is no number in between represented within the given number of places after the radix point (no numbers like 0.1111 - 4 places after the radix point). How can I do that?

I can make parallel with decimal system, where for the number 0.3 the least bigger number is 0.4, and no other number that have 1 place after the radix exist between 0.3 and 0.4

1 Answers1

1

Add $1$ in the last place. In your case, add $\frac{1}{8}$ to get the number $1$, which we should write as $(1.00)_2$ to keep the number of significant figures at $3$.

EDIT: Adding anything smaller than $1$ in the last place would automatically increase the number of significant figures in the result. Specifially, if we start with $(1.11)_2 \times 2^{-1} = (0.111)_2$ and add $\frac{1}{32} = (0.00001)_2$ we obtain the result $(0.11101)_2 = (1.1101)_2 \times 2^{-1}$ which has $5$ significant figures.

Carl Christian
  • 12,583
  • 1
  • 14
  • 37
  • thanks, can you please add some explanation behind your logic? I've read about adding 1, but decided to ask this question to understand the mathematical background of such operation. For example, why not add $1/32$ – Max Koretskyi May 21 '16 at 15:27
  • @Maximus You are welcome. I have added a few lines of explanation. – Carl Christian May 21 '16 at 15:37
  • I see now, we can't add anything smaller than 1/8, because it would increase the number of significant figures. We can't add add anything larger than 1/8, because although it wouldn't increase the number of significant digits, it wouldn't be least bigger number. Correct? – Max Koretskyi May 21 '16 at 15:41
  • @Maximus: You are perfectly correct. – Carl Christian May 21 '16 at 15:42
  • Alright, thank you :) – Max Koretskyi May 21 '16 at 15:44