How storage is computed on a drive, a tutorial of sorts

Hardware discussions that do not yet fit into one of the current Hardware fora.

Moderator: Hardware Moderators

How storage is computed on a drive, a tutorial of sorts

Postby Spock » Wed 2005 Mar 02 1:31

This topic was copied from the old forum. It was originally Posted: 2003-04-11, 4:35 pm

I was in another forum and one of the members asked, "I have originally 8.4GB of HD space, and now I found out that I only have 7.8GB of space, if using 1024, the computer should show 8.2GB, what are my other 400MB space gone to? HELP!! How do I recover back?"

There were several answers, including the fact that the system swap file takes up a lot of space and is generally not visible. I also added my 2¢ and thought it might be instructive to our users here to repeat them. I apologize in advance for the length of this post. In fact, I will make this 2 posts to break it up a bit. [^_^]
User avatar
Spock
Forum Admin
Forum Admin
 
Posts: 2417
Joined: Tue 2005 Jan 18 10:47
Location: MD, USA

Postby Spock » Wed 2005 Mar 02 1:32

It also has to do with the fact that Computers (and computer techs) count in binary and computer sales talk in decimal. My students have trouble with this all the time. It only requires a little "Computer Math" to explain.

Let me see if I can condense this enough to fit into a nominal post ...


Binary:
There are only 2 states with a single binary bit: on or off, 1 or 0.
The highest single binary digit (bit) is one.
If you add 1 to 1 you get 10.

4 bits = 1 nybble
8 bits = 2 nybbles = 1 byte = 1 character or number.

working with bytes only, they increase by doubling (If you want to know why and don't already know, that can be another post.) Therefore the progression of number of bytes goes:

1
2
4
8
16
32
64
128
256
512
1024 = 1 KB

1024 was named 1 KB to help keep track of larger numbers easier. the terminology is borrowed from Decimal where:

kilo = 1,000
mega = 1,000,000
etc.

1KB = 1024 almost equals kilo = 1000.
The confusion comes in when getting to higher numbers.

64KB = 65535 (Why does it come out to be 65536 when you do the math then!? Because zero counts as one of the possible combinations)

0 through 65535 = 65536 possible combinations.

128KB = 131072 bytes (Oh, alright, I will use the total number of posible combinations then!)
256KB = 262144 bytes
512KB = 524288 bytes
1024KB = 1,048,576 bytes = 1MB
64MB = 67,108,864 bytes
1024MB = 1,073,741,824 bytes = 1GB

To a computer tech 1,073,741,824 bytes is 1GB, to a salesman seeing that number (and wanting to sell more systems!) the same number is 1.07GB ... not quite the same. Only a small difference of over 73 million bytes!

It keeps getting worse the further you go. If you format a floppy disk, and it has no errors on it, you get 1,457,664 bytes of usable space.

My only question is, "Why didn't the sales people call that 1.45MB instead of 1.44?"

If you divide 1,457,664 by 1024 and then by 1024 again, you come up with 1.390... which is close to the 1.38MB reported when you ask for disk properties on a floppy disk. Obviously Computer Techs wrote that code.

Q. Why does my floppy disk have such an odd number of bytes on it?
A. Simple physical geometry. That's all that will fit.

Q. Then why is it that my HD has an exactly even number of MB/GB on it?
A. It doesn't. Even when you format a HD and get the max number of storage available, it may come close, perhaps even a bit over, but there is still room on the disk outside the formatted area that certain programs can take advantage of.

Q. If that is true, then what is the largest amount of storage space I can get on a floppy?
A. There is a program, called WinImage, that will format a standard HD floppy to 1.44MB. It will also format the same disk to 1.68MB, 1.72MB, or (in special circumstances) to 2.88MB! The largest I've ever had any luck with is 1.68MB, which, BTW, is the size M$ used to format all the initial Win95 installation disks, except the first one, so no one would be able to copy them ...
User avatar
Spock
Forum Admin
Forum Admin
 
Posts: 2417
Joined: Tue 2005 Jan 18 10:47
Location: MD, USA

Postby Uhura » Thu 2005 Mar 03 10:29

Very, very helpful [cg] ...will probably refer to it every so often to remind myself how it all works [roll] [i017] ...I am still really a novice at a lot of things & mostly just a user not yet a techie! (Just a Trekkie!) [mrg]
Sometimes you feel like a nut
User avatar
Uhura
Forum Admin
Forum Admin
 
Posts: 65
Joined: Tue 2005 Feb 01 1:13
Location: Somewhere out there


Return to General HW

Who is online

Users browsing this forum: No registered users and 1 guest

cron