4 ms·
How does the 2^10 to 10^3 approximation come about? All of the others made sense to me, but I couldn't figure that one out.
by etendue 10y ago
How does the 2^10 to 10^3 approximation come about? All of the others made sense to me, but I couldn't figure that one out.
- ColinWright 10y agoCompare 1000 with 1024. As I say above, 2^10 is bigger than 10^3 by 2.4%. When we raise it to the power of 5 we are wrong by 12.6%.
- hyperpape 10y ago2 ^ 10 = 1024. That's one of those "shout it from the rooftops" approximations for programmers. I use it constantly.
- Sharlin 10y agoAnd this is why base-ten and base-two file and memory sizes are roughly equivalent (which is somewhat useful but also causes a lot of confusion): 2^10 bytes = 1 kiB ≈ 1 kB = 10^3 bytes 2^20 bytes = 1 MiB ≈ 1 MB = 10^6 bytes 2^30 bytes = 1 GiB ≈ 1 GB = 10^9 bytes 2^40 bytes = 1 TiB ≈ 1 TB = 10^12 bytes and so on. The relative error does grow as you move to larger and larger powers, though.
- deleted 10y ago[deleted]
- impendia 10y agoAs the other answers point out, it follows from explicit computation. Let me add that there's no particularly good a priori reason to expect this particular coincidence. It just happens.