Converting bytes to megabytes

前端 未结 9 540
执念已碎
执念已碎 2020-12-12 12:36

I\'ve seen three ways of doing conversion from bytes to megabytes:

  1. megabytes=bytes/1000000
  2. megabytes=bytes/1024/1024
  3. megabytes=bytes/1024/100
9条回答
  •  佛祖请我去吃肉
    2020-12-12 12:48

    Megabyte means 2^20 bytes. I know that technically that doesn't mesh with the SI units, and that some folks have come up with a new terminology to mean 2^20. None of that matters. Efforts to change the language to "clarify" things are doomed to failure.

    Hard-drive manufacturers use it to mean 1,000,000 bytes, because that's what it means in SI so they figure technically they aren't lying (while actually they are). That falls under lies, damn lies, and marketing.

提交回复
热议问题