The number of binary bits that make up a byte in a computer is 8 bits.
What are bytes?
Bytes are the basic coding units in computers. The most commonly used bytes are eight-bit bytes. The maximum number expressed in decimal is 255 (11111111) and the minimum is 0 (00000000). .
Bytes also have the following relationship: 1B (byte, byte) = 8 bit, 1KB=1024B; 1MB=1024KB=1024×1024B.
Extended knowledge:
Byte conversion:
ASCII code: One English letter (not case sensitive) occupies one byte of space. A sequence of binary numbers, used as a digital unit in a computer, is generally an 8-bit binary number. Converted to decimal, the minimum value is -128 and the maximum value is 127. For example, an ASCII code is a byte.
UTF-8 encoding: One English character is equal to one byte, and one Chinese character (including traditional Chinese) is equal to three bytes. Chinese punctuation occupies three bytes, and English punctuation occupies one byte.
Unicode encoding: One English code is equal to two bytes, and one Chinese character (including Traditional Chinese) is equal to two bytes. Chinese punctuation occupies two bytes, and English punctuation occupies two bytes.
The above is the detailed content of In a computer, the number of binary bits that make up a byte is. For more information, please follow other related articles on the PHP Chinese website!