Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 31st, 2002, 07:14 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Question (1 MB == 1024KB) or (1MB == 1000KB) ?

Hope this is the appropriate forum.

Many years ago I read this:

1 Kb is 1024 bytes

and

1 Mb is 1000 Kb ( NOT, 1024 Kb ).


As a confirmation to that,
the floppy images size for installing freeBSD is 1474560 bytes.

This is obtained with 1000 * 1024 * 1.44

( A floppy is 1.44Mb )

Any comment about this dilemma ?!?
__________________
My article: mod_rewrite: No More Endless Loops!

Reply With Quote
  #2  
Old January 31st, 2002, 07:48 AM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,173 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 24
http://scienceworld.wolfram.com/physics/Megabyte.html

1 KB = 1024 Bytes
1 MB = 1024 KB = 1,048,576 Bytes

You can format a 1.44 MB disk to different capacities. The floppy in my Windows machine can store 1,457, 664 = 1.38 MB. On a Linux box you can get the following (http://floppyutil.sourceforge.net/man/floppy.html):

Quote:
Most floppy drives can format disks of different capacities. The --capacity option shows possible format capacities on the specified floppy device. A typical IDE floppy drive may report the following capacities:

$ floppy --capacity B:
Formattable capacities for /dev/hda:
80x36x512 (1.40 Mb)
80x30x512 (1.17 Mb)
56x22x1024 (1.20 Mb)A standard floppy drive attached to the floppy controller may report the following capacities:

$ floppy --capacity A:
Formattable capacities for /dev/fd0:
80x36x512 (/dev/fd0H1440, 1.40 Mb)
80x18x512 (/dev/fd0D720, 720 Kb)
80x48x512 (/dev/fd0u1920, 1.87 Mb)
80x28x512 (/dev/fd0u1120, 1.09 Mb)
80x40x512 (/dev/fd0u1660, 1.56 Mb)
80x26x512 (/dev/fd0u1040, 1.01 Mb)
80x46x512 (/dev/fd0u1840, 1.79 Mb)
80x42x512 (/dev/fd0u1680, 1.64 Mb)
The --capacity option reports each available format capacity as "cylinders x blocks-per-cylinder x block size". An IDE floppy drive actually returns a total block count. --capacity simply tries some common blocks-per-cylinder values, until it finds one that fits. Format capacities of standard floppy drives are obtained from the floppy device driver.

Last edited by dcaillouet : January 31st, 2002 at 07:51 AM.

Reply With Quote
  #3  
Old January 31st, 2002, 08:17 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Thank you for the links.

I always thought that about "memory addressing" and "memory capacity" me too.

As an example "my" microcontroller (an 16-bit hitachi ) can address up to 1MB,
( address bus from A0 to A19 ).

But I thought that when talking about disk storage informations,
it was different.

I found this link that maybe could help to distinguish:

http://www.romulus2.com/articles/gu...bitsbytes.shtml

There I read that:

Quote:
Decimal System

Although data storage capacity is generally expressed in binary code, many hard drive manufacturers (and some newer BIOSs) use a decimal system to express capacity:

Old Standard
1 bit (b)
1 byte (B) = 8 bits
1 Kilobyte (K / KB) = 10^3 bytes = 1,000 bytes
1 Megabyte (M / MB) = 10^6 bytes = 1,000,000 bytes
1 Gigabyte (G / GB) = 10^9 bytes = 1,000,000,000 bytes
1 Terabyte (T / TB) = 10^12 bytes = 1,000,000,000,000 bytes

Note: A third definition of Megabyte is that used in formatting floppy disks: 1 Megabyte = 1,024,000 bytes.


The last note maybe could explain why I read that in the past.

Reply With Quote
  #5  
Old February 6th, 2002, 07:28 PM
andrewl41 andrewl41 is offline
Coder Extraordinaire
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: London
Posts: 35 andrewl41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 47 sec
Reputation Power: 7
Everything related to computing is in base 2, i.e. 2^x, this includes disk sizes.

Unfortunatly, most consumers don't understand binary numbers and so retailers have a nasty habit of runding these figures off to something more decimal.

This has lead to a bluring of what is and is not correct but if you want to be accurate

1 byte = 8 bits
------------------
1 Kb = 1024 bytes
1Mb = 1024Kb
1Gb = 1024Mb
etc...

Don't always believe what you read!

Reply With Quote
  #6  
Old February 19th, 2002, 02:12 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 185
if you use the 1000, a harddisk you buy will look bigger than it actually is... marketing strategy.

some years ago i also read about MB (MegaByte=1024*1024*1024) and mB (million Byte=1000*1000*1000). but never heard of this again in the present...

Reply With Quote
  #7  
Old February 19th, 2002, 08:18 PM
Matt Light's Avatar
Matt Light Matt Light is offline
Web Programmer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 363 Matt Light User rank is Lance Corporal (50 - 100 Reputation Level)Matt Light User rank is Lance Corporal (50 - 100 Reputation Level)Matt Light User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 Days 10 h 11 m 37 sec
Reputation Power: 7
Some people would beg to differ. In KILObyte the prefix kilo is used. This means 1000. So people can say that 1000 kilobytes are in a meg... the thing is, it doesn't matter what the prefix means, the megabyte can hold 1024 kilobytes. I believe that 1024 kilobytes is a meg
__________________
Matt Light
Web Programmer

Reply With Quote
  #8  
Old March 8th, 2002, 10:45 AM
Ekostudios Ekostudios is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Indiana
Posts: 2 Ekostudios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Ekostudios
look at these:

2^10
2^20
2^30
2^40
2^50

See a pattern

[eko]

Reply With Quote
  #9  
Old March 8th, 2002, 12:14 PM
realnowhereman realnowhereman is offline
Not there when you need me
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Oct 2001
Location: Berlin, Germany
Posts: 1,438 realnowhereman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 46 sec
Reputation Power: 9
The well-known pattern is ai = 2 ^^ (i * 10), i being the index of a prefix in {kilo; mega; giga; tera; exo; ...} - so what?

Matt Light:
This is a bit inconsistent, isn't it? If you assume that kilo is strictly 10 ^^ 3, then you also have to equal mega to 10 ^^ 6 or use the approximations with powers of two for both, otherwise the prefix system becomes pointless. What if someone decides that giga should be 1048 * mega? It would fit your pattern, but doesn't make much sense for computers neither for humans.

Reply With Quote
  #10  
Old March 13th, 2002, 09:20 PM
The Ostrich The Ostrich is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Oxford, UK
Posts: 31 The Ostrich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Given that we have all been brought up on the SI system, it should be clear that the prefixes kilo, mega and giga have the following meanings:

kilo = 10^3
mega = 10^6
giga = 10^9.
tera = 10^12

Clearly, the idea that
kilo = 2^10
mega = 2^20
giga = 2^30
etc...

is a convenient fiction, created by computer scientists who found that powers of 2 suited them better. It is, however, a non-SI usage of those prefixes. So, at the very least,

1 megabyte = 10^6 bytes.

Whether MB stands for Megabyte or something else remains to be seen.

Remember, all you powers-of-two fans, that tradition does not a standard make.

If you really want, you can define your basic unit of time to be 1/18.25 SI seconds. You can even call this new unit the second. But a second has a standard definition, and so does a {kilo || mega || giga} of anything.

Last edited by The Ostrich : March 13th, 2002 at 09:24 PM.

Reply With Quote
  #11  
Old March 14th, 2002, 03:41 AM
WoR WoR is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 23 WoR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
With kilo the SI convention is to use the small k. So I make the distinction:
1 k == 10^^3
1 K == 2^^10
this sadly can not be extended for the higher prefixes at mega, giga and tera by default use capitals (plus the small m is allready used by milli).
So basically the best is to use scientific notation. This also avoids the pitfall
Europe:

Reply With Quote
  #12  
Old March 14th, 2002, 03:42 AM
WoR WoR is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 23 WoR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
(oops I pressed return once too often so this is the last post continued

europe: 1 billion == 1 million million
USA: 1 billion == 1 thousand million

Reply With Quote
  #13  
Old March 14th, 2002, 01:54 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 185
if i remember correctly: the SI is defined for a base of 10 always. not 2 and not 16. CPUs never work on a base of 10.

and: arenīt people in the īstates and the uk still using miles and ounces? - no rule without exceptions.
(correct me if i am wrong )

i prefer the 2^10 way when talking about bitsīnībytes. this is the way i remember it has always been...

And as a side-effect it makes calculations sooo much easier (if you ever did assembler / low-level c programming)
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #14  
Old March 14th, 2002, 05:04 PM
realnowhereman realnowhereman is offline
Not there when you need me
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Oct 2001
Location: Berlin, Germany
Posts: 1,438 realnowhereman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 46 sec
Reputation Power: 9
Quote:
Originally posted by The Ostrich
a convenient fiction, created by computer scientists who found that powers of 2 suited them better. It is, however, a non-SI usage of those prefixes.

SI is designed for metric units. Clearly metric units are unsuitable for computer storage ability (apart from tape and earlier stuff), since the design of a common computer operates with power-of-two values.

Of course you could force everyone to use the decimal stuff, but then you'd also have to use it in programming, OS (assembler) programming and hardware design. Very inconvenient, given the certainty that the new stuff wouldn't be compatible to the old stuff.

Quote:
Originally posted by M.Hirsch
And as a side-effect it makes calculations sooo much easier (if you ever did assembler / low-level c programming)

Yes. Going through thirty lines of rol, ror, shl, shr etc. would be even worse if you had to convert to decimal and back all the time.

Reply With Quote
  #15  
Old March 14th, 2002, 05:31 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 185
letz make a parallel-processor that does like 2^3+2 bits at once, anyone interested??

me neither.... humans are not compatible, cpus are

Reply With Quote