Bits 'n Bytes. Why 1 MB isn't equal to 1 million bytes

JoPalm

Senior member
Dec 29, 2000
843
0
0
Ok i get that there are 8 bits to a byte and a byte has 8 bits...but why doesn't 1 MB equal to 1 million bytes? (I have to do a presentation to a team and this so far is the only thing i'm stuck on lol).

Thanks!
 

imgod2u

Senior member
Sep 16, 2000
993
0
0
Computers store things in binary values. I.e. 1 or 0. When you have an exponential in binary (2^2, 2^3), it turns out differently than exponentials in decimal (10^2, 10^3). Storage is measured in exponentials of 2. A kilobyte would be 2^10 bytes. A megabyte would be 2^20 bytes. This is simply convention as far as I know although there may be some manufacturing advantages of using this scale. 2^10 is 1024.
 

RaynorWolfcastle

Diamond Member
Feb 8, 2001
8,968
16
81
The quick answer is that 1 MB is actually 2^10 (1024) KBytes which is actually 2^10 (1024) bytes, so 1 MByte = 1048576 bytes.
 

LeoMael

Member
Jul 16, 2002
102
0
0
Wasn't there someone who had a signature here that fits this situation perfectly? It went something like, "There are 10 types of people in this world, those who understand binary and those who don't." I can't remember who had it.
 

dexvx

Diamond Member
Feb 2, 2000
3,899
0
0
Originally posted by: RaynorWolfcastle

The quick answer is that 1 MB is actually 2^10 (1024) KBytes which is actually 2^10 (1024) bytes, so 1 MByte = 1048576 bytes.

No, thats the common misconception.

1MB (megabyte) = 1,000,000 bytes.
1MiB (mebibyte) = 2^20 bytes.

In computers, everything is measured in bytes, KiB, MiB, and GiB. Kibi is 2^10, Mebi is 2^20, and Gibi is 2^30. In essence, harddrive manufacturers are correct, memory manufacturers are wrong.
 

tweeve2002

