this post was submitted on 27 Dec 2023
96 points (68.2% liked)

Technology

60080 readers
3358 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 2 years ago
MODERATORS
 

I often find myself explaining the same things in real life and online, so I recently started writing technical blog posts.

This one is about why it was a mistake to call 1024 bytes a kilobyte. It's about a 20min read so thank you very much in advance if you find the time to read it.

Feedback is very much welcome. Thank you.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago (2 children)

I was taught 1024 in my tech school. So I won’t ever refer to it as 1000 instead 1024. Not that it seems even remotely relevant though.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (3 children)

kilobyte (KB) is 1000, kibibyte (KiB) is 1024

at least according the the IEC, and id tend to go with them… SI units say that kilo means 1000

[–] [email protected] 18 points 1 year ago (2 children)

That was a retcon, though. Initially the SI prefixes were used and used 1024 instead of 1000. I feel like people started getting more fussy about it as hard drives started hitting hundreds of gb.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Initially the SI prefixes were used and used 1024 instead of 1000

Only CPUs and RAM use 1024. Floppy disks and hard drives going way back to the 1970's used 1000. In software, both are used depending on the context (and also obviously depending on the software). Most modern operating systems use 1024 for RAM and 1000 for file sizes (in the early days of computing, that agreed upon approach didn't exist, and it varied from one computer to the next).

@smokin_shinoby's tech school was shit. There has never been consistency on this issue and it's really sad that they failed to teach both numbering systems as they are (and always were) widely used.

[–] [email protected] 2 points 1 year ago

Fair on the floppy thing. I was too young to have worried about that.

[–] [email protected] -3 points 1 year ago (1 children)

How do you define a recon? We're kilograms 1024 grams, too? When did that change. It seems it's meant 1000 since metric was created in the 1700s, along with a binary prefix.

From the looks of it, software vendors were trying to recon the definition of "kilo" to be 1024.

[–] [email protected] 7 points 1 year ago (1 children)

Kilo was used outside of decimal power rules for data storage/memory because it could only use binary powers at smaller scales. Well, that's the standard we went with anyway.

They didn't 'retcon' the use of kilo as applicable to other units, they went with the closest power of two. When hard drive manufacturers decided to use power of tens it confused people and eventually got standardized by making kb power of ten and kib power of two.

From the looks of it you aren't familiar with the situation.

[–] [email protected] -2 points 1 year ago* (last edited 1 year ago) (2 children)

This is all explained in the post we're commenting on. The standard "kilo" prefix, from the metric system, predates modern computing and even the definition of a byte: 1700s vs 1900s. It seems very odd to make the argument that the older definition is the one trying to retcon.

The binary usage in software was and is common, but there's definitely more recent, and causes a lot of confusion because it doesn't match the older and bigger standard. Computers are very good at numbers, they never should have tried the hijack in existing prefix, especially when it was already defined by existing International standards. One might be able to argue that the US hadn't really adopted the metric system at the point of development, but the usage of 1000 to define the kilo, is clearly older than the usage of 1024 to define the kilobyte. The main new (last 100 years) thing here, is 1,024 bytes is a kibibyte.

Kibi is the recon. Not kilo.

[–] [email protected] 5 points 1 year ago (2 children)

Kilo meaning 1,000 inside computer science is the retcon.

Tell me, how much RAM do you have in your PC. 16 gig? 32 gig?

Surely you mean 17.18 gig? 34.36 gig?

[–] [email protected] 1 points 1 year ago

abhibeckert in this thread had a good point. Floppies used the power of ten prefixes, so it wasn't particularly consistent.

[–] [email protected] 0 points 1 year ago

209GB? That probably doesn't include all of the RAM: like in the SSD, GPU, NIC, and similar. Ironically, I'd probably approximate it to 200GB if that was the standard, but it isn't. It wouldn't be that much of a downgrade to go to 200GB from 192GiB. Is 192 and 209 that different? It's not much different from remembering the numbers for a 1.44MiB floppy, 1.5436Mbps T1 lines, or ~3.14159 pi approximation. Numbers generally end up getting weird: trying to keep it in binary prefixes doesn't really change that.

The definition of kilo being "1000" was standard before computer science existed. If they used it in a non-standard way: it may have been common or a decent approximation at the time, but not standard. Does that justify the situation today, where many vendors show both definitions on the same page, like buying a computer or a server? Does that justify the development time/confusion from people still not understanding the difference? Was it worth the PR reaction from Samsung, to: yet again, point out the difference?

It'd be one thing if this confusion had stopped years ago, and everyone understood the difference today, but we're not: and we're probably not going to get there. We have binary prefixes, it's long past time to use them when appropriate-- but even appropriate uses are far fewer than they appear: it's not like you have a practical 640KiB/2GiB limit per program anymore. Even in the cases you do: is it worth confusing millions/billions on consumer spec sheets?

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (2 children)

