I once thought I should make a blog that would explain tech concepts for the lay person. I’m sure I’m not the only person who has thought to do this, but I thought I could make a good contribution in this area. After shuttering my first site, familytechguy.com, I kind of gave up on the idea, but I’m going to try making another attempt here. So, let’s begin.
We talk in terms of “-bytes,” which are measurements of amounts of data. Specifically, these include megabytes (abbreviated MB), gigabytes (GB), terabytes (TB), and so on; but what do these measurements actually measure? You’ve probably heard that computers deal in binary, a system of ones and zeroes. Well, this is what we are talking about here, millions and billions of ones and zeroes.
What does a one or a zero tell us? Pretty much nothing. We only use them because having only two values makes it pretty easy to make it clear what we mean when storing and transmitting data. For example, ones and zeroes can be expressed with positive and negative polarity, voltage over a wire versus lack of voltage, light versus dark (as in the case of fiber wire), and so on. In order to have actual meaning, we need a series of ones and zeroes (called bits) to arrange together in a code. The smallest group of bits is known as a byte, which is defined as eight bits. Eight bits, with two possible values each, means there can be 256 unique values in a byte (2^8=256). This was (and still is) a useful number of values. These unique values can be understood to represent specific things, like letters, numbers, and punctuation marks. Indeed, in a simple text file (.txt), each character in the file is recorded as a single byte.
As computers have matured, they have become more complex, and our needs for storage space has grown (it takes a lot of bytes to represent a cat video on a physical disk), which means we need thousands of bytes; millions, billions, even trillions of bytes. For sake of convenience, we have larger units of measurement, just like a centimeter becomes a meter, and then a kilometer. These measurements are the kilobyte (one thousand), megabyte (one million), gigabyte (one billion), terabyte (one trillion) and so on. Names are ready for larger values, such as the petabyte (one quadrillion, already in use in some circumstances), and the exabyte (one quintillion).
What about this 1,024 business?
You may have heard that a kilobyte is not actually 1,000 bytes, but really 1,024 bytes. This is true (sort of) and also completely false. Many favor counting by powers of two rather than ten, so they would favor a kilobyte to be 1,024 (2^10) instead of 1,000 (10^3). Each new name would then be given after another ten powers of two, so a megabyte would be 1,048,576 bytes (1,024 x 1,024 or 2^20). As you can see, these values quickly diverge, so using the same names for either one is terribly misleading. Officially, a kilobyte (KB) is 10^3 bytes, while a kibibyte (KiB) is 2^10 bytes. The naming convention continues from there. A megabyte (MB) is 10^6 bytes, while a mebibyte (MiB) is 2^20 bytes.
Hooray, it’s all clear now, except for one major problem: this standard is often ignored. The biggest offender is Microsoft Windows, which uses kibi- mebi- and gibibytes (and so on), but calls them kilo-, mega-, and gigabytes. Here’s a real-world example. You buy a 1 TB external hard drive and attach it to your Windows computer, which reports 931 GB on the device. You go into a rage that you’ve been cheated out of 69 GB. Your friend buys the same hard drive and attaches it to his Mac. His computer reports 1 TB on the device. What’s up?
Here’s what happened, the manufacturer made a disk containing space for 1,000,000,000,000 (one trillion) bytes. Counting in gigabytes, that’s 1,000 GB or 1 TB, which the Mac correctly reports. The Windows computer counts in gibibytes (which are over 7% larger than gigabytes), and finds 931 GiB (and change). However, certain you’ve never heard of a gibibyte, it tries to make it simpler on you and says the device has 931 GB. Hence the confusion. Both of you have the same amount of space, you are just counting it differently.
As a final note here, while Windows and macOS are internally consistent in their chosen measurement standard, Linux distributions can be all over the place, sometimes making the distinction in their notation (MiB vs. MB) and sometimes not. Which is good to know if you find yourself, say, partitioning a hard drive using Linux tools.
So, there you have it, more than you ever wanted to know about the definition of a gigabyte.