As whole numbers, integers are closed under the operations of multiplication and addition, as well as subtraction, as negative values are involved. Integers are not closed under division, as integer division sometimes results in non-integer values. Additionally, integers are not closed in exponentiation, as negative exponents can result in non-integer values. However, integer division is similar to modulo division, as results are in whole numbers with whole number remainders. In computer programming, integers are data types that are most commonly used for incrementing, as well as a variety of counting algorithms. Integral types are either signed or unsigned. Integral data type examples include nibbles, bytes and n-bit integers.
Read More ยป
Get Techopedia delivered to your inbox!