Confused about modular notations I am little confused about the notations used in two articles at wikipedia. 
According to the page on Fermat Primality test
$
a^{p-1}\equiv 1 \pmod{m}$ means that when $a^{p-1}$ is divided by $m$, the remainder is 1. 
And according to the page on Modular Exponential
$c \equiv b^e \pmod{m}$ means that when $b^e$ is divided by $m$, the remainder is $c$. 
Am I interpreting them wrong? or both of them are right? Can someone please clarify them to me? 
Update: So given an equation say $x \equiv y \pmod{m}$, how do we interpret it? $y$ divided by $m$ gives $x$ as remainder or $x$ divided by $m$ gives $y$ as remainder? 

Congruence is similar to equations where they could be interpreted left to right or right to left and both are correct.
Another way to picture this is:
a ≡ b (mod m) implies there exists an integer k such that k*m+a=b

There are various ways to visualize a (mod m) number system as the integers mod 3 could be viewed as {0,1,2} or {-1,0,1} as 2≡-1 (mod 3) to give an example here.
Another point is that the (mod m) is applied to both sides of the congruence.  For example, in dealing with polar coordinates, the angle co-ordinate would be a good example of the use of a modular operator as 0 degrees is the same as 360 degrees is the same as 720 degrees as the only difference is the number of rotations to get that angle.

But the problem the same equation a ≡ b (mod m) is interpreted as k*m
  + a = b and k*m + b = a in the two articles.

If there exists a k such that k*m+a=b then there also exists a -k such that a=b-k*m if you remember that in an equation one can add or subtract an element so long as it is done on both sides of the equation.  Thus, while the constant is different there does exist such a term.
Casting out nines would be a useful exercise if you want some examples where m=9.
