Common datatype in many programming languages for representing both negative and non-negative whole numbers. Use this tag for questions about using, storing, or manipulating integers. For 64-bit integers, use the [long-integer] tag instead.
An integer is a whole number that can be negative, positive, or zero. For example, -2, -1, 0, 1, 2. In many programming languages, the integer data type is commonly represented as 32-bits, but may also be 64-bits (Usually referred to as the Long data type).
For 32-bit integers:
- The signed range is :
-2147483648to2147483647. - The unsigned range is :
0to4294967295.
For 64-bit integers:
- The signed range is :
-9,223,372,036,854,775,808to9,223,372,036,854,775,807. - The unsigned range is :
0to18,446,744,073,709,551,615.
For further reading, see the Wikipedia article on integers.