How to find modulus by simple calculation

Find modulus:

At first, the question is what is the modulus?
Modulus is the remainder after the division of one number by another number. Modulus is also called the remainder. For example, if we try to divide 5 by 2, we will have some remainder or modulus.
5/2 = 2 and 1 is remainder. Modulus is defined by mod.
We can find this remainder easily in c programming. We also can find quotient easily both calculator and using c programming. But sometimes there is no mod button in our scientific calculator. So the question is, how to find modulus by a simple calculation.

Suppose we have x mod y, that's means we have to find the modulus or remainder.
Here the rule is :

Dividend / Divisor = Quotient  
Quotient * Divisor = X
Dividend - X = Modulus 

For example:
X mod Y. We want to find out the value of mod.
Here X = 343 and Y = 23
Now we divide X by Y
The value is  X / Y = 14.913
We take the non-fraction value, that means only 14 (Integer part of the result).
Then we have to do 14 * 23
The multiply value is 14 * 23 = 322
Now we have to subtract this value  from 343(X)
Means 343 - 322 = 21
Now 21 is the modulus value.

Let look another small example:

Here 2 will go 12 times in 25. So Divisor 2 * Quotient 14 = 24 and then Dividend 25 - 24 = 1 Modulus.

In simple word, Modulus = Dividend - Divisor * Quotient.

Hope calculating modulus by simple calculation is now understandable.

Recommended  Post:

Modulus in c programming                                            

0/Post a Comment/Comments