| − | Numeric values represent numbers. Most programming languages provide both integer and real data types. Further, many languages support several sizes of both types of numbers. The default integer size usually depends upon the underlying hardware. On a 32-bit CPU, the default integer size will also be 32 bits. It is typical that the compiler will support a maximum integer size that is twice the underlying hardware word size (for instance, 64-bit integers on a 32-bit CPU), and a minimum integer size of 1 byte. Integers can be signed, or unsigned. Signed integers use the most significant bit as the sign (set to indicate negative, clear to indicate positive), thus a 16-bit signed integer can represent a number between -32768 and 32767, inclusive. An unsigned 16-bit integer can represent a number between 0 and 65535. Most languages use 2s-complement encoding for interpreting the underlying bits. | + | Numeric values represent numbers. Most programming languages provide both integer and real data types. Further, many languages support several sizes of both types of numbers. The default integer size usually depends upon the underlying hardware. On a 32-bit [[CPU]], the default integer size will also be 32 bits. It is typical that the compiler will support a maximum integer size that is twice the underlying hardware word size (for instance, 64-bit integers on a 32-bit CPU), and a minimum integer size of 1 byte. Integers can be signed, or unsigned. Signed integers use the most significant bit as the sign (set to indicate negative, clear to indicate positive), thus a 16-bit signed integer can represent a number between -32768 and 32767, inclusive. An unsigned 16-bit integer can represent a number between 0 and 65535. Most languages use 2s-complement encoding for interpreting the underlying bits. |
| | In a like manner, floating point values come in various sizes, depending upon the [[floating-point]] standard that is used. Typically ''single precision'' represents a 32-bit floating-point value, and ''double'' precision represents a 64-bit value. | | In a like manner, floating point values come in various sizes, depending upon the [[floating-point]] standard that is used. Typically ''single precision'' represents a 32-bit floating-point value, and ''double'' precision represents a 64-bit value. |