Modulo Calculator

 
Modulo

Remainder  =  2
Full calculation  =  
17 is equal: (3 × 5) + 2
CALCULATE
CALCULATE

Modulo Calculator?

    Modulo Calculator uses values of two real numbers, to find out the remainder after division of one number by another. This is often used by programmers and computer scientists.
    A modulo calculator is a tool that helps to compute the result of modulo operations on two numbers. It is necessary to follow the next steps:
  • Enter the value of the dividend;
  • Enter the value of the divisor. This value can not be zero;
  • Press the ”Calculate” button to make the computation.
Modulo Formula:
The mod operator is defined as
a mod b = a − b × ( a b ) , b ≠ 0

where ( ab ) is the greatest integer less than or equal to ab.

What is modulo operation?

    When we divide two integers a and b, we write
a b = q     (r),
where a is the dividend, b is the divisor, q is the quotient, and r is the remainder.
    Sometimes, we only want to find what the remainder is when we divide two numbers. For these cases, there is an operator called the ”modulo operator” (abbreviated as ”mod”).
    Therefore, from the above equation, we have
a mod b = r,
    i.e. a modulo b is equal to r, where b is referred to as the modulus. The word ”modulo” comes from a Latin word ”modus” meaning a measure. When we use the word modulo, we mean the modulo operation, or simply finding the remainder.
    Many programming languages, and calculators, have a mod operator, represented with the % symbol. If we calculate the result of a negative number, some languages will give us a negative result.

How to calculate the modulo operation?

    Let us calculate the modulo operation by hand. Calculate 150 mod 4 by hand.
  • Choosing the first number, 150. This is our dividend;
  • Choose the divisor, 4;
  • Divide one number by the other, rounding down: 150 / 4 = 37. This is the quotient. This is an integer division.
  • Multiply the divisor by the quotient. So, 4 × 37 = 148;
  • Subtract this number from the dividend. Hence, 150 - 148 =2. This number is the result of the modulo operation. So, we can write
150 mod 4 = 2
    There are many applications of modulo operation from everyday life to math and science problems.
    Since any even number divided by 2 has a remainder of 0, we can use modulo to determine the evenness of a number.
    Another application of modulo is in clock arithmetic. The 12-hour clock operates on an infinite set of integers, that is, 1 to 12. These numbers go round in a circle and wrap around 12. This 12 is the modulus. After 12 o’ clock, it starts over at 1 again, so when it is 13 o’ clock, it is actually 1 o’ clock.
    Modulo is also useful in many real-life situations. For instance, assuming that there are 22 slices in a big party pizza and we are a group of four. How many slices are left when we share the pizza equally?

Modulo Congruence and its Properties

    Congruences are an important tool for the study of divisibility. If a and b are integers and n > 0, then they are congruent modulo n, ab (mod n) if their difference a − b is integrally divisible by n, i.e. n | (b − a). We read this as ”a is congruent to b modulo (or mod) n”. That means, if a ≡ b (mod n), then b = a + nq for some integer q, and conversely.
    For any integers a and b, and positive integer n, we have:
  • aa (mod n) (Reflexivity);
  • if ab (mod n), then ba (mod n) (Symmetry);
  • if ab (mod n) and bc (mod n), then ac (mod n) (Transitivity).
In other words, a and b are congruent modulo n when they both have the same remainder when divided by n:
a mod n = r
b mod n = r,
where r is a common remainder.
    We can say that any number is congruent mod n to its remainder when divided by n. We can now show some useful algebraic properties of congruences. Briefly, congruences can be added and multiplied.

Theorem. If ab mod n and cd mod n, then
    (1) a + cb + d mod n;
    (2) a × cb × d mod n.