Range of Integer Values
ANSI 3.1.2.5 The representations and sets of values of the various types of integers
Integers contain 32 bits (four bytes). Signed integers are represented in two's-complement form. The most-significant bit holds the sign: 1 for negative, 0 for positive and zero. The values are listed below:
Type |
Minimum and Maximum |
---|---|
unsigned short |
0 to 65535 |
signed short |
–32768 to 32767 |
unsigned long |
0 to 4294967295 |
signed long |
–2147483648 to 2147483647 |