一个字节多少位?

一个字节多少位

1字节(byte) = 8位(bit)

  1. 在16位的系统中(比如8086微机) 1字 (word)= 2字节(byte)= 16(bit)
  2. 在32位的系统中(比如win32) 1字(word)= 4字节(byte)=32(bit)
  3. 在64位的系统中(比如win64)1字(word)= 8字节(byte)=64(bit)

另外,只有char类型是被规定为8位,其他数据类型都没有被强制规定具体位数

C类型 32 64
char 1 1
short int 2 2
int 4 4
long int 4 8
long long int 8 8
char* 4 8
float 4 4
double 8 8

文章转载于:https://www.cnblogs.com/roscangjie/p/11566668.html

你可能感兴趣的:(C语言,c语言,python)