ASCII code: an English letter (regardless of case) occupies one byte, and a Chinese character occupies two bytes. A sequence of binary numbers, as a digital unit in a computer, is usually an 8-bit binary number, which is converted into decimal. The minimum value is and the maximum value is 255. For example, an ASCII code is a byte.
UTF-8 encoding: one English character equals one byte, and one Chinese (including traditional) equals three bytes.
Unicode encoding: one English is equal to two bytes, and one Chinese (including traditional) is equal to two bytes.
symbol: English punctuation occupies one byte and Chinese punctuation occupies two bytes. For example, the English period "."accounts for 1 byte, and the Chinese period "." It is 2 bytes in size. Data storage is expressed in decimal system and data transmission is expressed in binary system, so 1KB is not equal to 1B.
1KB=124B; 1MB=124KB=124×124B。 Where 124=21.
1B(byte) = 8 bit (see below);
1KB(Kibibyte, kilobyte) = 124b = 2 1b;
1MB(Mebibyte, megabyte, megabyte for short) = 124kb = 2 2b;
1GB(Gigabyte, gigabyte, also known as "gigabit") = 124mb = 2 3b;
1TB(Terabyte, terabyte, terabyte) = 124gb = 2 4b;
1PB(Petabyte, petabyte) = 124tb = 2 5b;
1EB(Exabyte, billions of bytes, exabyte) = 124pb = 2 6b;
1ZB(Zettabyte, 1 trillion bytes, zebyte) = 124eb = 2 7b;
1YB(Yottabyte, 1 billion bytes, Yao byte) = 124ZB= 2^8 B;;
1BB(Brontobyte, 1 billion bytes) = 124yb = 2 9b;
1NB(NonaByte, one trillion bytes) = 124bb = 2 1b;
1DB(DoggaByte, one billion bytes) = 124nb = 2 11b; Take Visual Basic as an example to explain the bytes occupied by various data types. Data type storage space size (unit: Bytes) range byte (byte type) 1-255Boolean (Boolean/logical type) 2True or FalseInteger (integer type) 2-32,768-32767 long (long shaping) 4-2,147,483,648-2,147. 647Single
(single precision floating-point type) 4 Negative range:
-3.42823E38 ~ -1.41298E-45
Positive range:
1.41298e-45 ~ 3.42823E38Double
(double precision floating-point type). 32e38 ~
-4.94,656,458,412,47e-324
Positive number range:
4.94,656,458,412,47e-324 ~
1.797,693,197. 477.588 ~
922, 337, 23, 685, 477.587 Decimal (decimal type) 14:
+/-79, 228, 162, 514, 264, 337, 593, 543. 395,33,5
Minimum non-zero value:
+/-.,,,,,,,,,,,,,, 1 Date (time-date type) January 1, 81 to December 31, 999 Object (Object type) 4 Any object refers to String (variable length) 1 with a length from to about 2 billion String (fixed length) 1 with a length from 1 to about 65,4Variant (number) 16. The range of up to Double Variant (character) 22 has the same range as String length and variable-length string-an array of any data type needs 2 bytes of memory space, plus the dimension of each array accounts for 4 bytes, plus the space occupied by the data itself. The memory space occupied by data can be calculated by multiplying the number of data elements by the size of each element. For example, the data in a one-dimensional array composed of four 2-byte Integer data elements accounts for 8 bytes. These 8 bytes plus an additional 24 bytes make the total memory space required for this array 32 bytes.
a Variant containing an array needs 12 more bytes than a single array.