News for hackers. Stuff that matters.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by jl6 on Friday February 26, 2021 @04:44PM (#26280195)
Correctly.

1MB is one million bytes, and files do not intrinsically come in power-of-two sizes.

It may still make sense to use MiB for RAM though.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Friday February 26, 2021 @05:26PM (#26280595)
Files may not, but file-systems do.

All else being equal, I see it as better to under-promise and over-deliver than the reverse:

In a world where there was one commonly-accepted meaning for MB (ie, the world where computers were invented, proliferated and became ubiquitous), and one assumed meaning (however logical it may be), users without the requisite nugget of binary knowledge would be positioned to be pleasantly surprised that they had "more than they paid for". In the case of file-sizes, this is to that users detriment, but in the case of the potentially more litigious issue of amount of drive space or RAM being purchased, this is to the users advantage.

For those that simply knew, on the other hand, things were just as expected.

Conversely, in the world where we now have two justifiable hard meanings for MB (one historical, one "canonical"), and people who go about endlessly correcting each other about them, we have handed the "things are as expected" situation to the everyday users, while the rest have inherited a mix of "less than I paid for" and "confusion".

All-up, not a worthwhile trade IMO.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by soneil on Friday February 26, 2021 @05:38PM (#26280691)
There was never one commonly accepted meaning for a MB. Storage has always been base10. Linespeed has always been base10. RAM is native to a matrix, and lazy programmers like to pretend that means everything is.

The first commercial drive, the IBM 305, stored 100,000 characters on each of 50 platters, for 5 million total characters. Drives have been a base10 number of sectors for my entire lifetime.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Friday February 26, 2021 @06:32PM (#26281104)
> There was never one commonly accepted meaning for a MB.

If that was correct, this HN post wouldn't exist.

For the 50 years preceding Apple's intervention, any example that can be produced of MB equalling 1,000,000 bytes, likely has about one MiB-worth of counter-examples showing it equalling 1,048,576 bytes.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by pseudalopex on Friday February 26, 2021 @07:55PM (#26281657)
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Saturday February 27, 2021 @04:31PM (#26288361)
This wikipedia article quoting a standard formalised in the late 90's, and only beginning to gain adoption from that point on, largely supports my statement.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by pseudalopex on Sunday February 28, 2021 @12:24AM (#26290910)
The Wikipedia article lists things that always used the base 10 definition. It has examples of disks from the 1970s. And it mentions a 3rd definition of megabyte used since the 1980s.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by coldtea on Saturday February 27, 2021 @02:07AM (#26283274)
>For the 50 years preceding Apple's intervention, any example that can be produced of MB equalling 1,000,000 bytes, likely has about one MiB-worth of counter-examples showing it equalling 1,048,576 bytes.

You'd be surprised...

M has been the accepted prefix for 1,000,000 since the 19th century, widely used in science, networking standards and disks, decades before Apple made any change itself...

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Saturday February 27, 2021 @06:28AM (#26284150)
The "highest selling single computer model" of all time was not called the Commodore 65.536, it was called the Commodore 64.

As was the common convention, all advertising materials, all reviews, all documentation and all common understanding was that the 64 in its title represented 64KB as in Kilobytes.

This same convention, for MB = Megabytes, and GB = Gigabytes and all of these representing powers of 2 (no matter how "incorrect" that may be), was proliferated through the overwhelming majority of advertising, commentary and documentation both previously through the 70's, and through the 80's, 90's and 2000's.

This was the convention commonly understood for the many-decades-long duration of the birth of modern computing.

To attempt to change it after decades of intrenchment for the "technically correct" version and gain loads of confusion, and almost nothing in return, is a bad value proposition.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by soneil on Saturday February 27, 2021 @01:02PM (#26286691)
I've never disputed that this was the convention for RAM. But it never has been for harddrives.

To borrow your C64 example, the most popular harddrives to add to a C64 were Lt.Kernal(Fiscal) drives. The first model, sold as 10MB, was 256 bytes per sector, 32 sectors per track, for 1224 tracks. Giving us a raw capacity of 10,027,008 bytes - 10MB or 9.5MiB.

You're talking about it being a convention in home computers when the vast, vast majority of them simply didn't have harddrives - While the machines that did have harddrives were already using base10 (an RK05 was 1.2Mwords - 1,200,000 words. Twice the RK04's 600kwords).

The convention has always been base2 for RAM and base10 for storage. And yes, it's always caused confusion. Just as the convention has always been bits/sec instead of bytes/sec for linespeed, even though this also causes confusion to this day.

The awkward truth is that none of this was ever intended to be consistent. From the day we started selling computers to people who weren't 100% sure what these numbers meant, it's always been "close enough".

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Saturday February 27, 2021 @04:12PM (#26288221)
Exactly.

If we may now agree that the original, widespread understanding of a KB was of 1024 bytes, and a MB of 1024 KB, and that only later did a widespread impression start to be spread that actually a KB|MB could be 1000 instead, we strike at the very heart of this issue:

Adopting an alternative "standard" spearheaded by particular (and not all) storage manufacturers incentivised in the first instance to use the previously well-established terms KB and MB duplicitously in their favour, strikes me as the worst way to resolve any consumer confusion surrounding it.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by coldtea on Saturday February 27, 2021 @11:25AM (#26285820)
>This was the convention commonly understood for the many-decades-long duration of the birth of modern computing.

As countless others already wrote here, that (and all your examples) where the case (and remain the case) for memory.

Disks, network, etc, have used the powers of ten since forever...

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Saturday February 27, 2021 @04:39PM (#26288414)
Disks are memory, and many floppy disk manufacturers for example seemed perfectly capable of following the long-established convention for memory without (much) issue.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by coldtea on Saturday February 27, 2021 @11:36PM (#26290710)
Which is neither here, nor there.

Hard disks are not floppy disks or memory, they always used base10 since half a millenium, and Apple just continues the same, like everybody else.

End of non story.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by Aerroon on Saturday February 27, 2021 @04:32AM (#26283709)
>M has been the accepted prefix for 1,000,000 since the 19th century

Except when it, of course, isn't. $10M is certainly not ten megadollars.

Even science isn't that consistent about it. The SI base unit for mass is the kilogram. Yet we don't have megakilograms. We have megagrams, but nobody uses them. Instead we use tons. Somehow kilotons and megatons are used though.

If we're willing to accept the above then why couldn't we have stuck with the powers of 2? Digital information at some level is going to become base 2.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by soneil on Saturday February 27, 2021 @02:37PM (#26287503)
> The SI base unit for mass is the kilogram.

This reminds me of something I was unaware of until very recently; the decibel (dB), is one tenth of a Bel. The discussion was that you'll never confuse a B(byte) with a B(bel) because we never specify 10dB as 1B, and we almost never need to specify a 10th of a byte.

But back to your point - we use base10 for everything but RAM. So if we'd stuck to one system to avoid confusion, RAM probably wouldn't have won.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by rualca on Saturday February 27, 2021 @11:03AM (#26285657)
> Except when it, of course, isn't. $10M is certainly not ten megadollars.

The unit of currency is the dollar. There is no units of currency that corresponds to 1M dollars.

The SI system of units devised a systematic way to define derived units that reflect a certain amount expressed in the base unit.

Currency don't have the benefit.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by coldtea on Saturday February 27, 2021 @06:02AM (#26284022)
>$10M is certainly not ten megadollars.

Money is not covered by S.I./metric units anyway, so not sure what's the point of this argument.

And even at that, while M here is the "mega" unit, the value 10M is still 10 million (1010^6) dollars (not 102^20 dollars).

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by turbopony on Saturday February 27, 2021 @07:41AM (#26284485)
That's a good point. We might have to start saying megadollars.

M$10 looks kind of clumsy, though.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by stkdump on Saturday February 27, 2021 @03:15AM (#26283461)
Nobody over-promises (or under-promises for that matter) when the meaning of units and prefixes are clear.

Division by powers of 1000 ceased to be an expensive operation relative to user interaction a very very long time ago. And even back when it was, I am sure would the error have been in the order of 10% (as it is now with TB vs TiB), they absolutely would have taken the more expensive but more correct operation.

I just see no advantage in continuing to resist the unification of the meaning of prefixes. And where people prefer the old way for some nostalgic reason, just put the 'i' in there and you are good.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Saturday February 27, 2021 @06:53AM (#26284258)
This makes sense when dealing with intrinsic units that also follow the base10 pattern.

Bytes do not. Bytes are made up of 8 bits, and bits are powers of 2. Neither of these facts have any relation to base10.

There is inevitable shoe-horning happening on either side of the argument.

If a new metric was to be introduced to provide for those who wish for "everything to be neat and tidy, excepting for the base unit", they should be the ones using a new term, while the rest of everyone continues using the incumbent one.

Overriding the commonly-accepted and widely-used term with a secondary meaning is a sub-optimum solution.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by pseudalopex on Sunday February 28, 2021 @12:08AM (#26290845)
8 bits is just a convention. 6 and 9 bit bytes were common until the 1980s. Standards still say octet or specify 8 bit bytes.

ISO and IEC standards defined a byte as 8 bits in the 1990s. But they also defined kilo and mega as powers of 10.

Powers of 2 were never used exclusively.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Sunday February 28, 2021 @06:19AM (#26292553)
Powers of 2 remain fundamental to bits regardless of how many bits are grouped together.

I've only made the correct claim that the logical continuance the employment of powers of 2 into units of scale was sufficiently widespread as to be considered convention, something those who created the standards you cite also readily acknowledge.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by rualca on Saturday February 27, 2021 @11:07AM (#26285689)
> Nobody over-promises (or under-promises for that matter) when the meaning of units and prefixes are clear.

This sounds like a lame excuse for fraud.

Megabytes had a very specific meaning. Afterwards, for any random reason, that definition was turned upside down to mean about 5% less, and a terabyte to mean 10% less.

If you're going to buy a HD and you end up finding out it provides 100MB or 200MB less than advertised, you'd righteously feel defrauded.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by colejohnson66 on Saturday February 27, 2021 @03:59PM (#26288108)
That’s on you for not knowing hard drive manufacturers have always measured in base 10, not base 2. I have a 1 TB drive with 931 GiB of capacity. That due to Windows using base 2, not because I was “defrauded”.

That SD card you have? Base 10. Flash drive? Base 10. Hard drive? Base 10. SSD? Base 10. The only outlier here is RAM being base 2, but that’s because it’s in a grid, so 16 GB is easier to write than 17.18 GB.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Saturday February 27, 2021 @04:45PM (#26288461)
Except that all of these things are "memory", and an interim technology called Floppy Disks used base2, or in some cases at least were base2ish (some were 1000 x 1024).

I remember quite clearly at the time HDD's first started proliferating that many (intelligent) people were legitimately fooled and felt cheated.

In fact I wouldn't be at all surprised if there were lawsuits about it.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by stkdump on Sunday February 28, 2021 @02:38AM (#26291461)
All the more reason to standardize on what we use literally everywhere else.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Sunday February 28, 2021 @06:25AM (#26292578)
Nothing against standardisation.

But like many things on this earth, sometimes the less logical and more confusing is what ends up being the accepted norm.

Why metric and imperial? Makes no sense, is confusing.

Why left side right side driving? Makes no sense, is confusing, causes accidents.

Bits and bytes had a standard, it was widespread, understood, logical and useful for those who most had to deal with them. Then one group went out, very likely seeing dollar signs, and decided to be different. They should be the ones adopting the incumbent, logical standard, not the rest of us adopting their less-useful new one, and definitely not ending up with two conflicting standards with a single lowercase letter separating them.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by stkdump on Monday March 01, 2021 @04:57AM (#26301195)
The logical standard are SI prefixes. Do you proprose that a milligram should become 1/1024th of a gram instead?
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Monday March 01, 2021 @05:38AM (#26301436)
That would be completely inconsistent with what I've stated about why standards are desirable. So, we evidently agree on that.

It is not logical to apply the same standard uniformly to everything regardless of its inherent characteristics. It's also not always the best course of action to blindly apply any rule without making exceptions. Bits and bytes already and inherently do not fit into a base10 paradigm, but a base2 paradigm.

Making an exception for the application of scale measurements for those units makes sense and worked perfectly fine, for decades. Confusion was created by those adopting a different standard, for dubious reasons.

The issue of consumer ignorance, which was largely created by storage manufacturers and later now embedded by Apple could have been easily and simply resolved with a tiny bit of education.

Indeed, at least through the 80's it often was.

It's actually not that hard for people to remember one four digit number to multiply or divide by, after they've had an explanation of why that's important and make sense. Building this into the UI along with explanation is also not difficult. Exactly the same as many other important things that are prone to being misunderstood are explained.

Everyone would be better off for it.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by stkdump on Monday March 01, 2021 @08:02AM (#26302353)
> an explanation of why that's important

There is just none

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Monday March 01, 2021 @09:57AM (#26303322)
In computer memory, why is 1 Kilobyte equal to 1,024 bytes and not 1,000 bytes?

In the standard metric system, Kilo / K = 1,000 units of something, Mega / M = 1,000,000 units of something (and down in scale also by dividing by 1,000). This applies for anything where the standard singular unit is 1, and assumes it can also be multiplied by, or divided into 1,000 pieces. For example: 1 gram equals 1,000 milligrams.

A computer however, does not have one base unit, but two: the bit and the byte. Neither are usefully divisible by 1,000. Conversely, multiplying the byte by 1,000 hides aspects of its structure that are essential to consider when building and programming a computer system. Considering that the metric system is about notating scale, and that there are issues in both directions of scale when applying the metric system to computers, it made sense to modify it slightly when doing so.

Luckily, there is a number very close to 1,000 that does usefully represent the inconvenient internal structure of a bit and a byte, at least at larger scales. That number is 1,024. Early computer scientists decided that for computers, Kilo / K = 1,024 bytes. It followed that Mega / M was 1,024 x 1,024 = 1,048,576 bytes, and so on. (1 GB = 1,024 x 1,024 x 1,024 = 1,073,741,824 bytes, or close to 1 billion bytes).

This "1,024 rule" for the computer application of metric system, matches the physical structure of computer memory exactly - and crucially, the parts of a computer that physically access memory - making it straightforward for programmers and hardware designers to work with and talk about.

---

And, from an alternate 1990's addendum to the previous:

It also means that when you see a Hard Drive advertised with a size of 240 MB, you can be sure that you are in fact getting 240 x 1,048,576 bytes of storage, or 251,658,240 bytes (well over 251 million bytes). That 251 million is, on appearance, quite a bit "more" than 240 MB is one of the bonuses of the "1,024 rule" for the computer metric system that can impact you directly. You're welcome!

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by stkdump on Monday March 01, 2021 @10:28AM (#26303623)
I don't see any 'problem' caused by the fact that we nowadays standardized on SI prefixes. In the olden days, you would get inaccuracies like the so called 1.44 'MB' floppy disk (which wasn't very floppy, either) by the insistence on the illogical dual meaning of the prefixes.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by argvargc on Monday March 01, 2021 @11:25AM (#26304377)
Exactly. It was, and is illogical to have a dual meaning.

Sticking with the first, widely-proliferated meaning we already had, which existed because of its usefulness, along with its direct honouring of the structure of what it was describing, is IMO the superior choice. This versus cementing the source of the confusion - the secondary meaning - even further by introducing it not only as an additional standard, but also as the de facto, nullifying years of text and understanding and rendering it inaccurate.

To me, that was, and is absolute madness.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by stkdump on Monday March 01, 2021 @01:19PM (#26306031)
There is no use in this obfuscation.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by Wowfunhappy on Friday February 26, 2021 @11:04PM (#26282469)
> All else being equal, I see it as better to under-promise and over-deliver than the reverse:

But "over-promise" could mean multiple things. If I'm buying a hard drive "over promise" means larger. If I'm figuring out how much space a game will take up on my hard drive before I buy it, "over promise" means smaller.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by pseudalopex on Friday February 26, 2021 @06:46PM (#26281202)
File systems don't come in power of 2 sizes. They come in arbitrary numbers of blocks. Most storage devices have a power of 2 block size. But not all.[1]

[1] https://en.wikipedia.org/wiki/Data_Integrity_Field

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by Wowfunhappy on Friday February 26, 2021 @10:45PM (#26282407)
Says who?

Okay, that question actually has an answer: the IEC. Unfortunately, lots of software disagrees with them, including Windows, because for some strange reason the IEC thought it was a good idea to redefine an existing measurement and then add a new term to mean what the old term used to mean.

The result was 100% predictable. Files now have two different sizes depending on which software you're using, and it's very difficult to tell which definition is in use. Even worse, the difference between these measurements is quite large, and converting between them isn't simple.

As much as I wish the United States used the metric system, I don't think we should redefine an inch to equal two centimeters...

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by coldtea on Saturday February 27, 2021 @02:04AM (#26283264)
>Says who? Okay, that question actually has an answer: the IEC

Well, also the S.I?

Preffix "mega", initial "M", short for 10^6 since 1873...

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by pseudalopex on Friday February 26, 2021 @10:49PM (#26282418)
MB never consistently meant MiB.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by dkjaudyeqooe on Friday February 26, 2021 @10:54PM (#26282434)
Since when? It was defined as such originally and stood for decades without much controversy until computers became more mainstream and self-interested parties started changing the meaning.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by lokar on Friday February 26, 2021 @11:13PM (#26282514)
Disk and networking hardware manufacturers have used base 10 for ages.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by pseudalopex on Friday February 26, 2021 @11:56PM (#26282745)
Including Ethernet in the 1980s. And disks in the 1970s.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by coldtea on Saturday February 27, 2021 @02:05AM (#26283270)
>It was defined as such originally and stood for decades without much controversy until computers became more mainstream

M (as in MB) has meant 10^6 (1,000,000) in the S.I / metric standard since the 19th century...

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by Wowfunhappy on Friday February 26, 2021 @10:56PM (#26282437)
In e.g. 1985 were there really people measuring a kilobyte as 1000 bytes? I know floppy disk capacities used base-2 measurements...
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by pseudalopex on Friday February 26, 2021 @11:13PM (#26282516)
Bus and line speeds always used powers of 10. Different disk formats used different conventions.[1][2]

[1] https://en.wikipedia.org/wiki/Kilobyte#Examples

[2] https://en.wikipedia.org/wiki/Megabyte#Definitions

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by dataflow on Saturday February 27, 2021 @12:33AM (#26282918)
Floppy disks were a mix of bases 2 and 10.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by varjag on Friday February 26, 2021 @05:08PM (#26280442)
It may make sense for SI to stick to physical units business.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by SAI_Peregrinus on Friday February 26, 2021 @07:50PM (#26281626)
And there's already a unit for "amount of substance": the mole (symbol mol). 6.02214076e23 bytes is rather more than one encounters every day, but prefixes can handle that. A zeptomol of data is 602.221476 bytes, an obviously convenient number for indivisible amounts of data.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by kube-system on Friday February 26, 2021 @05:42PM (#26280732)
Maybe they tried to, but nobody could agree on a time to do it. :D
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by techrat on Saturday February 27, 2021 @04:39AM (#26283738)
>1MB is one million bytes, and files do not intrinsically come in power-of-two sizes.

Given the foundation of computing is binary, yes, files actually do come in power of two sizes.

1 and 0. Two. Base two.

From then, the way our bits, then bytes are structured.

8 bits to a byte for 8 bit addressing.

That's why 1KB was always 1,024 bytes.

Base 2: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024.

Recognize some of those numbers? Common ram sizes, also the increments in how many bits our architectures have been. These numbers remained constant because the foundation of computing was always Base 2.

Using Base 10 to calculate total storage space is a cheat when sector sizes are Base 2. There's no reason to use a different system (Base 10) for storage if Ram is Base 2 unless you're trying to inflate the specs of how much storage is being sold with a system.

Which is how the 1 MB = 1,000,000 Bytes bullshit originally started.

Until you re-format storage and ram sector sizes to be Base 10, and along with it, the number of bits of addressing our computing system uses, (Hello brand new architecture!) then there's no way to justify the renumbering of storage to Base 10.

Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by bluejekyll on Friday February 26, 2021 @05:28PM (#26280613)
Additionally, file systems allocate in blocks, so the actual amount of storage is based on number of blocks and isn’t just offsets of bytes.
Re:Mac finder uses 1,000,000 bytes instead of 1,048,576 byte... by kerng on Friday February 26, 2021 @10:40PM (#26282386)
Not really, in information technology megabyte often is calculated via (convenient) binary multiples, as has been for many decades.

As often in life there is not a single truth.