[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bad Metric ... 1k = 1024 or 1000?



Jon Bettenct (formerly Mr.I'mAnOutOfControlLisaSimpsonFannnn)
<jonINTERNETrelayCHAT@napaVALLEYnet.CLARInet> wrote:

> > >      Notwithstanding the above, those who argue that, for memory,
> disk, file,
> > > ... size, "1k" is a standard unit = 1024 can find some support in the way
> > > file size is reported by popular operating systems. For example, GS System
> > > and Windows 95 both use 1k = 1024.
> > 
> > So does the Mac.  Not sure about Unix (I don't recall seeing any
> > abbreviations - it displays file sizes in directory listsing as an exact
> > number of bytes).
> 
> Well, maybe the new G3 and iMac ones, but my Mac certainly doesn't use 1K
> = 1024. The get info box says a 140K disk image is 143K.... Or wait...
> Maybe it's rounding it off to the nearest 6.5K (the size of a sector on my
> hard disk)? Hmm... I'll have to think about that...

It is almost certainly referring to the amount of space used on the
disk.  The Get Info box in Finder displays the actual used space on the
disk in KB or MB, followed by the exact file size in bytes (in
parentheses).

There isn't any difference between the new machines (G3 and iMac) and
old ones - they all run Mac OS, and it displays data in the same manner
on all computers.

There might be differences between newer and older releases of Mac OS,
but I'm running 8.6 on both my machines, and it is certainly using 1024
for 1 KB and 1048576 for 1 MB.

An example: I have a disk image file (taken from a hard drive) which is
149,950,555 bytes in length.  This is abbreviated as "143 MB", which is
rounded to the nearest 0.1 MB.  According to my calculations,
149,950,555 bytes is 143.00399303 MB (assuming 1 MB = 1048576 bytes).

This is on a partition which has 13 KB allocation blocks, so there isn't
any significant error due to wasted space in the last allocation block.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P O Box 27-103, Wellington, New Zealand