title: Understanding The Modulus Operator %
body: <p>I understand the Modulus operator in terms of the following expression:</p>
  
  <pre><code>7 % 5
  </code></pre>
  
  <p>This would return 2 due to the fact that 5 goes into 7 once and then gives the 2 that is left over, however my confusion comes when you reverse this statement to read:</p>
  
  <pre><code>5 % 7
  </code></pre>
  
  <p>This gives me the value of 5 which confuses me slightly. Although the whole of 7 doesn't go into 5, part of it does so why is there either no remainder or a remainder of positive or negative 2? </p>
  
  <p>If it is calculating the value of 5 based on the fact that 7 doesn't go into 5 at all why is the remainder then not 7 instead of 5?</p>
  
  <p>I feel like there is something I'm missing here in my understanding of the modulus operator.</p>