Senior member
Sep 5, 2003
474
0
0
i dont think so, hard drive manufactures started a long time ago making 1KB is 1000bytes, 1MB is 1000KB, and for a while you wouldnt notice if you were missing a few bytes here or there, because the drives were so small. but the problem now days is that hard drives are so big that 1000MB does not equal 1GB in large hard drives any more. so when some one buys a 200GB hard drives thay are thinking thay are getting 1024MB*200 not 1000MB*200. This problem is only going to get worse. Unless we get rid of base 2, for counting memory or hard drive manufactors start using base 2 mathematics for their hard drives. I am going to hate to see what a 1TB drive look like in 1000MB it wont be a true 1TB :(
 

sunase

Senior member
Nov 28, 2002
551
0
0
It's not a misconception. It's the common usage. MiB is relatively new and doesn't immediately make everything that was used before wrong. Using "KB" instead of "kB" to distinguish between those two binary and metric prefixes, for example, is part of the old way and has been advocated as a standard by IEEE for practicaly forever. Since the byte is not a unit of the metric system the prefixes used with it, even when they do match metric ones in name, need not be the same value since the result can never be a metric unit anyway.
 

bluemax

Diamond Member
Apr 28, 2000
7,182
0
0
Originally posted by: RaynorWolfcastle
The quick answer is that 1 MB is actually 2^10 (1024) KBytes which is actually 2^10 (1024) bytes, so 1 MByte = 1048576 bytes.

 

buleyb

Golden Member
Aug 12, 2002
1,301
0
0
Originally posted by: dexvx
Originally posted by: RaynorWolfcastle

The quick answer is that 1 MB is actually 2^10 (1024) KBytes which is actually 2^10 (1024) bytes, so 1 MByte = 1048576 bytes.

No, thats the common misconception.

1MB (megabyte) = 1,000,000 bytes.
1MiB (mebibyte) = 2^20 bytes.

In computers, everything is measured in bytes, KiB, MiB, and GiB. Kibi is 2^10, Mebi is 2^20, and Gibi is 2^30. In essence, harddrive manufacturers are correct, memory manufacturers are wrong.


I though KiB was the prequel to MiB, and GiB was the Sequel...where is Will Smith to clarify this...
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: sunase
It's not a misconception. It's the common usage. MiB is relatively new and doesn't immediately make everything that was used before wrong. Using "KB" instead of "kB" to distinguish between those two binary and metric prefixes, for example, is part of the old way and has been advocated as a standard by IEEE for practicaly forever. Since the byte is not a unit of the metric system the prefixes used with it, even when they do match metric ones in name, need not be the same value since the result can never be a metric unit anyway.

I agree.
I don't care much about this mebi/gibi/whatever stuff.
To all the software, and all the people I work with, 1 MB == 1 KB == 1024 B and so forth.
 

thorin

Diamond Member
Oct 9, 1999
7,573
0
0
Originally posted by: Sunner
Originally posted by: sunase
It's not a misconception. It's the common usage. MiB is relatively new and doesn't immediately make everything that was used before wrong. Using "KB" instead of "kB" to distinguish between those two binary and metric prefixes, for example, is part of the old way and has been advocated as a standard by IEEE for practicaly forever. Since the byte is not a unit of the metric system the prefixes used with it, even when they do match metric ones in name, need not be the same value since the result can never be a metric unit anyway.

I agree.
I don't care much about this mebi/gibi/whatever stuff.
To all the software, and all the people I work with, 1 MB == 1 KB == 1024 B and so forth.
Sunner I think you made a typo..... Or uh ummmmmmm I hope I never have to work with the people you work with because that'd be really ummmmm confusing :p

Thorin

 

dullard

Elite Member
May 21, 2001
25,765
4,291
126
Originally posted by: dexvx
Originally posted by: RaynorWolfcastle

The quick answer is that 1 MB is actually 2^10 (1024) KBytes which is actually 2^10 (1024) bytes, so 1 MByte = 1048576 bytes.

No, thats the common misconception.

1MB (megabyte) = 1,000,000 bytes.
1MiB (mebibyte) = 2^20 bytes.

In computers, everything is measured in bytes, KiB, MiB, and GiB. Kibi is 2^10, Mebi is 2^20, and Gibi is 2^30. In essence, harddrive manufacturers are correct, memory manufacturers are wrong.
Technically dexvx is now correct. The prefixes kibi, Mebi, gibi, etc were designed to take care of this situation. Unfortunately they never caught on and people instead use kilo, mega, and giga incorrectly. That is why we get so many posts complaining that their HD isn't as big as advertized on the box...
 

Goi

Diamond Member
Oct 10, 1999
6,766
7
91
I've never seen mention of those terms in any computer science/computer engineering textbook I've read though. They're news to me.
 

thorin

Diamond Member
Oct 9, 1999
7,573
0
0
Originally posted by: Goi
I've never seen mention of those terms in any computer science/computer engineering textbook I've read though. They're news to me.
Same here.

Thorin
 

dullard

Elite Member
May 21, 2001
25,765
4,291
126
Originally posted by: Goi
I've never seen mention of those terms in any computer science/computer engineering textbook I've read though. They're news to me.
That is part of the problem. The people writing the textbooks were usually educated far before the kibi, mebi, and gibi prefixes were needed. So the authors have no clue that there has been an official designation of these new terms. But any up to date book, magazine, or website like Anandtech have the new terms.

Just a few years ago in the DOS days people really used bits, bytes, and kilobytes (which was then known to be 1000 bytes but convention used 1024 - but there is just a 2.4% difference). There was no definition of kibibyte since there didn't seem to be a need. Even a bit later when HDs reached the megabyte size, there still was no major difference between 1000*1000 and 1024*1024 (only a 4.9% difference), so again by convention people used mega for the latter when they knew it wasn't mathmatically correct. If you look carefully in Windows though, some programs will report file sizes as multiples of 1000 and others as multiples of 1024 - forshadowing a future problem (try adding up the file size of each file reported by Windows to the total file size used on the whole drive reported by Windows). But as soon as HDs reached the gigabyte size the difference got more and more significant. 1024^3 is 7.4% larger than 1000^3. A 7.4% error is too large to ignore anymore. So official designations were made in the computer science field. Unfortunately the old conventions stuck. Things will just get worse and worse over time if people don't switch to the new terms. 1024^4 is 10% larger than 1000^4.
 

dexvx

Diamond Member
Feb 2, 2000
3,899
0
0
Originally posted by: thorin
Originally posted by: Goi
I've never seen mention of those terms in any computer science/computer engineering textbook I've read though. They're news to me.
Same here.

Thorin

IIRC they are a mathematical term for 2^10*n where n = 1,2,3... prefix. Since it was developed after the split between comp-sci and mathematics, comp-sci is still draggings its arse around using the old metric system of 10^3*n where n = 1,2,3 prefixes.

Already there have been people trying to correct the problem. The latest version of bitTorrent uses the Mi/Ki/Gi prefxies.
 

dexvx

Diamond Member
Feb 2, 2000
3,899
0
0
Well since this is a double post, I might as well add that from now on, I'll refer to them when appropriate. The classical definition of Kilo, Mega, Giga do not hold and only get worse with very large numbers.
 

buleyb

Golden Member
Aug 12, 2002
1,301
0
0
Great, I can't wait until these get into the market place. As if USB , USB 2.0, USB 1.1, USB Hi-speed weren't confusing enough, now we'll have more terms to confuse the marketing.

So was the purpose of these new terms just to fix the use of 'kilo' as 1024 when it should denote 1000? Sounds like a logical fix, but its too damn late.

Now if we could get the rest of the world to ditch the stupid metric system, it wouldn't matter ;)
 

thorin

Diamond Member
Oct 9, 1999
7,573
0
0
Originally posted by: buleyb
Great, I can't wait until these get into the market place. As if USB , USB 2.0, USB 1.1, USB Hi-speed weren't confusing enough, now we'll have more terms to confuse the marketing.

So was the purpose of these new terms just to fix the use of 'kilo' as 1024 when it should denote 1000? Sounds like a logical fix, but its too damn late.

Now if we could get the rest of the world to ditch the stupid metric system, it wouldn't matter ;)
Ya because having units of measure that are based on random multiples the King's thumb, foot, and arm, etc.... are much much much better :p

Thorin
 

dullard

Elite Member
May 21, 2001
25,765
4,291
126
Originally posted by: thorin
Originally posted by: buleyb
Great, I can't wait until these get into the market place. As if USB , USB 2.0, USB 1.1, USB Hi-speed weren't confusing enough, now we'll have more terms to confuse the marketing.

So was the purpose of these new terms just to fix the use of 'kilo' as 1024 when it should denote 1000? Sounds like a logical fix, but its too damn late.

Now if we could get the rest of the world to ditch the stupid metric system, it wouldn't matter ;)
Ya because having units of measure that are based on random multiples the King's thumb, foot, and arm, etc.... are much much much better :p

Thorin
Metric system is pretty much better in all ways except for temperature. Fahrenheit is so much better than Celcius in my opinion. However, Throin, everthing is based on multiples of random things. The meter is now based on some strange multiple of an atomic wavelength. The kilogram is based on a random amount of material that was designated as a kilogram, etc.

Edit: sorry the meter has been redefined again (I was out of date). It is now based on the distance traveled by light in vacuum during 1/299,792,458 of a second. Still seems like 299,792,458 is a random number to me.