This has actually started to become a source of confusion. In data processing, traditionally the kilo-, mega-, giga-, tera-, etc., extensions were powers of 1024, not 1000 (1, 2, 3, 4, etc., respectively), although recently there seems to be a push to force these to be used in the SI (metric) respect of being powers of 1000. This results in a difference of 24 bytes per K, 48,576 bytes per M, 73,741,824 bytes per G, etc.

According to the IEC International Standard definitions (1998), the units we traditionally think of KB, MB, GB, TB, etc., are now technically KiB, MiB, GiB, TiB, etc.

So the number you were thinking was 1024, although you managed to be correct both in actual number you suggested, and in your thought about another value.


In reply to Re^2: using the stat function (data unit sizes) by atcroft
in thread using the stat function by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.