Jump to content
  • Advertisement
Sign in to follow this  
Gink

Size of KB and MB

This topic is 4779 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Where did this number come from? What calculation can you use to show the size of a KB and a MB

Share this post


Link to post
Share on other sites
Advertisement
why did they pick those numbers? I was looking for some type of binary calculations that explained why 1024

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Guest 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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!