Rationale

There are two ways to represent big numbers: You could either display them in multiples of 1000 = 10 3 (base 10) or 1024 = 2 10 (base 2). If you divide by 1000, you probably use the SI prefix names, if you divide by 1024, you probably use the IEC prefix names. The problem starts with dividing by 1024. Many applications use the SI prefix names for it and some use the IEC prefix names. The current situation is a mess. If you see SI prefix names you do not know whether the number is divided by 1000 or 1024. There is already a Brainstorm idea for it: Fix file size confusion.

Policy

Implementation

There are two ways to fix the abuse of the SI standard for base-2:

  1. Correct the application to divide by 1,000 and keep on using SI prefixes.
  2. Correct the application to keep on dividing by 1,024 but use the IEC prefixes.

Correct basis

Use base-10 for:

Use base-2 for:

For file sizes there are two possibilities:

  1. Show both, base-10 and base-2 (in this order). An example is the Linux kernel: "2930277168 512-byte hardware sectors: (1.50 TB/1.36 TiB)"
  2. Only show base-10, or give the user the opportunity to decide between base-10 and base-2 (the default must be base-10).

Exception

The application can keep their previous behavior for backwards compatibility if the following points apply. The application may add an option to display the sizes in base-10, too.

Some applications which fall under this rule are:

Use cases

Bug reports

Tag bugs that violate this policy with units-policy.

Additional notes

There is no third "standard" in the form of the O'Reilly Style Guide. It only specified abbreviations for 1,024 (K) and 1,000 (k), but not for 1,048,576 and 1,000,000 and so on.

Bugs in this policy

These devices are labelled in a way that this policy fails to account for:

References

General

Brainstorm ideas and blueprints

Other operating systems

Comments and suggestions

UnitsPolicy (last edited 2010-03-28 04:38:53 by 66-178-152-69)