char int :有符號 uint:無符號 ...
char |
2^7=128 | ||
unsigned char | 2^8=256 | ||
short | 短整數 2個位元組 16個比特 | 2^15=32768 | -32768~32767 |
unsigned short | 2^16=65536 | 0~65535 | |
long | 長整數 4個位元組 | 2^31=2147483647 | |
unsigned long | 2^32=4.2949673e9 | ||
int | 4個位元組 | ||
int :有符號
uint:無符號
1 /********************************************************************************************************* 2 工程代碼定義格式*********************************************************************************************************/ 3 typedef unsigned char BOOLEAN; 4 typedef unsigned char INT8U; 5 typedef unsigned char uint8; /*後面的數字指的是變數所占的比特*/ 6 7 typedef signed char INT8S; 8 typedef signed char int8; 9 10 typedef unsigned short INT16U; 11 typedef unsigned short uint16; 12 13 typedef signed short INT16S; 14 typedef signed short int16; 15 16 typedef unsigned long INT32U; /* */ 17 typedef unsigned long uint32; 18 19 typedef signed long INT32S; 20 typedef signed long int32; 21 22 typedef float FP32; 23 typedef double FP64; 24