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

Re: OT - Convert output of byte count to GB count?



Jerry Stuckle a écrit :
> On 2/16/2013 10:04 AM, Pascal Hambourg wrote:
>>
>> Big deal. The sector size is 2^9 bytes, but the sector count is a
>> totally arbitrary number, and is orders of magnitude bigger. So the
>> binary nature of the sector size is completely invisible in the disk
>> capacity. Even SSDs or other flash storage don't have a binary capacity
>> even though they are made of flash chips which have a binary capacity.
> 
> Not at all.  Sector counts are integers.  It is impossible to have a 
> disk of 1,000,000 bytes

Indeed, but it is possible to have a disk of 8 000 000 bytes (8 MB).

> (or 1,000,000,000 or any other direct multiple).

You should check your numbers.
10^9 = (5 * 2)^9 = 5^9 * 2^9 = 1953125 * 512.
So it is possible to have a disk of 1 953 125 sectors of 512 bytes,
which is exactly 1 000 000 000 bytes.
I personnally own a disk of exactly 20 GB (20 000 000 000 bytes).

Anyway, that does not matter. The real capacity is slightly bigger that
the rounded capacity advertised by manufacturers, so it's all fine : you
get a few extra bytes.


Reply to: