title: Modulo of a negative number
body: <p>Consider the following expression:</p>
  
  <pre><code>(a - b) mod N
  </code></pre>
  
  <p>Which of the following is equivalent to the above expression?</p>
  
  <pre><code>1) ((a mod N) + (-b mod N)) mod N
  
  2) ((a mod N) - (b mod N)) mod N
  </code></pre>
  
  <p>Also, how is (-b mod N) calculated, i.e., how is the mod of a negative number calculated?</p>
  
  <p>Thanks.</p>