Hi,
what is the simplest way to convert for example 21.5 MB to 0.021 GB with nawk ( Solaris 10 )?
In fact I have a file with the following entries:
100 GB
21.5 MB
2 GB
120 MB
3.5 GB
and I want the sum in GB.
THX
Heinz
|
|
0
|
|
|
|
Reply
|
Heinz
|
3/25/2009 7:54:38 PM |
|
Heinz M�ller wrote:
> Hi,
>
> what is the simplest way to convert for example 21.5 MB to 0.021 GB with nawk ( Solaris 10 )?
Maybe not "the" simplest way, but a simple way...
awk '$2=="MB"{print $1/1000, "GB"}'
>
> In fact I have a file with the following entries:
>
> 100 GB
> 21.5 MB
> 2 GB
> 120 MB
> 3.5 GB
>
> and I want the sum in GB.
Simplified...
awk '/MB/{s+=$1/1000}/GB/{s+=$1}END{print s,"GB"}'
Janis
>
> THX
>
> Heinz
>
>
|
|
0
|
|
|
|
Reply
|
Janis
|
3/25/2009 8:08:57 PM
|
|
Janis Papanagnou said the following on 3/25/2009 3:08 PM:
> Heinz M�ller wrote:
>> Hi,
>>
>> what is the simplest way to convert for example 21.5 MB to 0.021 GB
>> with nawk ( Solaris 10 )?
>
> Maybe not "the" simplest way, but a simple way...
>
> awk '$2=="MB"{print $1/1000, "GB"}'
>
>>
>> In fact I have a file with the following entries:
>>
>> 100 GB
>> 21.5 MB
>> 2 GB
>> 120 MB
>> 3.5 GB
>>
>> and I want the sum in GB.
>
> Simplified...
>
> awk '/MB/{s+=$1/1000}/GB/{s+=$1}END{print s,"GB"}'
>
>
> Janis
>
>>
>> THX
>>
>> Heinz
>>
I suppose to be absolutely correct one would use 1024 instead of 1000. I
always thought that 1 MB was 1024**2 Bytes and 1 GB was 1024**3 Bytes.
Probably splitting hairs but it depends on the definitions applied to
the values of the OP's data.
--
(^\pop/^)
I'm lost... I've gone to look for myself.
If I should return before I get back, keep me here.
--
|
|
0
|
|
|
|
Reply
|
pop
|
3/25/2009 8:58:17 PM
|
|
Janis Papanagnou scripsit:
> Heinz M�ller wrote:
>> Hi,
>> what is the simplest way to convert for example 21.5 MB to 0.021 GB with nawk ( Solaris 10 )?
>
> Maybe not "the" simplest way, but a simple way...
>
> awk '$2=="MB"{print $1/1000, "GB"}'
^^^^
1024
m.
--
LaTeX + Vim = http://vim-latex.sourceforge.net/
Vim Universal Templates: http://vim.sf.net/script.php?script_id=1078
vim.pl - http://skawina.eu.org/mikolaj
CLEWN - http://clewn.sf.net
|
|
0
|
|
|
|
Reply
|
Mikolaj
|
3/25/2009 9:01:42 PM
|
|
pop wrote:
> Janis Papanagnou said the following on 3/25/2009 3:08 PM:
>
>> Heinz M�ller wrote:
>>
>>> Hi,
>>>
>>> what is the simplest way to convert for example 21.5 MB to 0.021 GB
>>> with nawk ( Solaris 10 )?
>>
>>
>> Maybe not "the" simplest way, but a simple way...
>>
>> awk '$2=="MB"{print $1/1000, "GB"}'
>>
>>>
>>> In fact I have a file with the following entries:
>>>
>>> 100 GB
>>> 21.5 MB
>>> 2 GB
>>> 120 MB
>>> 3.5 GB
>>>
>>> and I want the sum in GB.
>>
>>
>> Simplified...
>>
>> awk '/MB/{s+=$1/1000}/GB/{s+=$1}END{print s,"GB"}'
>>
>>
>> Janis
>>
>>>
>>> THX
>>>
>>> Heinz
>>>
> I suppose to be absolutely correct one would use 1024 instead of 1000. I
No. To be absolutely correct a giga scaling perfix is 1.000.000.000, a
mega is 1.000.000 and a kilo is 1.000 - replace digit group separators
by the ones valid in your locale.
(Use gibi and mebi scalers if you mean something different than giga
and mega; see http://en.wikipedia.org/wiki/Binary_prefix for details.)
> always thought that 1 MB was 1024**2 Bytes and 1 GB was 1024**3 Bytes.
> Probably splitting hairs but it depends on the definitions applied to
> the values of the OP's data.
If the OP require some non-standard meaning of kilo, mega, giga, he
is free to use that, but I wouldn't want to foster confusion of unit
scaling factors by using homonyms unnecessarily. Let alone call 1000
as a "wrong" factor.
Janis
|
|
0
|
|
|
|
Reply
|
Janis
|
3/25/2009 9:59:16 PM
|
|
Mikolaj Machowski wrote:
> Janis Papanagnou scripsit:
>
>>Heinz M�ller wrote:
>>
>>>Hi,
>>>what is the simplest way to convert for example 21.5 MB to 0.021 GB with nawk ( Solaris 10 )?
>>
>>Maybe not "the" simplest way, but a simple way...
>>
>>awk '$2=="MB"{print $1/1000, "GB"}'
>
> ^^^^
> 1024
1000.
>
> m.
|
|
0
|
|
|
|
Reply
|
Janis
|
3/25/2009 10:00:09 PM
|
|
Le Wed, 25 Mar 2009 22:59:16 +0100,
Janis Papanagnou a =C3=A9crit :
> (Use gibi and mebi scalers if you mean something different than giga
> and mega; see http://en.wikipedia.org/wiki/Binary_prefix for details.)
It's really a pain these f... units factor! When people speaks about
computers related stuff, they know that 1 kB is 1024 bytes. If people
talks about 1 kg of sugar, they know it's 1000 grammes of sugar too.
Context is not same.
Several years ago, everyone aware of computing knows that 1 k <=3D> 1024
in computing area, and talk accordingly keeping this in mind, until...
Until HD manufacturer and others found that 1 TB will sell better than
930 MB, and so on! And tomorrow we'll say 8 Tb? It's more impressive
than 1 TB, no? Oh yes, b is a fundamental unit like meter...
A wound these ... new units factor. Yes, really!
--=20
Jacques.
|
|
0
|
|
|
|
Reply
|
Kojak
|
3/26/2009 12:11:50 AM
|
|
Kojak wrote:
> Le Wed, 25 Mar 2009 22:59:16 +0100,
> Janis Papanagnou a écrit :
>
>
>>(Use gibi and mebi scalers if you mean something different than giga
>>and mega; see http://en.wikipedia.org/wiki/Binary_prefix for details.)
>
>
> It's really a pain these f... units factor! When people speaks about
> computers related stuff, they know that 1 kB is 1024 bytes.
That's apparently wrong. Why would you address a memory like a tape
device, a drum memory, or a hard disc in units that don't fit? (For
example 454 tracks, and, depending on the zone, 122 to 232 sectors.)
If anything, addressing in 1024^Z units make sense for _binary full
addressed_ kernel memory. The reason why, e.g., the sectors of hard
disks have (for example) 512 (2^9) bit is because of the necessity to
map them (page them) to the primary memory which is binary addressed.
But there's no reason why the capacity of any device would have to be
a 2^N multiple of the sector size 2^Z, and actually it isn't, generally.
> If people
> talks about 1 kg of sugar, they know it's 1000 grammes of sugar too.
That's true.
> Context is not same.
Scaling factors are the same.
We should really think well about whether it is a good idea use the
non-standard scaling units that people got used to use in the past
30 years for the _binary full addressed_ kernel memory and extend
them for the non-multiple-of-(1^N*2^Z) devices instead of accepting
the binary kernel memory addressing as a *special case*.
Distinguishing the standard 1000-based scalings from the now as well
standardized 1024-based scalings is a good thing anyway, because both
have a clear definition and thus its use avoids confusion.
> Several years ago, everyone aware of computing knows that 1 k <=> 1024
> in computing area, and talk accordingly keeping this in mind, until...
Several decades ago everyone, not only those aware of computing, were
aware that 1k is 1000. Programmed computing - which predates your
"several years" by many (approx. eight) decades, actually - hasn't
changed that. (I have quite a couple older computing books in my shelf
that describe various kernel memory types in multiples of powers of 2
and external devices in multiples of powers of 10.)
But since not everyone "knows" what you think they should know; please
provide a normative reference or an accepted international standard that
confirms your pronouncement if you think the above said is incorrect.
> Until HD manufacturer and others found that 1 TB will sell better than
> 930 MB, and so on! And tomorrow we'll say 8 Tb? It's more impressive
> than 1 TB, no? Oh yes, b is a fundamental unit like meter...
(And "Byte", BTW, is not even of unambiguous size, even if you seem to
imply that a Byte would be 8 bit; but that's, in general, incorrect as
well.)
Folks who have done computing before the 25-30 year lasting "PC era",
and folks who follow standards, might have a different view than those
who "know".
> A wound these ... new units factor. Yes, really!
But why?
Janis
|
|
0
|
|
|
|
Reply
|
Janis
|
3/26/2009 2:46:18 AM
|
|
Kojak escribió:
> Le Wed, 25 Mar 2009 22:59:16 +0100,
> Janis Papanagnou a écrit :
>
>> (Use gibi and mebi scalers if you mean something different than giga
>> and mega; see http://en.wikipedia.org/wiki/Binary_prefix for details.)
>
> It's really a pain these f... units factor! When people speaks about
> computers related stuff, they know that 1 kB is 1024 bytes. If people
> talks about 1 kg of sugar, they know it's 1000 grammes of sugar too.
>
> Context is not same.
>
> Several years ago, everyone aware of computing knows that 1 k <=> 1024
> in computing area, and talk accordingly keeping this in mind, until...
>
> Until HD manufacturer and others found that 1 TB will sell better than
> 930 MB, and so on! And tomorrow we'll say 8 Tb? It's more impressive
> than 1 TB, no? Oh yes, b is a fundamental unit like meter...
>
> A wound these ... new units factor. Yes, really!
The 'properties' window of one of my disks in a Windows XP machine gives:
Used space: 59.130.093.568 bytes 55,0 GB
Free space: 57.027.309.568 bytes 53,1 GB
Capacity: 116.157.403.136 bytes 108 GB
It seems that Microsoft assumes:
1 KB = 1024 B
1 MB = 1024 KB
1 GB = 1024 MB
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
|
|
0
|
|
|
|
Reply
|
Manuel
|
3/26/2009 8:53:12 AM
|
|
On Thursday 26 March 2009 01:11, Kojak wrote:
> Le Wed, 25 Mar 2009 22:59:16 +0100,
> Janis Papanagnou a écrit :
>
>> (Use gibi and mebi scalers if you mean something different than giga
>> and mega; see http://en.wikipedia.org/wiki/Binary_prefix for details.)
>
> It's really a pain these f... units factor! When people speaks about
> computers related stuff, they know that 1 kB is 1024 bytes.
Well that depends on what you're talking about. For example (letting alone
the binary and decimal prefixes naming convention for a moment), there's no
doubt that when you're talking about network bandwidth or traffic, "k"
or "kilo" means exactly 1000, while when you're talking about RAM
capacity "k" or "kilo" (yes, should be "ki" or kibi but many people
informally use kilo nonetheless) means "1024".
That said, I agree with Janis that since well defined (although not so
well-known) naming conventions exist for both systems, the correct one
should be used to indicate what you want, so if you mean 1024 you should
use kibi (or mebi, etc.) and if you mean 1000 you should use kilo (mega,
etc.).
The fact that some people use decimal prefixes (mega) more or less
everywhere, while other use the appropriate one has lead to all sorts of
confusions and misunderstanding. One for all, the infamous "missing
capacity" many people experience under windows, where hard drive advertised
by the vendor as being 160 gibibyte (that is, exactly 160 billions bytes)
is shown as being 149.05 gigabyte, and the hard time you have when trying
to explain to clueless users where the missing 11 "gigabytes" have gone.
And all of that because windows uses binary units for hard drive capacity
whereas vendors use decimal.
|
|
0
|
|
|
|
Reply
|
pk
|
3/26/2009 9:40:04 AM
|
|
Janis Papanagnou said the following on 3/25/2009 4:59 PM:
> pop wrote:
>> Janis Papanagnou said the following on 3/25/2009 3:08 PM:
>>
>>> Heinz M�ller wrote:
>>>
>>>> Hi,
>>>>
>>>> what is the simplest way to convert for example 21.5 MB to 0.021 GB
>>>> with nawk ( Solaris 10 )?
>>>
>>>
>>> Maybe not "the" simplest way, but a simple way...
>>>
>>> awk '$2=="MB"{print $1/1000, "GB"}'
>>>
>>>>
>>>> In fact I have a file with the following entries:
>>>>
>>>> 100 GB
>>>> 21.5 MB
>>>> 2 GB
>>>> 120 MB
>>>> 3.5 GB
>>>>
>>>> and I want the sum in GB.
>>>
>>>
>>> Simplified...
>>>
>>> awk '/MB/{s+=$1/1000}/GB/{s+=$1}END{print s,"GB"}'
>>>
>>>
>>> Janis
>>>
>>>>
>>>> THX
>>>>
>>>> Heinz
>>>>
>> I suppose to be absolutely correct one would use 1024 instead of 1000. I
>
> No. To be absolutely correct a giga scaling perfix is 1.000.000.000, a
> mega is 1.000.000 and a kilo is 1.000 - replace digit group separators
> by the ones valid in your locale.
>
> (Use gibi and mebi scalers if you mean something different than giga
> and mega; see http://en.wikipedia.org/wiki/Binary_prefix for details.)
>
>> always thought that 1 MB was 1024**2 Bytes and 1 GB was 1024**3 Bytes.
>> Probably splitting hairs but it depends on the definitions applied to
>> the values of the OP's data.
>
> If the OP require some non-standard meaning of kilo, mega, giga, he
> is free to use that, but I wouldn't want to foster confusion of unit
> scaling factors by using homonyms unnecessarily. Let alone call 1000
> as a "wrong" factor.
>
> Janis
Debate is probably fruitless since I think everyone will agree that
there is ambiguity in the terms: MB GB KB and I stipulated in my post
that it was nit-picking as to whether it was 1000 or 1024. The OP was
trying to solve what appeared to be a computer related problem and the
correct value to use would certainly depend on the context of the units
in question (as I indicated). So I concede that everyone is correct and
the end result will be a matter of choice to fit the circumstance.
--
(^\pop/^)
I'm lost... I've gone to look for myself.
If I should return before I get back, keep me here.
--
|
|
0
|
|
|
|
Reply
|
pop
|
3/26/2009 12:23:45 PM
|
|
On Thu, 26 Mar 2009 09:53:12 +0100, Manuel Collado wrote:
> Kojak escribi�:
>> Le Wed, 25 Mar 2009 22:59:16 +0100,
>> Janis Papanagnou a �crit :
>>
>>> (Use gibi and mebi scalers if you mean something different than giga
>>> and mega; see http://en.wikipedia.org/wiki/Binary_prefix for details.)
>>
>> It's really a pain these f... units factor! When people speaks about
>> computers related stuff, they know that 1 kB is 1024 bytes. If people
>> talks about 1 kg of sugar, they know it's 1000 grammes of sugar too.
>>
>> Context is not same.
>>
>> Several years ago, everyone aware of computing knows that 1 k <=> 1024
>> in computing area, and talk accordingly keeping this in mind, until...
>>
>> Until HD manufacturer and others found that 1 TB will sell better than
>> 930 MB, and so on! And tomorrow we'll say 8 Tb? It's more impressive
>> than 1 TB, no? Oh yes, b is a fundamental unit like meter...
>>
>> A wound these ... new units factor. Yes, really!
>
> The 'properties' window of one of my disks in a Windows XP machine gives:
>
> Used space: 59.130.093.568 bytes 55,0 GB Free space: 57.027.309.568
> bytes 53,1 GB Capacity: 116.157.403.136 bytes 108 GB
>
> It seems that Microsoft assumes:
>
> 1 KB = 1024 B
> 1 MB = 1024 KB
> 1 GB = 1024 MB
AFAIK that is correct, especially the fact that you used "K" instead of
"k" and "G" instead of "g" (M/m would be mega/milli with mega ambiguous
with regard to 10^x or 2^n). The convention I knew all these years was
that capitol letters meant multiples of 1024 and lower case letters meant
multiples of 1000.
Basically, users tend to expect binary and vendors tend to use decimal for
bragging rights.
--
T.E.D. (tdavis@mst.edu)
|
|
0
|
|
|
|
Reply
|
Ted
|
3/26/2009 12:51:33 PM
|
|
Le Thu, 26 Mar 2009 03:46:18 +0100,
Janis Papanagnou a =C3=A9crit :
> Kojak wrote:
> > It's really a pain these f... units factor! When people speaks
> > about computers related stuff, they know that 1 kB is 1024 bytes.
>
> That's apparently wrong. Why would you address a memory like a tape
> device, a drum memory, or a hard disc in units that don't fit? (For
> example 454 tracks, and, depending on the zone, 122 to 232 sectors.)
I don't really understand what you try to say here. Tracks and
sectors are what they are. They are based on technical properties of
hardware express in human representation base. When we say "454
tracks", we don't express tracks in term of binary 'ktracks',
'Mtracks' or 'Gtracks', idem for sectors. even if we can. Tracks or
sectors are not binary concept as byte or bit are. but express in
term of capacity, I'll say my tape manage 100 (binary) MB. No problem
here.
> If anything, addressing in 1024^Z units make sense for _binary full
> addressed_ kernel memory. The reason why, e.g., the sectors of hard
> disks have (for example) 512 (2^9) bit is because of the necessity to
> map them (page them) to the primary memory which is binary addressed.
> But there's no reason why the capacity of any device would have to be
> a 2^N multiple of the sector size 2^Z, and actually it isn't,
> generally.
Obviously there is no reason to be a multiple 2^N, as there is no
reason to be a multiple of 10^N too! That said, take a 512
bytes/sectors (and not bit) you can multiply as many as you want, you
obtain invariably a 2^N (modulo 512 bytes for odd multiplier).
> > Context is not same.
>
> Scaling factors are the same.
1k in binary base is 1024 (1000 + 24) in decimal base, same
representation (k letter), but different scale factor in two different
context. Context determine which one to use.
> We should really think well about whether it is a good idea use the
> non-standard scaling units that people got used to use in the past
> 30 years for the _binary full addressed_ kernel memory and extend
> them for the non-multiple-of-(1^N*2^Z) devices instead of accepting
> the binary kernel memory addressing as a *special case*.
Kernel memory addressing is not a special case. Computers are actually
all based on binary representation. Computation base on '2 fingers'
have their own rules similar to '10 fingers' computation. Just a
simple example, 10^3 is, for human been, easy to compute, just add 3
zero after 1, or shift left 3 times. Multiplying 42 by 1000 is as easy
too, just shift... unless we get 10 base computing computers, we
actually must rely on 2 base based computer. Then multiplying by 2 is
simply shifting (as for us with 10). 1k in binary is simply 10 times
shifting.
Kilo in human world is only a simple convention or a facility that
suit human been in number manipulation as kilo for binary world which
is also a convention that suit computer operations and not too far
from human representation.
> Distinguishing the standard 1000-based scalings from the now as well
> standardized 1024-based scalings is a good thing anyway, because both
> have a clear definition and thus its use avoids confusion.
I'm wondering which kind of confusion can occur when lambda peoples
buy 500 binary GB or 500 decimal GB? just few GB? As usual, it's just
a convention depending on the context. Naming binary giga as gibi,
gigi, gigo or gogo or what else you want is just a facility to
remember we are talking about computing stuff.
> > Several years ago, everyone aware of computing knows that 1 k <=3D>
> > 1024 in computing area, and talk accordingly keeping this in mind,
> > until...
>
> Several decades ago everyone, not only those aware of computing, were
> aware that 1k is 1000. Programmed computing - which predates your
> "several years" by many (approx. eight) decades, actually - hasn't
> changed that. (I have quite a couple older computing books in my shelf
> that describe various kernel memory types in multiples of powers of 2
> and external devices in multiples of powers of 10.)
>
> But since not everyone "knows" what you think they should know; please
> provide a normative reference or an accepted international standard
> that confirms your pronouncement if you think the above said is
> incorrect.
Each craft has his own context, his own vocabulary and his own rules.
We can accept this fact or not, consider it good or bad, but it's
simply a fact. Except that kibibit, mebibit and so on sound silly,
they are not part of SI units, but just approved by IEC. Not even by
JEDEC, if I recall correctly. For short, it's just a marketing issue
appears in late '80 when it became obvious that difference between
binary and decimal kilo could become a useful commercial
argument. That said, the situation could have been worse if we took
2^3 for binary kilo... :->
> > Until HD manufacturer and others found that 1 TB will sell better
> > than 930 MB, and so on! And tomorrow we'll say 8 Tb? It's more
> > impressive than 1 TB, no? Oh yes, b is a fundamental unit like
> > meter...
>
> (And "Byte", BTW, is not even of unambiguous size, even if you seem to
> imply that a Byte would be 8 bit; but that's, in general, incorrect as
> well.)
Hard drive are express in term of 8 bits (octet) size. It's sounds
better than express them in term of 16, 32 or 64 bits words. That's
why I joked when expressing them in bit only. Selling hard drive
express in 64 bits isn't commercially applicable (1 TB turn to 125
MB). Memory is another side of hypocrisy, chips are express in bits
but memory modules are express in 8-bit size, even now while computer
are actually using 32/64 bits word size. But yes, byte is ambiguous
better try to find name more speaking or another convention here than
trying to play with unit factors. Or better, consider kibi as 2^3,
which would be more rational.
> Folks who have done computing before the 25-30 year lasting "PC era",
> and folks who follow standards, might have a different view than those
> who "know".
We are talking about today, not about 1 century ago. That's said,
binary is always binary, even before "PC era". defining an efficient
way to express size of words will be more useful than playing with
scale factor representation, as said previously.
> > A wound these ... new units factor. Yes, really!
>
> But why?
I think previous explanations should answer the question.
Well, I will stop here because I think we are quite a bit out off
topic... :-)
Cheers,
--=20
Jacques.
|
|
0
|
|
|
|
Reply
|
Kojak
|
3/26/2009 2:13:46 PM
|
|
Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>> 1024
>
> 1000.
Actually, Mikolaj was correct.
1Gb = 1024Mb
Mark.
--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/
|
|
0
|
|
|
|
Reply
|
markhobley
|
3/26/2009 4:08:02 PM
|
|
On Thursday 26 March 2009 17:08, Mark Hobley wrote:
> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>> 1024
>>
>> 1000.
>
> Actually, Mikolaj was correct.
>
> 1Gb = 1024Mb
Sure. I suppose your 1Gb ethernet adapter has a bandwidth of 1024Mb then.
Well, good for you.
|
|
0
|
|
|
|
Reply
|
pk
|
3/26/2009 5:29:51 PM
|
|
Mark Hobley wrote:
> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>
>>>1024
>>
>>1000.
>
>
> Actually, Mikolaj was correct.
You are both wrong.
There are standards that show the correct scalings letters; Google
is your friend.
(But feel free to point me to a normative (international accepted)
standard saying anything different.)
>
> 1Gb = 1024Mb
>
> Mark.
>
|
|
0
|
|
|
|
Reply
|
Janis
|
3/26/2009 9:06:09 PM
|
|
Ted Davis wrote:
> On Thu, 26 Mar 2009 09:53:12 +0100, Manuel Collado wrote:
>
>
>>Kojak escribi�:
>>
>>>Le Wed, 25 Mar 2009 22:59:16 +0100,
>>>Janis Papanagnou a �crit :
>>>
>>>
>>>>(Use gibi and mebi scalers if you mean something different than giga
>>>>and mega; see http://en.wikipedia.org/wiki/Binary_prefix for details.)
>>>
>>>It's really a pain these f... units factor! When people speaks about
>>>computers related stuff, they know that 1 kB is 1024 bytes. If people
>>>talks about 1 kg of sugar, they know it's 1000 grammes of sugar too.
>>>
>>>Context is not same.
>>>
>>>Several years ago, everyone aware of computing knows that 1 k <=> 1024
>>>in computing area, and talk accordingly keeping this in mind, until...
>>>
>>>Until HD manufacturer and others found that 1 TB will sell better than
>>>930 MB, and so on! And tomorrow we'll say 8 Tb? It's more impressive
>>>than 1 TB, no? Oh yes, b is a fundamental unit like meter...
>>>
>>>A wound these ... new units factor. Yes, really!
>>
>>The 'properties' window of one of my disks in a Windows XP machine gives:
>>
>>Used space: 59.130.093.568 bytes 55,0 GB Free space: 57.027.309.568
>>bytes 53,1 GB Capacity: 116.157.403.136 bytes 108 GB
>>
>>It seems that Microsoft assumes:
>>
>>1 KB = 1024 B
>>1 MB = 1024 KB
>>1 GB = 1024 MB
>
>
> AFAIK that is correct, especially the fact that you used "K" instead of
> "k" and "G" instead of "g"
The capital K had been *informally* introduced and used by some computer
professionals when they got aware that it was a Bad Idea to use the k as
a homonym for two different values; it was a desperate idea to somehow
circumvent the introduced ambiguity of the "1024"-misuse. As long as the
memory capacities were small that worked (somewhat) with the k/K kludge,
but with increasing memory capacities the problem re-appeared in a more
severe way, since M and G (caps!) were already occupied by 10^6 and 10^9
respectively. With the new "bi-" standards there's a chance to avoid that
problem in future. But since some folks still use even feet and inch,
despite having national legislation to have SI units as standard, I don't
expect too much progress in that area.
> (M/m would be mega/milli with mega ambiguous
> with regard to 10^x or 2^n). The convention I knew all these years was
> that capitol letters meant multiples of 1024 and lower case letters meant
> multiples of 1000.
Which is wrong since M and G are *standardized*!
> Basically, users tend to expect binary and vendors tend to use decimal for
> bragging rights.
Basically that depends on the users and their background.
Janis
|
|
0
|
|
|
|
Reply
|
Janis
|
3/26/2009 9:24:00 PM
|
|
Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> There are standards that show the correct scalings letters; Google
> is your friend.
"The nice thing about standards is that there are so many of them to
choose from." - Andrew Tanenbaum
Mark.
--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/
|
|
0
|
|
|
|
Reply
|
markhobley
|
3/26/2009 11:08:01 PM
|
|
On Thu, 26 Mar 2009 23:08:01 GMT, markhobley@hotpop.donottypethisbit.com (Mark Hobley) wrote:
>Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>> There are standards that show the correct scalings letters; Google
>> is your friend.
>
>"The nice thing about standards is that there are so many of them to
>choose from." - Andrew Tanenbaum
Yep, while back I wrote Internet connection monitor in gawk,
everything I saw on the 'net seemed to use 1024, but my ISP uses
1000, so that's what I use in order to compare with ISP figures.
Context means a lot. So many people seem to stick to one or
other 'definition' without including a context.
Also, there are examples of mixed usage, like the 1.44MB floppy
being 1.38GiB, 'cos someone did a 1000 x 1024 to get the 1.44MB.
I get annoyed by the milli/Mega and gram/Giga confusion out there ;)
Grant.
--
http://bugsplatter.id.au
|
|
0
|
|
|
|
Reply
|
Grant
|
3/27/2009 12:58:52 AM
|
|
On Fri, 27 Mar 2009 11:58:52 +1100, Grant <g_r_a_n_t_@bugsplatter.id.au> wrote:
>On Thu, 26 Mar 2009 23:08:01 GMT, markhobley@hotpop.donottypethisbit.com (Mark Hobley) wrote:
>
>>Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>> There are standards that show the correct scalings letters; Google
>>> is your friend.
>>
>>"The nice thing about standards is that there are so many of them to
>>choose from." - Andrew Tanenbaum
>
>Yep, while back I wrote Internet connection monitor in gawk,
>everything I saw on the 'net seemed to use 1024, but my ISP uses
>1000, so that's what I use in order to compare with ISP figures.
>
>Context means a lot. So many people seem to stick to one or
>other 'definition' without including a context.
>
>Also, there are examples of mixed usage, like the 1.44MB floppy
>being 1.38GiB, 'cos someone did a 1000 x 1024 to get the 1.44MB.
Oops: 1.38MiB :)
>
>I get annoyed by the milli/Mega and gram/Giga confusion out there ;)
>
>Grant.
--
http://bugsplatter.id.au
|
|
0
|
|
|
|
Reply
|
Grant
|
3/27/2009 1:18:26 AM
|
|
Mark Hobley wrote:
> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>
>>There are standards that show the correct scalings letters; Google
>>is your friend.
>
>
> "The nice thing about standards is that there are so many of them to
> choose from." - Andrew Tanenbaum
Maybe, maybe not. But I've yet to see one with the claimed unit scaler.
So if one can dig up any normative one from those "many standards" I'd
be interested to hear about.
>
> Mark.
>
|
|
0
|
|
|
|
Reply
|
Janis
|
3/27/2009 6:33:59 AM
|
|
|
20 Replies
507 Views
(page loaded in 0.317 seconds)
|