proper (standardized) file size symbols?

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Grave
Junior Member
Junior Member
Posts: 31
Joined: 2003-05-04, 21:14 UTC
Location: Slovakia

proper (standardized) file size symbols?

Post by *Grave »

how about supporting the IEC standards? :D
TC uses improper conventions, where e.g.
1 MB (megabyte) = 1048576 B (byte)
but standardized 1 MB means 1000000 B

if you want to display 1048576 B, you use 1 MiB (megabinary byte)
Because the SI prefixes strictly represent powers of 10, they should not be used to represent powers of 2. Thus, one kilobit, or 1 kbit, is 1000 bit and not 2^10 bit = 1024 bit. To alleviate this ambiguity, prefixes for binary multiples have been adopted by the International Electrotechnical Commission (IEC) for use in information technology.


In December 1998 the International Electrotechnical Commission (IEC), the leading international organization for worldwide standardization in electrotechnology, approved as an IEC International Standard names and symbols for prefixes for binary multiples for use in the fields of data processing and data transmission. The prefixes are as follows:

Code: Select all

-----------------------------------------------------------------
Prefixes for binary multiples
-----------------------------------------------------------------
Factor  Name    Symbol  Origin                  Derivation
2^10    kibi    Ki      kilobinary: (2^10)^1    kilo: (10^3)^1
2^20    mebi    Mi      megabinary: (2^10)^2    mega: (10^3)^2
2^30    gibi    Gi      gigabinary: (2^10)^3    giga: (10^3)^3
2^40    tebi    Ti      terabinary: (2^10)^4    tera: (10^3)^4
2^50    pebi    Pi      petabinary: (2^10)^5    peta: (10^3)^5
2^60    exbi    Ei      exabinary:  (2^10)^6    exa:  (10^3)^6
-----------------------------------------------------------------
Examples and comparisons with SI prefixes
one kibibit     1 Kibit = 2^10 bit = 1024 bit
one kilobit     1 kbit  = 10^3 bit = 1000 bit
one mebibyte    1 MiB   = 2^20 B   = 1 048 576 B
one megabyte    1 MB    = 10^6 B   = 1 000 000 B
one gibibyte    1 GiB   = 2^30 B   = 1 073 741 824 B
one gigabyte    1 GB    = 10^9 B   = 1 000 000 000 B
more at Definitions of the SI units: The binary prefixes
Grave
*eat people, not animals*
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Re: proper (standardized) file size symbols?

Post by *djk »

Well...
I've never read about it before.
Thanks for the link.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

Well if we're getting into the exact definitions than strictly speaking TC's representation IS correct, small [k] stands for kilo (x1000) but upper case K stands for x1024 the same goes for M and G; IMO this is all bullsh*t; the "correct" usage in computers is powers of 2 i.e. binary representation no matter how you write it, in computers both lower and upper cases are used interchangeably and usually invoke PR bunnies running around with 524 memory instead 512.

Example: 1.44MB floppy is 1440 x 1024 = 1474560 bytes; there are always small inconsistencies with this notion, eg in this example MB is used as a multiplier of 1024 (binary power) and 1440 (decimal) so the truly "correct" representation would have said 1440 / 1024 = 1.40625 MB, but ....

TC is using the "common" notation that is, the one used by windows, MAC, and UNIX (IIRC).

Cheers.
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

if you want to display 1048576 B, you use 1 MiB (megabinary byte)
Windows don't use those notations and I don't even know one person/program/system/country that use it.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
User avatar
Grave
Junior Member
Junior Member
Posts: 31
Joined: 2003-05-04, 21:14 UTC
Location: Slovakia

Post by *Grave »

fabiochelly wrote:
if you want to display 1048576 B, you use 1 MiB (megabinary byte)
Windows don't use those notations and I don't even know one person/program/system/country that use it.
it should be available at least as an option :)
there are still many backward countries using limb-based imperial measurement system and not proper standard metric system so i'm not surprised.

if you read the historical explanation on the definition site, you would know why its not used in many programs - some programmers are pioneers, while on the other hand most are lazy :)

hard disk manufacturers use proper prefixes and symbols (80MB hard disk is 76 MiB or 80 000 000 Bytes)
and afaik so do telecommunication firms when it comes to bandwidth and traffic
100 megabit is not 104 857 600 bits but 100 000 000 bits

for the lazy:
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.
Grave
*eat people, not animals*
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

@Grave
The only reason we use base 10 in our counting is because we're bipedaled (two hands, limbs) with 5 fingers each -> 10. However in computers the natural base is 2 (every bit can be in two states) that's why it's used _NOT_ because of laziness or other such nonsense, he talks (in the historical reference) about memory chips but memory chips also have a very good reason to use base 2 rather than 10; true, for disk storage there is no special reason to use base 2 but then again there is also no special reason to use base 10. For reference even in branches of Mathematics dealing with computers base 2 is used - it's not laziness it's convenience.

P.S. Even in storage (disks) there is a pretty good reason to use base 2 given we're saving bits on it, not songs, not files just bits.

Cheers.
User avatar
Grave
Junior Member
Junior Member
Posts: 31
Joined: 2003-05-04, 21:14 UTC
Location: Slovakia

Post by *Grave »

man you don't get it, let me explain simplistically, i will type slowly so you can follow me ;)

we are NOT talking about what should/shouldnt be used in computers, binary or decimal
we're talking about proper naming scheme and symbol/prefix usage.
there is international standard (SI) that DEFINES decimal prefixes (mega, kilo, etc) which are DECIMAL prefixes.
you just cannot use decimal prefixes for BINARY measurements.
because of inaccuracy it creates, kilo is ALWAYS 1000, and not roughly 1000 aka 1024 rounded
thats why

