I am trying to write a code that makes it possible to add 2 numbers, even if they are 32 bits long. However my program won't work if I add two 32 bits numbers, or if I add two numbers that make a 32 bits number (like 2bi + 2bi). In thw first case I get an "Invalid Interger Input" error, and in the second case I get an "Arithmetic Overflow" error. I figured the 32nd bit is being used for the "+" or "-" signal. How can I fix this?
li $v0, 4
la $a0, primeiro.num #asks for the first number
syscall
li $v0, 5
syscall
move $s0, $v0
li $v0, 4
la $a0, segundo.num #asks for the second number
syscall
li $v0, 5
syscall
move $s1, $v0
blt $s1, $zero, erro_num_neg
add $s2, $s0, $s1