title: MIPS How do I convert a j instruction to machine code?
body: <p>I need to convert this jump to binary and I can't figure out how to get the immediate value. I tried doing it by taking the base address of the Loop which was assumed to be 40000 then divide it by 4 (40000 / 4 = 10000) but I don't know if this is correct (That was just how they did it in an example in my book).</p>
  
  <pre><code>    Loop: slt $t0,$s0,$s1
            beq $t0,1,Exit
            sub $s0,$s0,$s1;
            j Loop;
      Exit:
  </code></pre>