title: LW and LB the same result
body: <p>I only want to have an array to calculate the sum of all numbers. I wasn't sure how to store each position into a variable, so I tried <code>lb $t5, ($s1)</code> and it worked, but when I changed it to <code>lw $t5, ($s1)</code> it works again. I know this isn't right, the <code>lw</code> command loads 4 bytes and the <code>lb</code> command 1 byte. I believe the proper solution is with <code>lw</code> because I increase the pointer 4 times. The <code>lb</code> souldn't work. The command is when the comment begins.</p>
  
  <pre><code>.data
  
  arr: .word 1, 15, 0, -3, 99, 48, -17, -9, 20, 15
  
  .text
  main:
  
  addi $s0, 10 #size=10
  addi $t0, 0 #sum =0
  addi $t4, 0
  
  la $s1, arr
  
  Loop:
  slt $t3, $t4, $s0
  beq $t3, $zero, End
  
  
  
  lb $t5, ($s1) ##########   HERE  ##############
  li $v0, 1 
  move $a0, $t5
  
  
  add $t0, $t0, $t5
  
  add $t4, $t4, 1 
  addi $s1, $s1, 4
  j Loop
  
  
  End:
  
  li $v0, 1 
  add $a0, $t0, $zero
  syscall
  
  li $v0,10
  syscall
  </code></pre>