The size of the computer stores information, the most basic unit is byte, a Chinese character consists of two bytes, letters and numbers are composed of a byte.
Units of capacity are from small to large: bytes (B), KB, MB, GB, TB. The relationship between them is.
1tb=1024gb
1gb=1024mb
1mb=1024kb
1kb=1024 bytes
Usually people use the simple name, the back of the "B" removed, so you ask the 1GB is 1024
recursively, and then calculates their size and that is the entire file directory.
Because the file size that is returned directly is in bytes, we generally have to convert to the size we usually get, and here is the function of the unit conversion:
The code is as follows
Copy Code
function Sizeformat ($size){$sizeStr = ';if ($size {return $size. "bytes";}else if ($size {$size =round ($size/1024,1);return $size. " KB ";}else if ($size {$size =round ($size/(1024*102
The smallest base unit is byte. Not many people do not know, the following first in order to give all units
Byte, KB, MB, GB, TB, PB, EB, ZB, YB, DB, NB
I only know the top five, and most people know that, according to the rate of 1024 calculation
40 1tb=2 byte=1099511627776 Byte of the second order
1pb=2 's 50-time Square Byte=1125899906842624byte
60 1eb=2 byte= 1152921504606846976 Byte of the second order
, pronounced "Y-byte"There are also legends.1NiB (Nonabyte) =1024yib, which is 2 of 90 square bytes1DiB (Doggabyte) =1024nib, which is 2 of 100 square bytes1CiB (Corydonbyte) =1024dib, which is 2 of 110 square bytesNote: A lot of information on the Internet has the nib and Dib reversed. NB is not the largest, more than NB is the db, haha! And the bigger is CB.We must see Icech above is not the title of the Mb/gb
What is the storage unit of a computer?
Computer storage units are generally expressed in bit, Byte, KB, MB, GB, TB, PB, EB, ZB, BB,
We often refer to the byte abbreviation as B and ask K for the KB abbreviation. What a few k, what a few B.
Two, what is their conversion relationship? 1, the smallest unit in which the computer stores information: bit bit (bit) (Binary Digits): holds a binary number,
The size of the php statistics file, which is measured in GB, MB, KB, and B. Use the filesize () function command to calculate the file size. the value 1 must be an output of GB, MB, KB, and B. 2. the order of magnitude must be greater than 1 and less than 1024, and two decimal places must be retained. use the filesize
1 TB = 1024 GB 1 GB = 1024 MB 1 MB = 1024kb 1kb = 1024 byte note: byte means B, that is, byte KB is a kilobytes of MB, that is, GB is a Gigabit, that is, a gigabit. Generally, they can be viewed as a kilobytes of data, the accurac
In the computer newspaper, the Dutch bank's 20 data centers have about 7PB of disk and more than 20PB of tape storage, and the annual growth of 50%~70% reserves,
So want to see how much PB, calculate 27pb about 400,000 80 of the hard disk size.
1Byte = 8 Bit (0,1)
1 KB = 1,024 Bytes (size of a shortcut)
1 MB = 1,024 KB = 1,048,576 Bytes (size of a floppy disk)
1 GB = 1,024
Having stayed at school, I went over PhP and looked at the previously written functions. I suddenly wanted to write the known file size and sort the data.
For example: 1.3G, 153 MB, 458kb, 998 m, 0.99g (the difference between MB and MB is not considered here, and generally does not involve the operation of MB, so
I learned the fread reading command and used the filesize function. when I knew that this function was useful, I used it to compile the statistics file size function and used the filesize () function command to collect statistics on the file size, requirements: 1, with one output in GB, MB, KB, and B; 2. the order of magnitude must be greater than 1 and less than 1024, and two decimal places must be retaine
How can we sort 10 GB files (one number per row) in MB of memory? How can I find 10 GB files? How does one calculate the number of times each keyword appears in a 10g File? How does one sort 10G files by MB in memory (one number per line? How can I find 10 GB files? How to c
Android get folder, file size in B, KB, MB, GBpublic class Filesizeutil {public static final int sizetype_b = 1;//Gets the double value of file size unit B public static final int sizety pe_kb = 2;//Gets the file size in kilobytes of double value public static final int sizetype_mb = 3;//Gets the file size unit to MB Double value public static final int sizety PE_GB = 4;//Gets the file size unit is a double
In the computer newspaper, the Dutch bank's 20 data centers have about 7PB of disk and more than 20PB of tape storage, and the annual growth of 50%~70% reserves,So want to see how much PB, calculate 27pb about 400,000 80 of the hard disk size.1Byte = 8 Bit1 KB = 1,024 Bytes1 MB = 1,024 KB = 1,048,576 Bytes1 GB = 1,024 MB = 1,048,576 KB = 1,073,741,824 Bytes1 TB =
Storage Capacity Unit: Bit, Byte, KB, MB, GB, TB, PB, EB, ZB, YB, zbyb
I recently read the Hadoop authoritative guide book, which has been designed by many organizations,
However, my previous books seem to only teach GB,
The current textbooks may be terabytes or petabytes of data, but I'm not sure. However, in the near future, there may be larger units that ca
Use the filesize () function command to calculate the file size. The value 1 must be an output of GB, MB, KB, and B. 2. the order of magnitude must be greater than 1 and less than 1024, and two decimal places must be retained;Start:Copy codeThe Code is as follows:$ Len = filesize ("1. rmvb ");$ I = 4;While ($ I ){If ($ out = $ len/pow (1024, $ I)> 1.0 | $ I = 1 ){Switch ($ I ){Case 4: {printf ("%. 2f TB", $
This article mainly introduces the PHP implementation of byte-byte conversion to KB, MB, GB, TB method, combined with an instance of PHP for the byte count of the conversion operation of the specific implementation method, involving the use of PHP mathematical operations related functions, the need for friends can refer to the next
This article describes the PHP implementation of byte bytes converted to KB
You can share resources with your friends in just a few steps!
1. Select a file you want to upload.
2. Enter your email address and Click Upload.
3. Get and extract the code and copy it to your friends.
Test version trial rules:1. The size of the registered user space is 5 GB (including 1 GB permanent space, 20 mb for a single file, 4
This is a PHP program to get the size of the file and the file according to the size of the file display GB,MB,KB code code is very smart code, the code is as follows:
function Sizecount ($filesize) {
if ($filesize >= 1073741824) {
$filesize = Round ($filesize/1073741824 * 100)/100. ' GB ';
} elseif ($filesize >= 1048576) {
$filesize = Round ($filesize/1048
In a file-processing system, it is easy to get the size out of some system's own method, the problem is that the size is often just a byte B.If you want to convert this byte number to a KB, MB, GB final rendering to the user, it involves the arithmetic operation of dividing and taking the remainder.Here's how:public static String getprintsize (long size) {///If the number of bytes is less than 1024, it is d
Today in doing a network audit log when required to export the report, there is a mail attachment file size, the database is bytes byte number, the request to convert to KB display, use the following function, quite to the force, special to share.
function Sizeformat ($bytesize) {$i = 0;When the $bytesize is greater than 1024 bytes, start the loop, when the loop jumps to the 4th time;while (ABS ($bytesize) >=1024) {$bytesize = $bytesize/1024;$i + +;if ($i ==4) break;}The BYTES,KB,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.