4 ms·
I know about 1 KB = 1024 bytes, sometimes. I'm a computer nerd, grew up playing on computers and hacking on them, and I'm a programmer now. But, if someone ask
by Buttons840 2y ago
I know about 1 KB = 1024 bytes, sometimes. I'm a computer nerd, grew up playing on computers and hacking on them, and I'm a programmer now.
But, if someone asks me for a good explanation why 1 KB != 1000 bytes, I don't have a good answer. I know about powers of 2, but why are powers of 2 more important than "kilo" meaning 1000 like it does in every other context?
It's like if a kilometer wasn't 1000 meters, because of the way car odometers worked, or the shape of the tires or something. Why would technical details about a car change the meaning of "kilometer"?
- wizzwizz4 2y agoAddressing, at some point, always ends up with physical wires representing bits, so chips are manufactured with power-of-two sizes. It's like asking why we measure crude oil in barrels.
- Buttons840 2y agoYes. I know. I've taken an architecture course in university, and I've completed the nand2tetris course and have conceptually build a computer from nand gates up. I ask again: > why are powers of 2 more important than "kilo" meaning 1000 like it does in every other context?
- wizzwizz4 2y agoWhy are oil barrels more important than the SI units of volume we use in every other context?
- saagarjha 2y ago[Insert American flag emoji here]
- Buttons840 2y agoI thought we were taking about SI units, their general meaning, and the technical details of computers. Barrels seem completely unrelated to those things, being neither a SI unit, nor having to do with computers. Like a lot of arguments, we're arguing over the definition of a word here ("kilobyte"), nothing more. I'm asking why technical details about a computer are so important they can override the generally understood (and well defined) meaning of that word.
- robxorb 2y ago> I'm asking why technical details about a computer are so important they can override the generally understood (and well defined) meaning of that word. Because the technical details about a computer are important when describing its technical characteristics. In short, context matters, and we adapt the meaning of words by the context they're used in all the time. It's ordinary. In fact, it's so ordinary in this particular case, that all we humans did it for decades, before a weird group not representing the existing organic consensus came along and decided the terms absolutely must be changed, and presented us with extremely silly-sounding ones to replace the existing ones, that of course few adopted, leading to the situation we have today where the existing terms are used interchangably to mean both things, and there is now a greater ambiguity around them than existed before. It wasn't perfect before, but the "solution" made it worse. Therefore, it sucks in practice at meeting its goal, no matter how much sense it may make to the minority that thinks "gibibyte" is something anyone would ever want to say in public, other than in a funny voice to a dog or a baby.
- BHSPitMonkey 2y agoIn this analogy, it would be more like if "barrel" was a standardized unit of volume that everyone understood and used, but then in the oil industry specifically they used a slightly different volume and still just referred to it as a "barrel" because it's what they're used to. And, whenever pressed for clarification, the oil people admitted "yes, technically our unit should be noted as 'oil barrels' which are different from the normal kind, but we like to just say 'barrels' because it's easier".
- Izkata 2y agoReal-world example: What weighs more, a pound of feathers or a pound of gold? Reflexive answer: gold (well obviously gold is heavier than feathers) Logical answer: neither (1 pound = 1 pound) Actual trick answer: feathers (precious metals used troy weights instead of the one just about everything else used, and 1 pound in the troy system weighs less than 1 pound in the other one) https://en.wikipedia.org/wiki/Troy_weight https://en.wikipedia.org/wiki/Troy_weight
- wizzwizz4 2y agoThat is indeed why I made the analogy. https://news.ycombinator.com/item?id=40956618 https://news.ycombinator.com/item?id=40956618
- tsimionescu 2y agoIt's not that powers of 2 are more important. It's that there will never be, for example, a RAM chip that has 32GB of RAM. They will have 34.36GB, which is an ugly number. But, they happen to have a very nice, round number of bytes if you look at them otherwise - they have 32GiB. And since these two numbers are pretty close, and the clean power of two one is far more natural for humans than the SI one in this context, it was natural to just call it GB.
- Buttons840 2y agoDoes that hold up in practice though? Last I checked my USB drives and RAM bytes were not perfect powers of 2. One clear example that comes to mind is my GPU with approximately 12 GB of RAM. That's no power of 2. These numbers being a power of two seems pretty important, important enough that we redefine words to match powers of 2. Then, when we look at the exact number of bytes, it's not a power of 2.
- Dylan16807 2y agoFlash gets fussier especially when there are reserved sections. But come on, are you really saying that 1100 0000000000 0000000000 0000000000 bytes of RAM isn't close enough to being a power of two to prove the same point?
- Buttons840 2y ago"Close enough" isn't good enough apparently. Our starting point is that a kilobyte is 1000 bytes, but then people say "that's not close enough to 1024, which is a power of 2", and so we redefine the word "kilobyte" to mean 1024, etc. Then I buy a device with a gigabyte and it doesn't have 1,000,000,000 bytes, and it doesn't have exactly 1,073,741,824 (2^30) bytes either, it has some other random number. So we started with Système International units and a common understanding of what they mean. Computer people said, "that's not close enough, let's redefine standardized words so they will be exact", and then they use those redefined words in an inexact way. And for the sane normie people, a kilobyte is still 1000 bytes.
- fragmede 2y agoThat's actually a better point than you realize because crude oil is another special case! Typically, the steel drum barrel that we're all familiar with is a 55-gallon (208L) drum, except that crude oil barrels are 47 gallons (159 L). So clearly the right thing to do here to clear up any confusion is to introduce the concept of computer-sized bytes, and metric bytes. Metric bytes would be 0.9765625 of a regular computer byte, so 1000 MB would be 1000 Metric Bytes, or 1024 * 0.9765625 = 1024 Bytes. Thus hard drives could be rated at 1,000 GMB, for 1,000 giga metric bytes, which would really be a 1 TMB drive or 1 tera metric bytes, which is the same as 1024 giga regular-computer-sized-bytes, or 1024 GRCSB. Totally straightforwards and not confusing to anybody.
- immibis 2y agoThey don't have to be.
- akira2501 2y agoAt one point in history some machines used BCD, even for addressing, and there are magnetic core memory assemblies which have power of 10 sizes.
- mythhabit 2y agoBecause everything (except SSDs now a days) in a computer, on a fundamental level is either 0 or 1. So when you want something that maps to that, 2 to the power of 10 is exactly 1024 bits. Somewhere along the line, someone decided that accuracy of that mapping was more important than adherence to the exact meaning of kilo. The alternative, would have been to use something else than kilo, mega ect., that represented the base 2 magnitudes. It would be awkward to say you have 8.306.688 bytes of ram if you need to be exact.
- teaearlgraycold 2y agoWe have that alternative. KiB, MiB, etc.
- mythhabit 2y agoWe have that now. We did not for the formative years of the field.