Re: Bytes Question

new topic     » goto parent     » topic index » view thread      » older message » newer message

>> x=dir(myfile)
>> x[D_SIZE] would be the file size in bytes.
>> So would file size in Kbytes would be x[D_SIZE]/1000
>> or x[D_SIZE]/1024 ? What about Mbtyes?

>KiloByte: 1024 Bytes
>MegaByte: 1024 KiloBytes (1,048,576 Bytes)
>GigaByte: 1024 MegaBytes (1,073,741,824 Bytes)
>TeraByte: 1024 GigaBytes (1,099,511,627,776 Bytes)

>For each step (KB, MB, GB, TB) divide by 1024.

>~Greg

It may or may not be relevant depending on what you are upto/why you want to
know,
but some manufacturers, especially those of hard disk drive (HDD) abuse the
system.
You can frequently find HDD capacities in GB
that are measured as 10^9 bytes instead of 2^30

Jordan

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu