8.3 Integer Data Types
Integer values in the compiler are represented in 2’s complement and vary in size from 8 to 64 bits. These values are available in compiled code via limits.h.
Type | Bits | Min | Max |
---|---|---|---|
signed char |
8 | -128 | 127 |
char , unsigned
char |
8 | 0 | 255 |
short, signed short |
16 | -32768 | 32767 |
unsigned short |
16 | 0 | 65535 |
int, signed int, long, signed
long |
32 | -231 | 231-1 |
unsigned int, unsigned
long |
32 | 0 | 232-1 |
long long, signed long
long |
64 | -263 | 263-1 |
unsigned long long |
64 | 0 | 264-1 |