title: Mips SLL operator
body: <p>I am trying to implement 2^15 and decrement by 1 with lls. I am basically trying to do 2^15,2^14,etc. and then print that value. However, i am having trouble and I can't figure out why. It stops after two iterations because it goes to 0. the output is (32768  16384   0   -16384  -32768  -49152  -65536  -81920 etc) Any suggestions? Thank you</p>
  <pre><code>   addi $s1, $zero, 2
  
  Loop2:
  beqz $s1, end2 #if 15 reches 0 than end
  sll $t1, $s1, 14
  #decrement by 1
  addi $s1,$s1,-1
  
  
  #add 1 into $v0 print
  addi $v0, $zero, 1
  
  #move ($s0) into $a0
  move $a0, $t1
  
  syscall
  </code></pre>