When discussing disk storage, a gigabyte is equal to 1,000 megabytes, meaning that the gigabyte is the larger of the two. However, because computers are really based on the binary system rather than the decimal system, the actual numbers are slightly different when applied to processor storage.
When used in discussions of disk storage capacity, a megabyte equals one million bytes, and a gigabyte equals one billion bytes. For most people, this definition is sufficient. However, in discussions of virtual and real processing power, a megabyte is computed according to the binary system and actually refers to 2 to the 20th power, or 1,048,576, bytes. Under this system, a gigabyte is 1,024 megabytes, which is 2 to the power of 10.
Gigabytes are larger than megabytes, which are larger than bytes. 1 GB is equal to 1,000 MB. Enjoy!
http://www.kgbanswers.com/whatisbiggermegabyte...

Just my alternative, short and clean: /* * @param int $bytes Number of bytes (eg. 25907) * @param int $precision [optional] Number of digits after the decimal point (eg. 1) * @return
http://stackoverflow.com/questions/2510434/format...
