[Gllug] Bytes to Megabytes

Liam Smit liam.smit at gmail.com
Fri Aug 26 14:33:48 UTC 2005


Hi

> 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.

Yup. I'm afraid this is what happen when marketing types pull a fast
one and get away with it. But luckily this mostly apply to HDD's i.e.
1GB = 10^9 and not 2^30.

Although I see BT is carrying on as if 10^3 is a megabit...

Seeing as how it used to be 1024^2 I'd stick with that. Either way
it's a 7% difference so maybe you should document whatever you decide
on?


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




More information about the GLLUG mailing list