A digital computer stores fractions as a finite number of bits b 1 , b 2 , b 3 , … , b n representing
2 b 1 + 2 2 b 2 + ⋯ + 2 n b n .
Which of the following numbers cannot be represented exactly in this manner?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
However, 0.1 cannot be written exactly as a finite sum of inverse powers of 2.
How do you know this is true?
Log in to reply
Hi Pi Han Goh. Thanks for your comment. I have now edited my solution to make the answer more convincing.
If we consider b = 1 , we notice that
2 b = 0 . 5 ,
2 2 b 2 = 0 . 2 5 and
2 3 b 3 = 0 . 1 2 5 ;
therefore there exists no element equals to 1 0 b = 0 . 1
You have only shown that 0.125, 0.25, and 0.5 are possible. How do you know that 0.1 is not possible as well?
I see the problem got edited but if we look at it right now, l see a geometric progression series whose ratio is 0 . 5 , therefore 0 . 1 can't be an element of this series, because every element is in the form of 2 n 1 for n = 1 , 2 , 3 , …
Problem Loading...
Note Loading...
Set Loading...
A computer stores decimal numbers as sums of inverse powers of 2. So, 0.5 would be stored as 0 . 1 0 0 0 0 = 1 ∗ 1 / 2 , 0.25 would be stored as 0 . 0 1 0 0 0 = 0 ∗ 1 / 2 + 1 ∗ 1 / 2 2 , and 0.125 would be stored as 0 . 0 0 1 0 0 0 = 0 ∗ 1 / 2 + 0 ∗ 1 / 2 2 + 1 ∗ 1 / 2 3 . However, 0.1 cannot be written exactly as a finite sum of inverse powers of 2. We can see that to represent 0.1 in binary we will have to select inverse powers of 2 which are less than 0.125. However, we observe that all such numbers or their sums will always end with 5, i.e, 0.0625, 0.0625+0.03125 = 0.09375. The sum of inverse powers of 2 will always have 5 in the last decimal place. Therefore 0.1 cannot be represented exactly.