6

I needed to figure out how many requests could be made with 1000 GB of traffic if each request took 1MB on average. I quickly did the math on paper, and then as a second thought plugged it into Google. To my surprise, Google's answer is different than mine.

My way:

1,000 gigabytes = 1000*1024*1024*1024 bytes

Divide by 1 megabyte = 1024*1024 bytes to get:

(1000*1024*1024*1024)/(1024*1024) = 1,024,000


The Google Way:

1000 gigabytes / 1 megabyte

Output: 1,000,000


Am I wrong, or is Google wrong?

bertieb
  • 7,344
  • 36
  • 42
  • 54
Nate
  • 1,505
  • 6
  • 23
  • 28
  • 16
    Be specific: Do you have 1000 GiB or 1000 GB worth of traffic? Do you have 1 MiB or 1 MB requests? – slhck Jul 29 '14 at 18:40
  • 4
    [This wikipedia article might clear things up](https://en.wikipedia.org/wiki/Mebibyte). – Adam Jul 29 '14 at 18:42
  • 1
    @slhck Each request being one megabyte. I'm just used to writing MB instead of MiB. And that would be 1000 gigabytes. I edited my question to spell it out instead of using an abbreviation. – Nate Jul 29 '14 at 18:43
  • Where exactly are you confused? – Ramhound Jul 29 '14 at 18:44
  • I'm glad google fixed their math. A few months back they were saying 1GB = 1024MB. :) –  Jul 29 '14 at 18:46
  • 5
    @Adam Oh wow, `mebibytes` and `kibibytes`? I need to go rethink my life now. :P – Nate Jul 29 '14 at 18:47
  • Related: http://superuser.com/questions/287498/what-is-the-difference-between-a-kibibyte-a-kilobit-and-a-kilobyte – Justine Krejcha Jul 29 '14 at 18:50
  • Related: http://superuser.com/questions/444616/how-much-storage-am-i-using –  Jul 29 '14 at 18:51
  • @Nate, it's not your fault most of computer science teachers and professors don't question 30 years old bad materials. Also Microsoft, Oracle, Many Cloud Services, and Memory makers use the notation wrongly. :) Take a deep breath and share what you've learned with others. :) –  Jul 29 '14 at 18:55
  • 1
    @Radoo Already posted on facebook. My world has officially been rocked :-) – Nate Jul 29 '14 at 18:56
  • 6
    What? 1000 ≠ 1024? Next thing, you'll be telling me that π ≠ 3. – Scott - Слава Україні Jul 29 '14 at 20:21
  • 1
    @Scott Every CSCI textbook I've ever looked at (as well as everything I've read online, until now) has *always* defined kilobyte, megabyte, etc., as 1024, not 1000. – Nate Jul 29 '14 at 21:25
  • Yeah, and if I dig around in the back of my closet, I can probably find some textbooks that say that the sun and moon revolve around the earth. :-) Did you really think that my previous comment was *serious* in any way? – Scott - Слава Україні Jul 29 '14 at 21:37
  • 9
    [This xkcd will clear things up](http://xkcd.com/394/) – Nick T Jul 30 '14 at 04:02
  • 2
    Since you are talking about "one MB on average" I think that the difference doesn't actually matter for your purpose . Even so, this question has taught me something I didn't know. "New fact for the day". So thanks for asking. – Floris Jul 30 '14 at 15:16
  • 1
    What Floris said. It turns out that for most purposes, 1024 == 1000. – Russell Borogove Jul 30 '14 at 17:41
  • Related: http://superuser.com/questions/599371/what-is-the-actual-manufactured-capacity-raw-not-formatted-of-a-hdd/599404#599404 – Jan Doggen Jul 31 '14 at 14:12

2 Answers2

21

Neither of you are wrong, you just asked Google a different question from your actual question. If you had explained to Google that you meant GiB and MiB, it would have given the answer you expected.

Try this: 1000 GiB / 1 MiB

David Schwartz
  • 61,528
  • 7
  • 100
  • 149
  • 6
    Google always knows.. :-) – Nate Jul 29 '14 at 18:55
  • 4
    To clarify, these are pronounced `gibibytes` and `mebibytes` respectively. The base-ten version is pronounced `gigabytes` and `megabytes` respectively. – user530873 Jul 29 '14 at 22:59
  • 4
    The base-ten version is pronounced `metric gigabytes` and `metric megabytes` respectively. – Mark Jul 30 '14 at 10:57
  • 1
    Why is 1KB so massively commonly used to refer to 1024 bytes, when the standards say it's 1000 bytes? What made the standards people come up with something that contradicted such a widely used thing. – Jonathan. Jul 30 '14 at 12:50
  • 1
    @user530873: Not if you want people to actually say them, they're not. :P I refuse to say the word "gibibyte" unless i'm consciously *trying* to sound stupid. – cHao Jul 30 '14 at 13:48
  • @Jonathan.: The fact that (a) 1024 is a power of two, and computers (and computer engineers) like working in powers of two; and (b) it's not contradicting anything -- since there's no SI unit called the "byte", it doesn't matter how SI defines its prefixes. – cHao Jul 30 '14 at 13:50
  • @Jonathan. It didn't exist as that standard until 1998, while 1KB = 1024 bytes had been used for decades before then. And even then, there wasn't a strong push to the "gibi"/"mebi" stuff until the mid-2000s. – Izkata Jul 30 '14 at 14:54
  • so then why didn't the standards people use the already existing convention. Like unless there's some like latin meaning behind the prefixes it seems it's just stupidity on the standards people's behalf. – Jonathan. Jul 30 '14 at 17:53
12

This is a topic that has been heavily debated, and popularized by hard drive manufacturers (and Wikipedia multiple times). There are two sets of standards for binary prefixes, which pretty much contradict each other. JEDEC uses KB, MB and GB while the IEC uses KiB, MiB and GiB. Here, powers of 1024 are used.

For decimal prefixes (IEC), powers of 1000 are used. Linux, Mac and Google use the 1000 powers when representing KB, MB and GB, while Windows (and Bing) use the 1024 powers for representing KB, MB and GB.

Outside of a small niche, the IEC binary prefixes will seldomly be used. It's worth noting that is was only until recently Google showed that 1024 bytes in to 1 KB.

It's worth noting that the prefixes are used for different things. A 10 Mbps connection is 10,000,000 bits per second a 1.44 MB floppy is 1,400,000 bytes.

Justine Krejcha
  • 2,207
  • 2
  • 16
  • 27
  • 1
    That's what I was saying also, about google. They showed up 1024 a few months back. I guess they captured my swearing when I searched "*********…*** google 1KB is not 1024B you **********…****" –  Jul 29 '14 at 23:05
  • 5
    +1 The comments and top answer seem to be under the impression that using KB when one means KiB is wrong. But this is the correct answer. There are two different standards. Adding the new prefixes didn't help as they could because they were used for for the less common usage. "1024 kilobytes to the byte" predates "1000 kilobytes to the byte" by a long time, with the latter mostly being used in networking and sales of storage (to make it seem like the customer was getting more). Until relatively recently, even the IEC used 1024 KB per MB. – trlkly Jul 30 '14 at 05:05
  • 2
    I'd also point out that Linux often uses MiB and the like so that the numbers match up with Windows, even if the units don't quite match. And this is still not consistent, as many apps still use the more common terms. To tell the truth, I think the IEC screwed up. Using the metric prefixes for binary was more common, so the new abbreviations should have referred to the decimal concept. And they should have avoided cutesy names like "mebibyte," terms people will think strange to use officially. It's been 7 years, and still the binary prefixes haven't caught on in the general public. – trlkly Jul 30 '14 at 05:13
  • @trlkly I agree with everything you said. Not many people I know even have heard of a 'kebibyte'. – Justine Krejcha Jul 30 '14 at 05:14
  • @justcool393 While that is true, most people use "megabyte" when they actually mean "mebibyte". Or, to be fair, they even confuse orders of magnitude, mixing up MiB and GiB and TiB... :D – Luaan Jul 30 '14 at 07:31
  • @Luaan That's covered in the answer. There are two sets of contradictory standards. – Justine Krejcha Jul 30 '14 at 18:21
  • 1
    The problem is cases where you really do want mega to be a million. For example, a 100Mbps Ethernet cable really does carry 100,000,000 bits per second. – David Schwartz Jul 30 '14 at 18:48
  • @DavidSchwartz Good point. I'll add that in to my answer. – Justine Krejcha Jul 30 '14 at 18:49