Hacker News new | past | comments | ask | show | jobs | submit login
Tarsnap - Why is 1 GB 10^9 bytes instead of 2^30? (tarsnap.com)
48 points by billpg on Nov 4, 2009 | hide | past | favorite | 25 comments



Has this not been hashed over a billion (or, ugh, 10^9) times :)


Yes, and some people still get it wrong!


At least for me, the problem isn't that I think GB should not be 10^9 bytes, but that Gibibyte sounds stupid.


Just write GiB but pronounce it "gigabyte".



sorry, it was a joke, I never meant 10^9 == 1 Billion. I edited the brackets in afterwards ;)


I was also joking.

"Billion" suffers from the same problem as "Gigabyte". It has two mutually exclusive definitions (10^9 and 10^12) so you can't use it without the possibility of some confusion resulting.


Doh. Double gotcha'd :)


10^9 = german billion. no problem here with the short ladder.


Maybe I misunderstand your comment, but Germany uses the long scale, last time I checked.


ops, yes of course


At least one gigatime.


That's GiTime, not GITime for those playing the at-home game.


Then, OSes get this wrong and calculate storage in GiB.

Also when I see a 128 GB SSD I somehow expect this to mean a proper power of 2, not to mention it should be addressed similarly to RAM.


Mac OS X 10.6 get this right and calculate in true KB, MB and GB that is 10^3, 10^6, and 10^9 bytes. I heard that Linux also get this right and now use the KiB, MiB and GiB prefixes for 2^10, 2^20, 2^30. Both options are good.


The latest Linux I use (Ubuntu 9.04) uses M and G prefixes.

My point is it's a mess and it's unreasonable to claim proper rules are followed.

E.g. how do you measure hosting bandwidth? A random calculator (http://www.ibdhost.com/help/bandwidth/) says:

1KB = 1024B; therefore, 500MB = 512000KB = 524288000B .. and .. 1GB = 1048576000B


The usual 'binary' scale goes like this: 1 kB = 1024 B, 1 MB = 1024 * 1024 B, 1 GB = 1024 * 1024 * 1024 B, etc. which may be at odds with SI but at least it's self-consistent. The page you've quoted seems to be suggesting that 1 KB = 1024 B, 1 MB = 1024 * 1024 B, and 1 GB = 1000 * 1024 * 1024 B. That seems pretty absurd to me, but maybe they're just taking a page from the book of the "1.44 MB" floppy disks which actually hold 1000 * 1024 B.


Where in "Linux" do you mean?

In "du" and "df", there is "-h" for powers of 2 and "--si" for powers of 10.


A quick Google search told me that the transition is not complete. GNU tools have options for si/iec prefixes compliance (http://www.gnu.org/software/coreutils/manual/html_node/Block...) but the debate is still open elsewhere.


As a programmer, I can't help but think that it should be 2^30. It's all in the same part of the brain that says that 256 is a nice round number. Comparatively, 10^9 is not even close to a nice number. It really comes down to that simple matter of taste. But I understand how it might be confusing to regular people.


Just because the vast majority of computers are implemented in base 2 doesn't magically make it the one true way™. To suggest that 10^9 is not a nice number is just being willfully combative against your own human nature.


I never said it was the one true way; in fact I was being pretty pragmatic about it. As programmer, I'm constantly thinking about numbers base 2 and Hexadecimal (I never understood the point of Octal). Therefore base 2 numbers for bytes just makes sense to me. Clearly, other programmers have felt the same way.

Sure 10^9 is a nice number when not working with computers, but when you're working with a computers you know that base 10 numbers don't fit right. I'm not being combative against my own human nature, I just think differently based on the context. Obviously the vast majority of people don't have that other context.


(I never understood the point of Octal)

Some early architectures had 9-bit bytes. Octal math works cleanly for those, much as hexadecimal math works cleanly for processors with 8-bit bytes.


> It's all in the same part of the brain that says that 256 is a nice round number.

I recognize the feeling you're talking about, but I wouldn't go so far as to call it round. I'd call it familiar. It's the same sense that makes me see 42 and think "nice number", or 1983, or 255 even.

Round, on the other hand, requires more than simple recognition, it also requires easy calculation. Calculating 4 * 256 isn't that hard, but when I go for 6 * 256, I'll have to split it in 4256 + 2256. It's even worse for 1048576. Whereas decimally round numbers are very easy to do calculations on.


Snow Leopard shows values in the correct GB's. Stuff like df uses Gi and similar prefixes.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: