What Are Integers?
Integers are whole numbers that can be positive, negative, or zero. They do not include fractions or decimals. The set of integers is denoted by ℤ = {..., -3, -2, -1, 0, 1, 2, 3, ...}.
Addition: a + b | Subtraction: a - b
Multiplication: a × b | Division: a ÷ b
Modulo: a mod b (remainder after division)
Integer Division: a ÷ b (quotient only, no remainder)
Properties of Integer Arithmetic
- Closure: Adding/multiplying integers always gives an integer
- Commutativity: a + b = b + a, a × b = b × a
- Associativity: (a+b)+c = a+(b+c)
- Distributivity: a(b+c) = ab + ac
Integer Division and Modulo
Integer division gives the quotient without the remainder. Modulo gives only the remainder. Together, they completely describe division: a = (a ÷ b) × b + (a mod b).
Rules for Negative Integers
Negative × Negative = Positive. Negative × Positive = Negative. These rules apply to division too. For modulo with negatives, conventions vary by language.
How to Use
Enter two integers and select an operation. Results update in real time showing the result for all operations simultaneously.
Applications
Integer arithmetic is fundamental in computer science (array indexing, hash functions), cryptography (modular arithmetic), number theory, and everyday counting and measurement.