title: Comparing characters in MIPS, and doing character arithmetic
body: <p>Basically, I want to compare two characters using a branching statement in MIPS. Although I am not really sure as to what instructions to use for this. Anyways I will show my pseudo code I wrote for it in C. </p>
  
  <pre><code>The array M contains characters.
  if(M[i] &gt;= "0" &amp;&amp; M[i] &lt;= "9")
  {
      ascii_to_bin += M[i] - "0"
  }
  </code></pre>
  
  <p>That is just one of the if statements, but it encapsulates every question I have at the moment. I don't know which instructions to use when making the comparison in the conditional statement. Furthermore, the line <code>$ascii_to_bin += M[i] - "0"</code>; do not really know how to do character arithmetic in MIPS. </p>