[Python-ideas] SI scale factors in Python
Steven D'Aprano
steve at pearwood.info
Fri Aug 26 05:18:12 EDT 2016
On Thu, Aug 25, 2016 at 11:34:23PM -0400, Random832 wrote:
> On Thu, Aug 25, 2016, at 19:50, Steven D'Aprano wrote:
> > Historically, there are *three* different meanings for "MB", only one of
> > which is an official standard:
> >
> > http://physics.nist.gov/cuu/Units/binary.html
>
> The link doesn't work for me... is the third one the 1,024,000 bytes
> implicit in describing standard-formatted floppy disks as "1.44 MB"
> (they are actually 1440 bytes: 80 tracks, 2 sides, 18 512-byte sectors)
> or "1.2 MB" (15 sectors).
Quoting from the above document:
Historical context*
Once upon a time, computer professionals noticed that 2**10 was
very nearly equal to 1000 and started using the SI prefix "kilo"
to mean 1024. That worked well enough for a decade or two because
everybody who talked kilobytes knew that the term implied 1024
bytes. But, almost overnight a much more numerous "everybody"
bought computers, and the trade computer professionals needed to
talk to physicists and engineers and even to ordinary people,
most of whom know that a kilometer is 1000 meters and a kilogram
is 1000 grams.
Then data storage for gigabytes, and even terabytes, became
practical, and the storage devices were not constructed on binary
trees, which meant that, for many practical purposes, binary
arithmetic was less convenient than decimal arithmetic. The result
is that today "everybody" does not "know" what a megabyte is. When
discussing computer memory, most manufacturers use megabyte to mean
2**20 = 1 048 576 bytes, but the manufacturers of computer storage
devices usually use the term to mean 1 000 000 bytes. Some designers
of local area networks have used megabit per second to mean 1 048 576
bit/s, but all telecommunications engineers use it to mean 10**6
bit/s. And if two definitions of the megabyte are not enough, a third
megabyte of 1 024 000 bytes is the megabyte used to format the
familiar 90 mm (3 1/2 inch), "1.44 MB" diskette. The confusion is
real, as is the potential for incompatibility in standards and in
implemented systems.
--
Steve
More information about the Python-ideas
mailing list