I have a project that I'm struggling with and I can't figure out the error in my code (I'm fairly new to MIPS btw). Given a function, F = (A*B) xor (C*D), I have to compute the full truth-table as a and count the number of one values (minterms) in standard truth table for F. The output should be displayed on the display console. Here is my code: 

```
.data
space: .asciiz " "
str: .asciiz "The number of minterms in F is: "
newline: .asciiz "\n"
.text

li $t0, 0       #A = 0
li $t1, 0       #B = 0
li $t2, 0       #C = 0
li $t3, 0       #D = 0
li $t4, 0       #counter = 0

loop:
and $t5, $t0, $t1   #$t5 = A and B
and $t6, $t2, $t3   #$t6 = B and C
xor $t5, $t5, $t6   #$t5 = (A and B) xor (B and C)
add $t4, $t4, $t5   #Increment the counter by 1 if F = 1

li $v0, 1

move $a0, $t0       #Print out the values of A, B, C, D, and F
syscall 
move $a1, $t1 
syscall
move $a2, $t2 
syscall
move $a3, $t3 
syscall
la $a0, space 
syscall
move $a1, $t5 
syscall
la $a2, newline
syscall

testA:                  #Test to see if A should be inversed
beq $t1, 1, testCforA           #If B = 1, test to see if C = 1
j testB                 #If B = 0, test to see if B should be inversed
testCforA: beq $t2, 1, testDforA    #If C = 1, test to see if D = 1
j testB                 #If C = 0, test to see if B should be inversed
testDforA: beq $t3, 1, inverseA     #If D = 1, A should be inversed
j testB                 #If D = 0, test to see if B should be inversed

inverseA:               #Inverse bit A
beq $t0, 1, end             #If A = 1, then end the loop because the truth table is completed
li $t0, 1               #If A = 0, then change it to make A = 1

testB:                  #Test to see if B should be inversed
beq $t2, 1, testDforB           #If C = 1, test to see if D = 1
j testC                 #If C = 0, test to see if C should be inversed
testDforB: beq $t3, 1, inverseB     #If D = 1, B should be inversed
j testC                 #If D = 0, test to see if C should be inversed

inverseB:               #Inverse bit B
beq $t1, 1, invB            #If B = 1, then change it to make B = 0
li $t1, 1               #If B = 0, then change it to make B = 1
j testC             
invB: li $t1, 0

testC:                  #Test to see if C should be inversed
beq $t3, 1, inverseC            #If D = 1, C should be inversed
j inverseD              #If D = 0, inverse bit D but DON'T inverse bit C

inverseC:               #Inverse bit C
beq $t2, 1, invC            #If C = 1, then change it to make C = 0
li $t2, 1               #If C = 0, then change it to make C = 1
j inverseD
invC: li $t2, 0

inverseD:               #Inverse bit D
beq $t3, 1, invD            #If D = 1, then change it to make D = 0
li $t3, 1               #If D = 0, then change it to make D = 1
j loop                  #jump back to the beginning of the loop
invD: li $t3, 0
j loop                  #jump back to the beginning of the loop

end:                    #termination of the program
la $a0, str             #Print the number of minterms from the truth table
syscall
move $a0, $t4
syscall

```

The error I keep getting is: 

> 
> 00002685009922685009922685009920000268500992268500992268500992000026850099226850099226850099200002685009922685009922685009920000268500992268500992268500992000026850099226850099226850099200002685009922685009922685009920000268500992268500992268500992111126850099226850099226850099211112685009922685009922685009921111268500992268500992268500992111126850099226850099226850099211112685009922685009922685009921111268500992268500992268500992111126850099226850099226850099211112685009922685009922685009922685009946
>  -- program is finished running (dropped off bottom) --
> 
> 
> 

Any insight would be SOO much appreciated! Thank you!!