将 0.4 从 10 进制转换为 2 进制,但即使程序正确,结果也不正确
Converted 0.4 from base 10 to base 2, but the result isn't correct even though the procedure is right
我正在尝试将 0.4 从 10 进制转换为 2 进制。
这就是我所做的:
0.4 * 2 = 0.8
0.8 * 2 = 1.6
0.6 * 2 = 1.2
0.2 * 2 = 0.4
0.4 * 2 = 0.8
0.8 * 2 = 1.6
因为0.8和1.6重复了,就到此为止了,得到的就是“0110”。但是,0.0110 在基数 2 中是 0.375,而不是 0.4。
很明显,我做错了什么,谁能指出错误在哪里?
Here they say, that once it's started to repeat itself, it means, that it's just a recurring fraction。所以我相信, 0.410 = 0.(0110)2 意味着 0110
-部分是重复出现的,它是 0.011001100110.. .
我正在尝试将 0.4 从 10 进制转换为 2 进制。 这就是我所做的:
0.4 * 2 = 0.8
0.8 * 2 = 1.6
0.6 * 2 = 1.2
0.2 * 2 = 0.4
0.4 * 2 = 0.8
0.8 * 2 = 1.6
因为0.8和1.6重复了,就到此为止了,得到的就是“0110”。但是,0.0110 在基数 2 中是 0.375,而不是 0.4。 很明显,我做错了什么,谁能指出错误在哪里?
Here they say, that once it's started to repeat itself, it means, that it's just a recurring fraction。所以我相信, 0.410 = 0.(0110)2 意味着 0110
-部分是重复出现的,它是 0.011001100110.. .