Log in

View Full Version : size conversion. how to.


matrix
16th November 2003, 03:35
Forgive my ignorance but I'd like to know how to convert the sizes. Bytes, MB, GB?
For example the properties of a file: Size on disk: 4.36 GB (4,685,217,792 bytes). So what makes it 4.36 GB? And what would be the size in MB?

Thanks.

Prettz
16th November 2003, 05:10
1KB = 1024 bytes
1MB = 1024KB
1GB = 1024MB
1TB = 1024GB
ect...

2^10 is 1024, and since it was so close to 1000, people started using 1024 as 1KB. I assume you already know that every single aspect of digital electronics is based on binary. In binary, multiplying or dividing by powers of 2 can be accomplished simply by shifting the bits of a value to the left or right, making 1KB = 2^10 bytes very efficient for doing calculations.


edit: so if you have 4.5MB and you want to know how many bytes that is, just do 4.5 * 1024 * 1024.

matrix
16th November 2003, 20:28
Very helpfull explanation. I appreciate it.
Thank you very much.

mf
16th November 2003, 21:30
Of course there are also people pushing for the notation of:
1 kilobyte = 1000 bytes
1 kilo-octet = 1024 octets(bytes)
To confuse people more.

jggimi
17th November 2003, 00:39
One area where KB/MB/GB/TB values don't mean 1024, but actually mean 1000, is data storage capacity, particularly with hard disk drives (and, for our purposes, DVDs). With disk drive vendors, a Megabyte is one million bytes, and a Gigabyte is one billion (one thousand million) bytes. If you want values using the 1024 standard, you need to ask your vendor for engineering capacity, or you need to do the math yourself.

Among the DVD-R crowd, for example, their blank 4.7GB (1000) discs have 4.3GB (1024) capacity, and it's only due to to value of GB changing between vendor and user.

It's a little bit like buying Champagne, where "Extra Dry" is one of the sweeter varieties.

r6d2
17th November 2003, 00:40
Originally posted by mf
1 kilobyte = 1000 bytes
1 kilo-octet = 1024 octets(bytes)
In the begining, when computer related sizes were small, that 2.4% difference was neglillible. So HD manufacturers started using it to their advantage. They marketed drives as 1KB=1000 bytes, so disks would appear bigger to the users.

They still do. Even though the difference is not negliggible anymore. For instance, a 120-GB drive only has 112 actual "true" GBytes. 7% less than advertised.

When you asked a salesperson about that missing difference, they claimed it was because of "formatted capacity", which is just a plain and simple lie.

It's important to note that in some areas K usually means 1.000. Audio and video bitrates, for instance, are measured considered K=1.000. Also 48-KHz and 44.1-KHz. CPU speeds also have K=1.000 and M=1.000.000. Modem speeds too, and bandwidth.

RAM has been free from this lie because they cannot build multiple of 10 sized memories.

[Add]
Windows uses true 2^10 (1-KB) multiples when showing sizing of disks and files.

Removable media like 80-min CDs have 798 "actual" MB, but you can normally use 700-MB because of error correction data (which can be called indeed formatted capacity). 3.5" floppies also have true 1.44-MB formatted capacity.