lkml.org 
[lkml]   [1998]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: patch for sd.c: fix MB vs. GB
	> Trick question; "Is this correct?"
>
> N / 1024 = kilobytes
> N / (1024 * 1024) = megabytes
> N / (1024 * 1024 * 1024) = gigabytes
Answer: there is one and only one correct use:
k = 1000, M = 1000000, G = 1000000000.
But people have been sloppy, and used k for 1024 in contexts
where no confusion was likely. We bought 4k memory (4096 12-bit words,
$14000 if I recall correctly) - saying `4k' is easier than saying `4096'.

In order to describe larger amounts of memory, still measured in
chunks of size 512 or 1024, people also used M for 1000 k
so that M = 1000*1024. This is what makes a floppy 1.44MB.

But then memory sizes increased, and since these come in power-of-two
quantities, it became more convenient to use M = 1024*1024, at least
when talking about internal memory. One had perhaps 4 MB.


Some people defend the idea that kilo=1000 for kilovolt,
kilowatt, kilometer, kilogram, kilobit/second (transmission speed),
kilobit/millimeter (tape density), but stands for 1024 in kilobyte.

These people do not realize that k=1024 is just sloppy, like saying
that one bought something for `14 grand' when it really was $14032.
There is no discussion about what `grand' really means - it is just
a thousand dollars - but we use it for convenience for nearby numbers.

Of course a standard, whether talking about computers or not, uses
k=1000, M=1000000 as prescribed by SI, even when approximating.
For example, you can read in the ATA standard:
"528 MB is used to describe a drive that has 528,482,304 bytes."
The discussion about the end of the ATA standard talks about the
137.5 GB limit.

Aha - k=2^10, M=2^20 is not `right', it is a convenience thing,
to be used when things come naturally in powers of two.

Now I buy an 18 GB disk as advertised by the manufacturer.
Coming home, I see that it has a capacity of 18000904192 bytes.
It would not be convenient for anybody to say that it is
17167 MB and 16.8 GB.

Disk capacities do not come naturally in powers of two.
So it is not convenient, and it is not correct, there is
really no reason whatsoever, to use G = 2^30 in such a context.

Andries

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

\
 
 \ /
  Last update: 2005-03-22 13:46    [from the cache]
©2003-2011 Jasper Spaans