How many bytes in a megabyte?

Started by
84 comments, last by superpig 20 years, 8 months ago
Is it 1000000 (1000*1000) or 1048576 (1024*1024)? Or rather, if I wanted to allocate blocks of around 1mb each, which size should I use? I guess OS memory managers might prefer one over the other... Superpig - saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Advertisement
The second - there are 1024 bytes in a kilobyte, and 1024 kilobytes to a megabyte. So (1024*1024), in short.
OK, thanks. I thought the first was too neat to be right.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

And you''re writing articles? hahah
Anyway :

K = 2^10
M = 2^20
G = 2^30
T = 2^40

etc...
Not since 1998.

Since then, there have been 1000000 bytes in a megabyte and 1000 bytes in a kilobyte.
quote:Original post by dagarach
Not since 1998.

Since then, there have been 1000000 bytes in a megabyte and 1000 bytes in a kilobyte.


Yup, and 1024 meters in kilometer.
Nope:
1024 metres in a kibimetre.
1000 metres in a kilometre.
1024 bytes in a kibibyte.
1000 bytes in a kilobyte.
You''re the only one who cares about what that comission said about using Ki ;p
Then how come my computer's hard drive like everyone elses computes using a base 2 to multiple powers of ten to show hard drive space. How come when an adveriser says a hard drive at "80 Gigabytes" I notice it is closer to "75 Gigabytes"? Surely it is plain to see computers don't use base 10 computation and that the OP was correct in his assertion.

EDIT: I see your point Dagarach, you are correct also, its just that no one seems to fall in line with it.

Here is an excerpt from a website glossary:

kilo- (k-) [2]
in measuring the memory of a computer, the prefix kilo- often means 2^10 = 1024 instead of 1000. By a 1998 resolution of the International Electrotechnical Commission, the new prefix kibi- (Ki-) should replace kilo- for 2^10. However, this doesn't seem to be happening. ROOFLES!!




[edited by - nervo on August 6, 2003 7:18:12 AM]
Well, R2D22U2..
Quick Quiz! How many Meters in a Decameter?

This topic is closed to new replies.

Advertisement