I'm not sure if you just didn't read or what. It seems like you understand the history but are insistent on awkward characterizations of the situation.

Kibi is the recon. Not kilo.

I mean kibi is the retcon because it made all previous software wrong.

They didn't modify the use of kilo for other units - they used it as an awkward approximation with bytes. No other units were harmed in the making of these units.

And they didn't hijack it - they used the closest approximation and it stuck. Nobody gave a fuck until they bought a 300gb hd with 277gb of free space.

[–] [email protected] 2 points 1 year ago (1 children)

To me, your attempt at defending it or calling it a retcon is an awkward characterization. Even in your last reply: now you're calling it an approximation. Dividing by 1024 is an approximation? Did computers have trouble dividing by 1000? Did it lead to a benefit of the 640KB/320KB memory split in the conventional memory model? Does it lead to a benefit today?

Somehow, every other computer measurement avoids this binary prefix problem. Some, like you, seem to try to defend it as the more practical choice compared to the "standard" choice every other unit uses (e.g: 1.536 Mbps T1 or "54" Mbps 802.11g).

The confusion this continues to cause does waste quite a bit of time and money today. Vendors continue to show both units on the same specs sheets (open up a page to buy a computer/server). News still reports differences as bloat. Customers still complain to customer support, which goes up to management, and down to project management and development. It'd be one thing if this didn't waste time or cause confusion, but we're still doing it today. It's long past time to move on.

The standard for "kilo" was 1000 centuries before computer science existed. Things that need binary units have an option to use, but its probably not needed: even in computer science. Trying to call kilo/kibi a retcon just seems to be trying to defend the use of the 1024 usage today: despite the fact that nearly nothing else (even in computers) uses the binary prefixes.

[–] [email protected] 2 points 1 year ago

I don't think it's more practical. I think it's what emerged from researchers trying to refer to concepts. I prefer the clarified prefixes.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Nobody gave a fuck until they bought a 300gb hd with 277gb of free space

The difference was a lot smaller when you were dealing with 700 byte files - it was often a rounding error. Also - you needed two sectors (1024 bytes at the time) two store your 700 byte file, so what did it matter anyway? If you want to get really specific, you actually needed three sectors - because there's metadata on the file... however the metadata will share space with other files so does that count?

Filesystems are incredibly complex and there's no way they can be explained to a lay person. Storage is and always has been an approximation.

It's even worse with RAM these days - my Mac has 298TB of memory address space currently allocated... but only between 6GB and 7GB of "app memory" in use (literally fluctuating between those two from one second to the next when I'm not even doing anything but watching the memory usage).

[–] [email protected] 2 points 1 year ago

Yeah, no, I'm sure I noticed it but I didn't really have the sophistication to get the implication.

Before we got our first Windows machine I had some DOS books. I remember a table in DOS for dummies talking about kilo/giga/petabytes and internalized it, but CDs were a thing by then.

[–] [email protected] 13 points 1 year ago* (last edited 1 year ago) (1 children)

That's a relatively recent change though. AFAIK KB=1024 and MB=1024^2 was more common. As the article mentions, it's still commonly used in some sectors:

https://www.jedec.org/standards-documents/dictionary/terms/mega-m-prefix-units-semiconductor-storage-capacity

If you ask someone in their twenties, they're going to say 1000. If you ask someone who's older, or someone who knows a lot about disk storage they're likely to say 1024. Hell, as the article mentions windows uses the 1024 definition, which is one of the rasons why drives always seem smaller than their advertised size. The box says 250 GB, but when you install it windows says it'll say it's less than that. It's not actually less than 250 GB. It's just that windows is using GiB/Gibibytes but calling them GB/Gigabytes.

TLDR: no wonder people are confused.

[–] [email protected] -4 points 1 year ago* (last edited 1 year ago)

Only recent in some computers: which used a non-standard definition. The kilo prefix has meant 1000 since at least 1795-- which predates just about any kilobyte.

[–] [email protected] 7 points 1 year ago (1 children)

I went to school before that took effect. But go ahead and downvote me for chiming in I guess.

[–] [email protected] 1 points 1 year ago (2 children)

i didn’t downvote you, and i went to school before a bunch of things but technology evolves and either we evolve with it or we end up being just straight up wrong in a modern context

[–] [email protected] -1 points 1 year ago

Thanks for the lesson I guess.

[–] [email protected] 1 points 1 year ago

Yes. When the standards were changed, and they where, the old world should have no longer been used. Setting the definition to something only makes things more confusing.