Live data from Hacker News

1 kilobyte is precisely 1000 bytes?

waspdev.com

271–280 of 430 posts

Re: 1 kilobyte is precisely 1000 bytes?

#271

Earlier quoted context omitted.

It means that is fine for Kilo to mean 1024 in the context of computers and 1000 in the context of distances, because you're never going to be in a situation where that is ambiguous.

Except it's not because it's constantly ambiguous in computing. E.g. Macs measure file sizes in powers of 10 and call them KB, MB, GB. Windows measures file sizes in powers of 2 and calls them KB, MB, GB instead of KiB, MiB, GiB. Advertised hard drives come in powers of 10. Advertised memory chips come in powers of 2. When you've got a large amount of data or are allocating an amount of space, are you measuring its s…

> Macs measure file sizes in powers of 10 and call them KB, MB, GB.

That doesn't conform to SI. It should be written as kB mB gB. Ambiguity will only arise when speaking.

> Advertised hard drives come in powers of 10.

Mass storage (kB) has its own context at this point, distinct from networking (kb/s) and general computing (KB).

> When you've got a large amount of data or are allocating an amount of space, ...

You aren't speaking but are rather working in writing. kb, kB, Kb, and KB refer to four different unit bit counts and there is absolutely zero ambiguity. The only question that might arise (depending on who you ask) is how to properly verbalize them.

Re: 1 kilobyte is precisely 1000 bytes?

#272
post #266

Earlier quoted context omitted.

Literally every number in a computer is base-2, not just RAM addressing. Everything is ulimately bits, pins, and wires. The physical and logical interface between your oddly sized disk and your computer? Also some base-2.

Not everything is made from wires and transistors. And that's why these things are usually not measured in powers of 2: - magnetic media - optical media - radio waves - time There's good reasons for having power-of-2 sectors (they need to get loaded into RAM), but there's really no compelling reason to have a power-of-2 number of sectors. If you can fit 397 sectors, only putting in 256 is wasteful.

Since everything ultimately ends up inside a base-2 computer across base-2 bus that even if these media aren't subject to the same considerations it still makes sense to measure them that way.

The choice would be effectively arbitrary, the number of actual bits or bytes is the same regardless of the multiplier that you use. But since it's for a computer, it makes sense to use units that are comparable (e.g. RAM and HD).

Re: 1 kilobyte is precisely 1000 bytes?

#273
post #153

Earlier quoted context omitted.

