[Gllug] Bytes to Megabytes

John Winters john at sinodun.org.uk
Fri Aug 26 13:58:45 UTC 2005


On Fri, 2005-08-26 at 14:25 +0100, Julian Somers wrote:
> Can anyone confirm for me a definition of a Megabyte that is correct for
> measuring volumes of traffic?
> 
> I am doing a script that reports the number of Meagbytes transferred
> during a VPN session. I collect data in bytes.
> 
> I have always used ( bytes / 1024 ) / 1024 to calculate file sizes in MB
> (1MB = 1,048,576 bytes). But having read the three definitions of a
> Megabyte here -- http://en.wikipedia.org/wiki/Megabyte -- I believe I
> should be using 1MB = 1,000,000 bytes in this case.

Historically, megabyte had one single meaning - 1024x1024 bytes.  This
unfortunately fell foul of two different things:

1) Marketing types who spend their time trying to find ways to deceive
people without actually getting caught.  Once one of them realised that
he could make things seem bigger if he used a definition of 1000x1000 we
started to find the term used ambiguously.

2) International standards dictate that the prefix "mega" should mean
exactly 1000x1000.

If you want to make your program produce unambiguous figures, why not
print your results in mebibytes?

John


-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list