COMMON people know that kilo is 10^3 or 1000 because its an international STANDARD - kilo was invented to be a decimal prefix, like in kilogram (1000 grams, not 1024 grams)
common people cannot think/calculate/etc in binary because its much easier to do so in decimal.

there, hope you understand now :)
Grave
*eat people, not animals*
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

....
Silly rant, ignored.
we are NOT talking about what should/shouldn't be used in computers, binary or decimal
we're talking about proper naming scheme and symbol/prefix usage.
there is international standard (SI) that DEFINES decimal prefixes (mega, kilo, etc) which are DECIMAL prefixes.
A cat is a cat even if a I call it a dog. Some standards catch some don't given this "standard" is roughly dated 1999 it means it didn't catch (hmm there has to be a reason .... hmmm ... I wander what it is) I can think of at least dozen silly standards... I can however see a de-facto standard i.e. the one used today by all operating systems.
COMMON people know that kilo is 10^3 or 1000 because its an international STANDARD - kilo was invented to be a decimal prefix, like in kilogram (1000 grams, not 1024 grams)
common people cannot think/calculate/etc in binary because its much easier to do so in decimal.
Well than, let the COMMON people program, we'll see how they do using base 10 in computers.

Cheers.
User avatar
Grave
Junior Member
Junior Member
Posts: 31
Joined: 2003-05-04, 21:14 UTC
Location: Slovakia

Post by *Grave »

you're from usa aren't you? ;)
Grave
*eat people, not animals*
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

Personally I'm not very concerned by the prefixes for multiples used in TC because I configured it to display the plain numbers of bytes. This way the length of the size string shows me the magnitude of the file at first sight and if required I can also see the full precision at second sight.

Nevertheless I recognize the need for configurable prefixes (symbols and their values) because it is a fact that the good old standard prefixes for 10^N are now overloaded with other meanings (2^M or 10^L*1024) by the computer community. I think unambiguousness is desirable, even better if standardized. But new standards replacing established habits take a long time to get accepted (e.g. cm instead of inches). So configurability is a common solution. In Microsoft Word 97 and in OpenOffice V1.0 for instance the unit of length is configurable: Inches, Centimeters, Points, Picas.

JackFoo wrote:Well if we're getting into the exact definitions than strictly speaking TC's representation IS correct, small [k] stands for kilo (x1000) but upper case K stands for x1024 ...
I disagree. My copy of TC V5.51 uses small 'k' for 1024 B. I never saw an upper case 'K' in the size column of TC. It seems that TC uses the case of the SI standard prefixes, but not their meaning. The Windows Explorer uses 'KB' for 1024 B.
BTW: TC just truncates but Windows Exlorer rounds!
Last edited by jb on 2003-06-01, 13:15 UTC, edited 2 times in total.
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Grave wrote:you're from usa aren't you? ;)
Oops! Don’t go into that area guys. Let’s stick to TC.

It’s good to know that each individual has his/her reasons to fight for an idea. Some think that notation down to the minor detail is necessary some think it’s not.

As for me… I don’t really care which method will be followed. I’m used to the current situation since I first touched a computer. A change will not really affect me to be honest. And that is because when I see a file size I subconsciously tend to just count the number of digits and then “absorb” something like 70% of the contents of that number.
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

Grave wrote:you're from usa aren't you? ;)
Actually I'm not, moreover I would say you would be guessing till the fat lady sings and even then would not know the answer.
jb wrote:I disagree. My copy of TC V5.51 uses small 'k' for 1024.
So is mine. (that was my mistake, though for me at least if it was k or K wouldn't make any difference)
jb wrote:I never saw an upper case 'K' in the size column of TC. It seems that TC uses the case of the SI standard prefixes, but not their meaning.
I would guess Christian never heard of the SI standard as I haven't and as many other people who deal with computers and computer sciences.
TC is pretty consistent eg.:
Size[dir] = 969,995,558 bytes
-> 947261.287109375 KB
-> 925.0598506927490234375 -> 925 M
What TC does is the first time divides by 1024 (bytes->kbytes) then uses 1000 as the next step, which is consistent with other operating systems and the way 1.44MB disk is called 1.44MB and not 1.4MB.

Cheers.
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

pdavit wrote:
Grave wrote:you're from usa aren't you? ;)
Oops! Don’t go into that area guys. Let’s stick to TC.
2all
pdavit is right. Let's stop going this way. I know many forums which went this way and... I don't visit them anymore. :-(
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
Grave
Junior Member
Junior Member
Posts: 31
Joined: 2003-05-04, 21:14 UTC
Location: Slovakia

Post by *Grave »

i'm not on some kind of prefix crusade or something :)
(maybe a little knowledge spreading and education ;))
it doesnt bother me personally because i can use binary/decimal/hexadecimal without problems, but then again some things shouldnt be mixed, especially not in such a precise environment as computers.
who if not programmers should support this kind of standards then?
Grave
*eat people, not animals*
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

JackFoo wrote:I would guess Christian never heard of the SI standard as I haven't ....
I am quite sure that Christian heard of the SI standard because almost all Swiss high schools teach it. Otherwise it would be a lucky coincidence that TC uses k, M and G (neither K, M, G nor k, m, g). SI stands for International System of Units, in French Système International d'Unités. If you follow the last link in the first post of this topic you can learn more.
Post Reply