finding the remainder is the elementary school level mathematics. and for the most part the modular arithmetic is also pretty simple and straight forward, in simple terms it says perform the arithmetic as before but when you are done you should compute the remainder of the result instead.
Correct, I don't know why everyone is having a difficulty in understanding modulo operator and find it complicated, maybe because of the way I write the lecture and examples. If they are going to carefully examine the problem and the explanation of the first part of the lecture, they can understand it very well up to the very last example.
the hard part (which is not included here) is the optimizations used such as mathematical theories to solve modular multiplicative inverse, or something as simple as MultMod.
I did not consider including that topic here because you cannot easily solve modular multiplicative inverse if they do not understand the basic principle of modulo. That topic is very interesting and fun to solve. It is similar with
Division Algorithm and
Euclidean Algorithm.
I am thinking if I will going to create another post regarding those mathematical concept. Do you think it is a good idea @pooya87?
Thanks for having an interest in topic. It gives me hope, thank you so much.