Have you ever tried comparing your internet plan and time taken to download a file via internet? Let us say your internet plan is 2 MBps. Now, how much time it should take to download a 2MB file? If you guessed 2 seconds, you are wrong! Let us see what actually 2MB file and net speed of 2MBps means.

File Size 2MB = 2 MegaBytes 

                             = 2 * 1024 KiloBytes

                             = 2 * 1024 * 1024 Bytes

                             = 2 * 1024 * 1024 * 8 bits

This means a file of 2Mb occupies 2 * 1024 *1024 * 8 bits in memory.

——————————————————————————————————————-

 

Net Speed 2MBps = 2 MegaBits per second

                                    = 2 * 1000 KiloBits per second

                                    = 2 * 1000 * 1000 bits per second

This means a net speed of 2MBps can download 2 * 1000 * 1000 bits of content in 1 second.

So, how do we calculate the time it would take to download a 2 MB file? It is very simple… MATH!

Time(in seconds) = size of file(in bits)/ speed (in bits per second)

                                    = (2 * 1024 * 1024 * 8) / (2 * 1000 * 1000)

                                    = 8.38 second (approx.)

From now on, keep this in mind … the MB in net speed and in file size is not the same.