megabyte

How to correctly convert filesize in bytes into mega or gigabytes?

I'm using the DriveInfo class in my C# project to retrieve the available bytes on given drives. How to I correctly convert this number into Mega- or Gigabytes? Dividing by 1024 will not do the job I guess. The results always differ from those shown in the Windows-Explorer. ...

Converting from bandwidth to traffic gives different results depending on operators position?

Hi. This must be a stupid question, but nevertheless I find it curious: Say I have a steady download of 128Kbps. How much disk space is going to be consumed after a hour in Megabytes? 128 x 60 x 60 / 8 / 1024 = 56.25 MB But 128 x 60 x 60 / 1000 /8 = 57.6 MB So what is the correct way to calculate this? Thanks! ...