How to calculate your Internet connection speed and your hard drive capacity

此文系早年博客的备份,仅用于参考学习。
This article is an archival copy of my early years’ blog posts.

I write those two issues here in the same article because they share a similarity, which is the conversion between the units used in computer system. To be specific, it is a matter of converting bit, Byte, KB, MB, GB, etc, to each other. Now let’s see the problems.

Internet Connection Speed

We often find that the connection speed of our broadband which the service provider tells us is not as fast as we think, for example, we setup a 2M ADSL broadband at home and only find that the maximum download speed is just around 250 KB/s, far less than 2MB.

Before I explain why, I have to say that there is a misunderstanding in this issue, that is, we just take it for granted that the “2M” here is equivalent to the “2MB (2M Byte)” which we use to describe the size of an ordinary file, such as JPG or DOC.

However, this is not the case here. When it comes to the speed of the broadband, “2M” actually means 2M bit/s, not 2M Byte/s. So if you know some essentials of how our computers work, you may already know that the two units are different and it needs a calculation to convert 2M Bit to Byte. Here I give you some information on this and how to calculate it right:

8bit = 1Byte ==> 1024Byte = 1KB ==> 1024KB = 1MB ==> 1024MB = 1GB, and so forth.

so,

2M bit/s = 2,000,000 bit/s = 2,000,000/8 Byte/s = 2,000,000/(8*1024) KB/s = 244.14 KB/s

(This calculation is just theoretically correct, but the real speed will be a little bit faster/slower than the number you calculate.)

So, next time you setup a broadband, you just do the calculation yourself and you’ll know how fast your broadband is.

The real capacity of your Hard Drive

Similar to the speed of your broadband, the printed capacity of your hard drive is also not the real capacity than you can actually use. The actual capacity will be a little bit less than the printed one.

This is because the manufacturer uses “1000” instead of “1024” to convert Byte, KB, MB, etc, to each other, which means “1KB” here is not “1024 Byte” but “1000 Byte”. However, our computers still use “1024” to calculate the capacity, so the actual capacity you can use need to be re-calculated like this (take a 320G hard drive as an example):

320,000,000,000 Byte = 320,000,000,000 / (1024 * 1024 * 1024) GB = 298.02 GB

So, here you know why your actual hard drive capacity is always less than the one printed outside its cover.