Integer is also a data type in a variety of programming languages.

In Visual Basic, the integer data type stores whole numbers, requires 2 bytes of memory, and can store values from -32,768 to 32,767 (215 - 1).

In C, the integer data type is known as int. The length of this type can vary depending on your operating system and compiler. On most UNIX machines, the int data type is 32 bits (4 bytes) long, thus supporting values from 2147483647 (231 - 1) to 2147483648. Additionally, it can have the same values and size as the Visual Basic Integer type.


Thus, you can see that the range of values supported are decided by this formula:

2Number of bits used - 1 - 1

Through

-(2Number of bits used - 1)