Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, no. If we're going to be pedantic, we should say MiB (mebibytes), because file sizes on disk are expressed in multiples of powers of 2, but the SI prefixes are multiples of 10.

So a 1 megabyte file (as reported by the file system) is actually 1048576 bytes, which technically - sorry, I mean pedantically - speaking, is 1 mebibyte.

To make matters worse, disk manufacturers use the decimal prefixes, so our nice 1 terabyte drive is 931 mebibytes, but is reported by the file system as 931 megabytes (not MiB).

Finally, memory manufacturers use the binary prefix, so 1 megabyte of RAM is actually 1 mebibyte (1048576 bytes).

A bit of a mess, no?

All the above is, IMHO, a consequence of imprecision. If we get used to being loose with our terminology, we risk carrying that attitude over into our work product, with sometimes regrettable results.

So I'll continue to strive to be pedantic (translation: precise).



> Well, no. If we're going to be pedantic, we should say MiB (mebibytes), because file sizes on disk are expressed in multiples of powers of 2,

Not true anymore. OS X (and I assume iOS) reports sizes in power-of-10 units.

If you think about it, it is really user-hostile to express file sizes as powers-of-two. Who can remember that a "GiB" is 1073741824 bytes?


I didn't know OS/X used the decimal prefixes, but that just means it's less true, not untrue. There are still many more systems out there that use the binary prefix. I imagine most *nix, and not sure about Windows. And RAM is still power of 2.

I don't think it's terribly user hostile to express sizes as powers of two when you work with these kinds of numbers for a living, especially when it's near the bare metal (Erlang binary data type FTW!)

But I do think it's user hostile to have two different units depending on what you're looking at. If it were all decimal or all binary, it would be much easier.


You probably meant 1TB to be 931 Gibibytes, didn't you?


Ah crap, yes, I did. Got to stop this middle of the night posting...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: