Figuring out how many megabytes go into gigabytes?

6

2

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?

Nate

Posted 2014-07-29T18:39:07.887

Reputation: 1 125

Question was closed 2014-08-01T03:19:26.247

16Be specific: Do you have 1000 GiB or 1000 GB worth of traffic? Do you have 1 MiB or 1 MB requests? – slhck – 2014-07-29T18:40:50.960

4This wikipedia article might clear things up. – Adam – 2014-07-29T18:42:26.880

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 – 2014-07-29T18:43:08.340

Where exactly are you confused? – Ramhound – 2014-07-29T18:44:27.230

I'm glad google fixed their math. A few months back they were saying 1GB = 1024MB. :) – None – 2014-07-29T18:46:18.983

5@Adam Oh wow, mebibytes and kibibytes? I need to go rethink my life now. :P – Nate – 2014-07-29T18:47:37.643

Related: http://superuser.com/questions/444616/how-much-storage-am-i-using

– None – 2014-07-29T18:51:07.600

@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. :) – None – 2014-07-29T18:55:11.507

1@Radoo Already posted on facebook. My world has officially been rocked :-) – Nate – 2014-07-29T18:56:18.443

6What? 1000 ≠ 1024? Next thing, you'll be telling me that π ≠ 3. – Scott – 2014-07-29T20:21:52.603

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 – 2014-07-29T21:25:33.697

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 – 2014-07-29T21:37:32.380

9This xkcd will clear things up – Nick T – 2014-07-30T04:02:08.583

2Since 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 – 2014-07-30T15:16:19.180

1What Floris said. It turns out that for most purposes, 1024 == 1000. – Russell Borogove – 2014-07-30T17:41:12.777

Answers

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

Posted 2014-07-29T18:39:07.887

Reputation: 58 310

6Google always knows.. :-) – Nate – 2014-07-29T18:55:38.823

4To clarify, these are pronounced gibibytes and mebibytes respectively. The base-ten version is pronounced gigabytes and megabytes respectively. – user530873 – 2014-07-29T22:59:00.897

4The base-ten version is pronounced metric gigabytes and metric megabytes respectively. – Mark – 2014-07-30T10:57:48.930

1Why 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. – 2014-07-30T12:50:20.940

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 – 2014-07-30T13:48:02.953

@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 – 2014-07-30T13:50:30.753

@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 – 2014-07-30T14:54:54.060

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. – 2014-07-30T17:53:23.233

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.

Justin Krejcha

Posted 2014-07-29T18:39:07.887

Reputation: 1 923

1That'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 **********" – None – 2014-07-29T23:05:54.190

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 – 2014-07-30T05:05:43.097

2I'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 – 2014-07-30T05:13:32.043

@trlkly I agree with everything you said. Not many people I know even have heard of a 'kebibyte'. – Justin Krejcha – 2014-07-30T05:14:30.990

@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 – 2014-07-30T07:31:10.257

@Luaan That's covered in the answer. There are two sets of contradictory standards. – Justin Krejcha – 2014-07-30T18:21:26.173

1The 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 – 2014-07-30T18:48:34.670

@DavidSchwartz Good point. I'll add that in to my answer. – Justin Krejcha – 2014-07-30T18:49:07.610