This is the bit (sic) that drives me nuts. RAM had binary sizing for perfectly practical reasons. Nothing else did (until SSDs inherited RAM's architecture). We apply it to all the wrong things mostly because the first home computers had nothing but RAM, so binary sizing was the only explanation that was ever needed. And 50 years later we're sticking to that story.

Literally every number in a computer is base-2, not just RAM addressing. Everything is ulimately bits, pins, and wires. The physical and logical interface between your oddly sized disk and your computer? Also some base-2.

Even the disk sectors are in base 2. It's only the marketing that's in base 10.

Re: 1 kilobyte is precisely 1000 bytes?

#274
post #266

Earlier quoted context omitted.

Not everything is made from wires and transistors. And that's why these things are usually not measured in powers of 2: - magnetic media - optical media - radio waves - time There's good reasons for having power-of-2 sectors (they need to get loaded into RAM), but there's really no compelling reason to have a power-of-2 number of sectors. If you can fit 397 sectors, only putting in 256 is wasteful.

Since everything ultimately ends up inside a base-2 computer across base-2 bus that even if these media aren't subject to the same considerations it still makes sense to measure them that way. The choice would be effectively arbitrary, the number of actual bits or bytes is the same regardless of the multiplier that you use. But since it's for a computer, it makes sense to use units that are comparable (e.g. RAM and H…

Buses and networking fit best with base 10 bits (not bytes) per second for reasons that are hopefully obvious. But I agree with you that everything else naturally lends itself to base 2.

Re: 1 kilobyte is precisely 1000 bytes?

#275
post #46

Earlier quoted context omitted.

> I've never heard It doesn't matter. "kilo" means 1000. People are free to use it wrong if they wish.

All words are made up. They weren’t handed down from a deity, they were made up by humans to communicate ideas to other humans. “Kilo” can mean what we want in different contexts and it’s really no more or less correct as long as both parties understand and are consistent in their usage to each other.

Yes!

(And by that I mean "what the fuck, no...")

Re: 1 kilobyte is precisely 1000 bytes?

#276

Earlier quoted context omitted.

I don't think of base 10 being meaningful in binary computers. Indexing 1k needs 10 bits regardless if you wanted 1000 or 1024, and the base 10 leaves some awkward holes. In my mind base 10 only became relevant when disk drive manufacturers came up with disks with "weird" disk sizes (maybe they needed to reserve some space for internals, or it's just that the disk platters didn't like powers of two) and realised that…

Buy an SSD, and you can get both at the same time! That is to say, all the (high-end/“gamer”) consumer SSDs that I’ve checked use 10% overprovisioning and achieve that by exposing a given number of binary TB of physical flash (e.g. a “2TB” SSD will have 2×1024⁴ bytes’ worth of flash chips) as the same number of decimal TB of logical addresses (e.g. that same SSD will appear to the OS as 2×1000⁴ bytes of storage space…

you aren’t going to make non-binary-sized chips

TLC flash actually has a total number of bits that's a multiple of 3, but it and QLC are so unreliable that there's a significant amount of extra bits used for error correction and such.

SSDs haven't been real binary sizes since the early days of SLC flash which didn't need more than basic ECC. (I have an old 16MB USB drive, which actually has a user-accessible capacity of 16,777,216 bytes. The NAND flash itself actually stores 17,301,504 bytes.)

Re: 1 kilobyte is precisely 1000 bytes?

#277

There is a counterproductive obsession with powers of 10. Sometimes, other systems just make more sense. For example, for time, or angles, or bytes. There are properties of certain numbers (or bases) that make everything descending from them easier to deal with. for angles and time (and feet): https://en.wikipedia.org/wiki/Superior_highly_composite_numb... For other problems we use base 2, 3, 8, 16, or 10. Must we tr…

Agreed. Metric is stupid.

The ancient Sumerians used multiples of 60, as we continue to do for time and angles (which are related) today. It makes perfect sense. 60 is divisible by 2, 3, 4, 5, and 6, which makes it easy to use in calculations. Even the metric people are not so crazy as to propose replacing these with powers of 10.

Same with pounds, for example. A pound is 16 ounces, which can be divided 4 times without involving any fractions. Try that with metric.

Then there's temperature. Fahrenheit just works more naturally over the human-scale temperature range without involving fractions. Celsius kind of sucks by comparison.

Re: 1 kilobyte is precisely 1000 bytes?

#278
post #240

Earlier quoted context omitted.

"kilo" means what people take it to mean in any particular context. In computing, it is overwhelmingly power of two even today, and if you don't use it in this manner you have to clarify to be understood properly.

Sure. I assume the ship has sailed already and I certainly won't die on that hill to change the meaning again, but still the word "kilo" literally means 1000 and it would have been more consistent to use it like this and for 1024 use a (slightly) different word.

In this context it's a unit prefix, not a standalone word. SI specifies a widely adopted system that defines and then uses a set of prefixes in a consistent manner. But we aren't forced to use SI everywhere without reason.

Re: 1 kilobyte is precisely 1000 bytes?

#279

Earlier quoted context omitted.

Except it's not because it's constantly ambiguous in computing. E.g. Macs measure file sizes in powers of 10 and call them KB, MB, GB. Windows measures file sizes in powers of 2 and calls them KB, MB, GB instead of KiB, MiB, GiB. Advertised hard drives come in powers of 10. Advertised memory chips come in powers of 2. When you've got a large amount of data or are allocating an amount of space, are you measuring its s…

> Macs measure file sizes in powers of 10 and call them KB, MB, GB. That doesn't conform to SI. It should be written as kB mB gB. Ambiguity will only arise when speaking. > Advertised hard drives come in powers of 10. Mass storage (kB) has its own context at this point, distinct from networking (kb/s) and general computing (KB). > When you've got a large amount of data or are allocating an amount of space, ... You ar…

> That doesn't conform to SI. It should be written as kB mB gB

Little m is milli, big M is mega. Little g doesn’t exist, only big G.

Re: 1 kilobyte is precisely 1000 bytes?

#280
post #214

Earlier quoted context omitted.

Knuth is not in favour of using kilo/mega/etc with power-of-2 meanings: > I'm a big fan of binary numbers, but I have to admit that this convention flouts the widely accepted international standards for scientific prefixes. He also calls it “an important issue” and had written “1000 MB = 1 gigabyte (GB), 1000 GB = 1 terabyte (TB), 1000 TB = 1 petabyte (PB), 1000 PB = 1 exabyte (EB), 1000 EB = 1 zettabyte (ZB), 1000 Z…

It's odd though. Metric prefixes are always lower case, so GB isn't valid metric. Further, outside of storage manufacturers attempting to inflate their numbers when does is ever make sense to mix power of ten with 8 bit bytes? Networking is always in bits per second, not bytes. Edit: Disregard the metric bit but I think the rest still stands.

> Metric prefixes are always lower case, so GB isn't valid metric.

Ummm, what? https://en.wikipedia.org/wiki/Metric_prefix

Post reply on HN