title: mips error immediate value (2147483647) out of range (0 .. 65535)
body: <p>Hi so this line of code is particularly giving me a hard time. <code>andi $13,$12,0x800</code>. The rest of the program seems to work fine. Where I shift using <code>sll $12,$12,1</code> to get the rest of the bit. But for some reason I am miscounting the number of 0's in the integer value. Oh yea the purpose of the program is to count the number of leading 0's in an integer number then print out the number of 0's.</p>
  
  <pre><code>andi $13, $12, 0x8000     
  bne  $13, $0, endp         
  addi $10, $10, 1
  sll  $12, $12, 1           
  b    pos
  </code></pre>
  
  <p>any ideas about why 0x8000 is only counting it 5 times. Better yet I don't fully understand how the immediate works. Thanks in advance</p>