Size of KB and MB

Started by
25 comments, last by Andrew Russell 18 years, 10 months ago
Where did this number come from? What calculation can you use to show the size of a KB and a MB
Advertisement
byte = 8 bits
KB = 1024 bytes
MB = 1024 KB
GB = 1024 MB

Beginner in Game Development?  Read here. And read here.

 

why did they pick those numbers? I was looking for some type of binary calculations that explained why 1024
2^10 == 1024 =~ 1000 (thus it is used as an approximate thousand, since powers of 2 are easier to work with in general in the hardware).
I belive that harddrive manufactors use the *real* meaning of K and M, Kilo=10^3 and Mega=10^6.

While it is more natural to approx. K to 2^10 and M to 2^20.

/skanatic
1024 is 2^10 (2 to the power of 10, that is).
The common steps in our life is x10 (think to km, kg, or hg, always x10 or x0.1) but these is simple with a base 10 nuemeric system. With the base 2 of computers, it happens that power of two nearest to a power of 10 is 1024 (2^10) and so they took this number as the common way to make higher orders size easier to understand.
I hope you undertood me, because I'm tired and I explained it very bad.
Quote:Original post by Anonymous Poster
I belive that harddrive manufactors use the *real* meaning of K and M, Kilo=10^3 and Mega=10^6.

While it is more natural to approx. K to 2^10 and M to 2^20.

/skanatic
True, although ironically what I see as one of the main reasons for using 1024 is that it's related to the size of a disk sector.

Hmm, that's the second annonymous poster I've seen today that attempts to be not-so-anonymous. Why not register? You've got nothing to lose!
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms
Although most computer people do not use it, kilo = 1,000 not 1,024 and mega = 1,000,000 not 1,048,576, etc. It's long been the standard. I.e., kilometer = 1,000 meters.

Check out this page for more details:
http://en.wikipedia.org/wiki/Binary_prefix

...after reading wikipedia...

So, 1,000,000 bytes is not a megabyte, it's a mebibyte! :)

[EDIT: Correction. This is wrong. I wrote it backwards by mistake. 1,000,000 bytes IS a megabyte, NOT a mebibyte.]


Some good parts concerning hard drive and floppy drive standards:

"Hard disk drive manufacturers state capacity in decimal units, so what is advertised as a "30 GB" hard drive will hold 30 × 10^9 bytes, roughly equal to 28×2^30 bytes (i.e. 28 GiB). This usage has a long engineering tradition, and was probably not influenced by marketing. It arose because nothing about the physical structure of the disk drives makes power-of-two capacities natural: the number of platters, tracks and sectors per track are all continuously variable (though the size of an individual sector is half a binary kilobyte)."

"Some disk storage measurements — such as floppy disks — use an even more confusing hybrid system. Disk media are accessed by the sector, not the individual byte. Sectors are intended for direct transfer to RAM, which comes in powers of two, so sector size itself is almost always a power of two. Sector size may range from 512 bytes (floppy disks) to 2048 bytes (DVDs). A thousand binary-"kilobyte" sectors creates a 1,024,000-byte "megabyte". Thus a "1.44 MB" floppy holds neither 1.44 × 2^20 bytes nor 1.44 × 10^6 bytes, but rather 1.44 × 1000 × 1024 bytes (approximately 1.406 MiB, or 1.475 MB)."

[Edited by - Matthew Doucette on June 14, 2005 10:14:47 PM]

Matthew Doucette, Xona Games

I used to create sprites on the commodore 64, the pixel locations worked like a grid starting at 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, it's all 2 to the power of X.
Quote:Original post by Matthew Doucette

So, 1,000,000 bytes is not a megabyte, it's a mebibyte! :)


Actually, I think it's not that way under the IEC standard prefixes.

1,048,576 bytes is not a megabyte, it's a mebibyte! :)
1,000,000 is the proper megabyte.



Boder's Website: Games and Guinea Pigs

This topic is closed to new replies.

Advertisement