Converting bytes to megabytes

前端 未结 9 532
执念已碎
执念已碎 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 13:01

    BTW: Hard drive manufacturers don't count as authorities on this one!

    Oh, yes they do (and the definition they assume from the S.I. is the correct one). On a related issue, see this post on CodingHorror.

提交回复
热议问题