| Converting number bases: repeating fractions | ||||||||||
| Given: decimal fraction representation | ||||||||||
| Find: binary representation | ||||||||||
| value: | 0.20ten | |||||||||
| b-1 | b-2 | b-3 | b-4 | b-5 | ||||||
| weight | 0.5 | 0.25 | 0.125 | 0.0625 | 0.03125 | |||||
| digit | 0. | |||||||||
| Sometimes, a fraction may not be exactly represented: | ||||||||||
| 1/3ten = (0.3333 . . .)ten | ||||||||||
| 0.2ten | = b-1 * 2-1 + b-2 * 2-2 + b-3 * 2-3 + b-4 * 2-4 + etc. | |||||||||
| If we multiply by 2, | ||||||||||
| 0.4 | = b-1* 20 + b-2 * 2-1 + b-3 * 2-2 + b-4 * 2-3 + etc. | |||||||||