What’s all this talk about bits and bytes? Why do hard drive manufacturers measure by the unit of bytes, while telecommunication companies opt for the unit of bits?
In Computer Science, a bit is the smallest unit of value representing either a 1 or 0. An octet of bits are used to convert to a human readable character. Hence, 1 character on a Western keyboard takes 1 byte to store. Some of the other common values are:
Tiny Int = 1 Byte ( -128 to 127)
Int = 4 Bytes (-2147483648 to 2147483647)
Storage and Memory
At the junction of mathematics and computer science, A Kilo is defined two to the tenth power, 210. Therefore, 1 kilobyte (KB) is 210, or 1,024 bytes; 1 megabyte (MB) is 220, or 1,048,576 bytes. The correct way to express these units is by using capital letters (KB, MB, GB, TB, etc.). Hence, the “power of two” or 210 is used to represent a byte in storage measurements. An ascension from byte to Megabyte is by a factor of 210 or 1024, not 1000 as compared to bits to megabits. Microsoft file size and storage calculations are based on this math. and its generalized conversion table resembles this:
512 kbps / 8 = 64,000 bytes
64,000 bytes / 1,024 = 62.5 Kibibytes/s or KB/s
Do you notice anything confusing about the table above in correspondence to its preceding paragraph? Yes, I’ve switched terms such as Kilobytes to Kibibytes. That is because the original usage of the metric prefix to describe storage has been improper. Unfortunately, this has become the prevalent expression. Thus, big guys such as the International Electrotechnical Commission (IEC) have come up with words such as Kibibytes, Megibyte, and Gibibytes to distinguish between the two types of measurements. Until this day, marketers still use Gigabytes to sell hard drives, while Microsoft still measures in Gigibytes. If memory and hard drive distributors are honest, 1 TB should be labeled a 931 GB instead.
Communication transfers at the wire is done as transmission of 1’s and 0’s. Hence, the standard unit of measurement telecommunication is calculated as bits, instead of bytes. Bits are being counted similarly to a metric system (e.g. millimeter, centimeter, meter, kilometer). Each ascension is to a factor of 1000. Hence:
bits per second (bps) = 1 bit/s
Kilobits per second (Kbps) = 1000 bits/s
Mbps = 1000 Kbits/s or 1,000,000 bits/s
Gbps = 1000 Mbit/s or 1,000,000,000 bits/s
Tbps = 1000 Gbit/s or 1,000,000,000,000 bits/s
Let us do some practical math:
Suppose you would like to download a file with the size of 640 Mebibytes (MBs). The factor to convert from Mebibytes to Kibibytes is via a multiplier of 1024. Hence 640 MBs x 1024 KB/MB = 655,360 Kibibytes, which will then converts 671,088,640 bytes. There are 8 bits in each byte; thus, 671,088,640 bytes x 8 bits/byte = 5,368,709,120 bits.
Now, if your Internet speed is 1 megabits per second or Mbps, you will download at 1,000,000 bits per second. It will then take 5368.71 seconds to finish with downloading the file. Divide that by 60, the result is 89.48 minutes.
On the same token, 1 MBps consists of eight times more bandwidth than 1 Mbps. The same file above would have taken 11.185 minutes to download. The only difference here is “MB” vs “Mb.”
To be precise in writing, a byte should be expressed using an uppercase ‘B’, and a bit is a lowercase ‘b’. Better yet, put the ‘i’ in the middle to avoid confusion. Thus, ‘MiB’ will mean Mebibyte or 1024 Kibibytes (KiB). That is in contrast with ‘Mb’, ‘mb’ or megabit. Therefore, a KiB is way more more than a Kb or kb, etc. What about those guys on Amazon and Ebay selling Samsung SSDs? They sell “Terabytes” or “TB” things that really should be marked as “terabits” or “tb”. All we can do is to do the reverse conversion in our minds and accept that life is full of these anomalies.