title: Use the floating point instructions to get results in decimal
body: <p>Hi I'm coding a small program in MIPS that divide 2 between 9 and show the result.This is the code</p>
  
  <pre><code>li $t1, 2
  li $t2, 9
  li $v0, 2
  div $t0,$t2,$t1
  move $a0,$t0
  syscall
  </code></pre>
  
  <p>(this is not the full code, just the section handling division)</p>
  
  <p>So, 2 / 9 is 0.2222222222222222</p>
  
  <p>But when I run it I only get 0.0</p>
  
  <p>How I show the true result (0.2222222222222222)?</p>
  
  <p>I've been said that I'm using integer instead of floating point, that I must use the floating point instructions to get results in decimal. That I should look up the div.x instruction, but div.x is not a recognized operator.</p>
  
  <p>So, I'm pretty much in blank. I don't understand what to do.</p>
  
  <p>Could someone post the code to show the floating point result?</p>
  
  <p>Thanks in advance.</p>