I found two examples that I'd like to understand:

**Example 1:** Find $112358132134 \mod 9$.

*Solution is:*
$1+1+2+3+5+8+1+3+2+1+3+4 \mod 9 = 7 \mod 9 = 7$

**Example 2:** Find $62831853 \mod 11$.

*Solution is:*
$(-6)+2+(-8)+3+(-1)+8+(-5)+3 \mod 11 = -4 \mod 11 = 7$

My question is: Based on what property we sum the digits of the number ( as Example 1) or subtract (as Example 2)?