Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How are units such as bytes, kb and mb converted?
How are units such as bytes, kb and mb converted?
Official standard:

Usually, B is called byte, B is called word bit, KB is called kilobyte, MB is called megabyte, and GB is called gigabyte.

1 Chinese character =2 bytes; 1 English character = 1 byte; 1 byte = 8 words = 8 binary numbers; 1 bit = 1 binary number.

1KB= 1024B

1MB= 1024KB

1GB= 1024MB

Extended data

1, byte data type

Byte Byte type is stored in one byte, which can distinguish 256 numbers, with values ranging from 0 to 255. Byte is an unsigned type from 0 to 255, so it cannot represent negative numbers.

2. Byte language characters

The effect is equivalent to unsigned char type, typedef unsigned char BYTE, and a new byte type is defined, which is actually unsigned char. In VC++, the definition of byte data is contained in the header file of windows.h, with code # include.

In java, byte is a keyword, which means that an integer constant occupies one byte in the content, and the value range is-128~ 127.

Baidu encyclopedia-bytes