.data result: .word 0x00 n: .word 3 .text li $t0, 1 lw $t1, n li $t3, 2 loop1: bltz $t1, end add $t2, $t2, $t0 sll $t0, $t0, 1 sub $t1, $t1, 1 j loop1 end: sw $t2, result