In CPU-land this is done by manufacturers already - they manufacture many of the same generation of processor as the most performant version, and then test the individual items produced, disabling poorly constructed parts and downgrading the specification as they do it until they're left with a range of products at various performance points.
it was really frustrating back in the times, when your brand new 8GB android smartphone only had 1 GB of free space out of the box (The 8GB edition of the Sony Xperia M4 Aqua only had 1.25GB of space for the user !)
Nowadays, devices have larger memories. But an android with mandatory apps and 'necessary data', or a Windows 11 can take around 20GB away. It can't be neglected on low end systems. There are still devices with 32, 64 or 80GB out there ! (your redmis or galaxy A XX)
Since most smartphone manufacturers won't let you use another OS or a custom ROM, all of that space should be reserved for them, and not advertised to the customer ! It's the same for computers. Most users buy the computer with the Windows, and will never replace it.
The figure was 985g, not 958g, but that's what you seem to have used in your calculation anyway. (Amusingly, when I pulled out bc to test which way you computed it, I immediately made exactly the same typo.)
I'd imagine the trading standards would only check to about +/-0.5% (5g); whilst the flour on the bag's surface is probably around 1g for a kilo bag (1kg)?
I understand that 16GiB (16*2e30 bytes) chip is present (delivered to user), but some of it is broken and not available (industry standard). Therefore capacity is less than 16GiB. Also I believe that there is a threshold, that manufacturer is using to throw away chip that are too broken to be sold. Ok so far.
So proper declared capacity should be threshold value (minimum) or threshold to maximum value declared range. I understand that this proper capacity is not very nice round number.
Problem has past: Around 2000, manufacturers started using GB (10e9) instead of GiB (2e30) that gives them some margin (7%) for chip defects. Later margin was not enough, so they started using more misleading specs like this. It seems that margin is at least 10% nowadays instead of <7% in the past.
Personally, I would be satisfied with stated margin size (like 7%, 10%, 12% etc) to maximum capacity, f.e. "USB flash drive 16GB max capacity, at least 90% usable."
It actually started somewhere around 1995 -- with mechanical disk makers all choosing to advertise GB drives using the power of ten instead of the power of two, while maintaining the same labeling on the outer box.
And the reason was not to account for "chip defects" -- it allowed them to ship slightly less capacity, but print on the box a number that appeared larger to those who did not read the 4 point type fine print on the back.
For a 1kg bag of flour bought in the EU, that would be
- On average, you should get at least 1kg of flour
- No bag should be less than 985g
- Packaging does not count
For a USB stick, that would be
- On average, the actual capacity must be no less than what's advertised
- For a given product, the actual capacity must be no less than what's advertised, within a small margin
- Only usable capacity counts