Trying to rub the dust from my math knowledge, I am trying to understand, or perhaps recall, the Modular Arithmetic and Modulo Operation but I kinda can't get what the differences are between these two is ? From Wikipedia :

This section is about the (mod n) notation. For the binary mod operation, see modulo operation.

The link here


The modulo operation (I will use $\%$ for that here) is an operation, like addition, subtraction, multiplication and division. It is something you do to two numbers to get a result. For instance, $12\mathbin\%10 = 2$.

Modular arithmetic uses a relation, like equals, less-than and divides. It is something you do to compare two numbers. For instance, $12\equiv 2\pmod{10}$. Note that $\pmod{10}$ here is part of the $\equiv$. It might be clearer if we write something like $12\equiv_{10}2$, although that's not standard notation.

Arithmetic modulo $10$ means, somewhat simplified, "Use ${}\mathbin\%10$ on everything, all the time, before you compare them with $=$."

  • $\begingroup$ One difference is that you can write $72\equiv 42 \pmod{10}$ but not $72\mathbin\%10 = 42$ nor mod(72,10)=42 $\endgroup$ – Henry Apr 27 '18 at 7:56
  • $\begingroup$ @Henry Although you do have $72\mathbin\%10 = 42\mathbin\%10$. In fact, one might take this as the definition of $\equiv_{10}$. $\endgroup$ – Arthur Apr 27 '18 at 7:58

Modular arithmetic is a different kind of arithmetic where your operation is a modulo operation. When you look at the clockface you count modulo $12$. When we count the weeks of a year we count modulo $52$. Modular arithmetic utilizes this "wrapping around" idea, after you reached the greatest element comes the smallest. So modular arithmetic is a sort of a mindset.

A binary operation is an operation which combines two elements, for example addition is a binary operation since it combines two elements. Even when you add three things together you always do it by twos, that is $$ 3+4+5=7+5=12 $$ you always operate only on two numbers.

So to recap $(\bmod n)$ means that whenever you operate on elements so you will set the $n$th element equal to the first. And a binary modulo operation is the operation itself you use.

Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.