Range of Integer Values

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at 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:

TypeMinimum and Maximum
unsigned short0 to 65535
signed short–32768 to 32767
unsigned long0 to 4294967295
signed long–2147483648 to 2147483647

Integers

Show: