Saturday, March 24, 2012

Bits, Bytes, Megabytes, and Gigabytes

Ever wonder why when you download stuff from the internet, your download speed is so much slower than your advertised connection speed? Well, this post will answer that question, in addition to covering the bits and bytes of a computer.

A bit is a binary digit that in the computer world is usually either a 0 or a 1. A bit is represented by a small b, for example Kb (kilobit). The 0’s and 1’s are on’s and off’s in the computers circuitry, since computers run on electricity this is the only two states that electricity can be in, either on or it is off. All storage mediums (hard drives, CDs) use 0’s and 1’s to store content.

Next, we have the byte. A computer byte is made up of 8 bits or 8 on’s or off’s. Bytes are represented by a big B, for example KB (kilobytes). So, if you 1 KB (kilobyte) you have 8,000 (eight thousand) bits. Bits and bytes can not only be used for size, but also for speed. Generally for you size you will see KB, Mb, GB, and so on; but if you have a speed then you will see kbps (kilobits per second), or MBPS (megabytes per second), generally though bits is used for speed rather than bytes.

And finally, we have the prefixes – kilo, mega, giga, tera, and so on (yes, there are more prefixes!). Kilo is 1,000 (one thousand), mega is 1,000,000 (one million), giga is 1,000,000,000 (one billion), and tera is 1,000,000,000,000 (one trillion). For those who are little rusty on their math, each prefix is one thousand times bigger than the previous. So, a kilo times a thousand will make one million (mega). Most hard drives now days are represented in either Gigabytes (1 billion bytes) or terabytes (1 trillion bytes). For example a 500 GB hard drive can hold 500,000,000,000 (500 billion) bytes.  By the way, you can multiply that by 8 and figure out how many bits it will hold (hint: it is a larger number!).

Now to the question I asked above, why is your download speed so much slower than your advertised upload speed? You may have been able to figure this out already from reading about bits and bytes above. Most internet connection speeds are rated in bits, for example you have a 6 Mbps connection (6,000,000 – six million bits per second) speed. But, when you download a file, your computer downloads the file in bytes, not bits. Hence your download speed will be an eighth (1/8) of your connection speed. As you can see in my example below, my connection speed is 2 Mbps (2,000,000 – 2 million bits per second), actually 2.07 Mbps, but to keep the math simple here, we will just use 2 Mbps (notice the small b!).

clip_image002

And in the screenshot below of an actual download, you can see my download speed is 252 KB/sec. Notice the big B! Now, if you do the math and make this into bits – take 252,000 and multiply it by 8 you will get: 2,016,000; which makes for 2 Mbps.

clip_image004

No comments:

Post a Comment