lkml.org 
[lkml]   [2001]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectunits - was: Re: Determining maximum partition size...
On Tue, Aug 28, 2001 at 01:53:29PM +0100, Anton Altaparmakov wrote:

> > > I thought maybe Linux set 1MB=1000k but that doesn't seem to case.

> >Well, 1 M = 1000 k by definition of the SI system of units.
> >This has nothing to do with Linux.
>
> While it is true that M = 10^6 and k = 10^3, surely that doesn't apply to
> byte quantities?!? At least I have always interpreted 1 Megabyte = 1024
> kilobytes = 1024*1024 bytes


Ah, an old discussion - I imagine it must have occurred here a few times.
Anyway: k is the prefix for 1000, M is the prefix for 1000000. Always.

But there is a natural sloppiness, where people round numbers when either
the precise size is unimportant, or is clear from the context.
If xyzzies come in boxes of 27 and I say that I bought a hundred xyzzies
then that probably means that in fact I bought 108.

Thus, our old PDP8 with 4k of memory had 4096 12-bit words, that is,
6 KiB in modern terminology.

You see two very different situations here: "precise size is unimportant"
and "precise size is clear from the context". When someone says that she
bought a 10 GB disk I will assume that the precise size is somewhere
between 9.5 and 10.5 GB. This is the "rounded" case.
When someone says that she bought a 32 MB SIMM I will assume that this was
32 MiB, that is, 2^25 bytes, since, unlike disks, memory modules tend to
come in power-of-two units. This is the "clear from the context" case.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:01    [W:0.241 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site