title: How to translate I-type instruction to its 32-bit representation?
body: <p>Given the following instruction:</p>
  
  <p>addi $s0, $0, −10 </p>
  
  <p>I need to compute it's 32-bit representation. Since addi is I-type instruction</p>
  
  <p>the opcode for addi is 001000.</p>
  
  <p>Rs is $0, which is 00000</p>
  
  <p>Rt os $s0, which is 10000</p>
  
  <p>how do i compute the remaining 16 bit for -10? I converted 10 to binary and found its one's and two's complement and added a 1 (negative bit) to the leftmost side. </p>
  
  <p>I got 001000 00000 10000 1000000011110110 which translates to 0x201080F6, but it is incorrect. </p>
  
  <p>What am i doing wrong? </p>