
The width or precision of an integral type is the number of bits in its representation. The order of the memory bytes storing the bits varies see endianness. The most common representation of a positive integer is a string of bits, using the binary numeral system. Unlike mathematical integers, a typical datum in a computer has some minimal and maximum possible value. The internal representation of this datum is the way the value is stored in the computer's memory.

Some programming languages also permit digit group separators. Some programming languages allow other notations, such as hexadecimal (base 16) or octal (base 8). Īn integer value is typically specified in the source code of a program as a sequence of digits optionally prefixed with + or −.


Integral types may be unsigned (capable of representing only non-negative integers) or signed (capable of representing negative integers as well). The value of an item with an integral type is the mathematical integer that it corresponds to.
