CS计算机代考程序代写 #######################################################################################################

#######################################################################################################
# Format: Whatever follows a ‘#’ is a comment.
# Uncommented lines must start w/ 32 characters of 0’s and 1’s (i.e., an instruction or data word)
#######################################################################################################
# instructions start here (first line is address 0)
00100000000000010000000001000000 # 0: ADDI $1, $0, 64 # $1 points to A[0]
00100000000000100000000001101000 # 1: ADDI $2, $0, 104 # $2 points to B[0]
00100000000000110000110000000000 # 2: ADDI $3, $0, 3072 # $3 points to C[0]
00100000000001000000000000001010 # 3: ADDI $4, $0, 10 # $4 holds the size of the array (10 elements)
00100000000001010000000000000000 # 4: ADDI $5, $0, 0 # $5 holds the counter (i) to loop over
00010000101001000000000000001001 # 5: BEQ $5, $4, 9 # if ($4 == $5) goto EOP
10001100001001100000000000000000 # 6: LW $6, 0($1) # $6 = A[i]
10001100010001110000000000000000 # 7: LW $7, 0($2) # $7 = B[i]
00000000110001110100000000100000 # 8: ADD $8, $6, $7 # $8 = A[i] + B[i]
10101100011010000000000000000000 # 9: SW $8, 0($3) # C[i] = $8
00100000101001010000000000000001 # 10: ADDI $5, $5, 1 # i ($5) is incremented
00100000001000010000000000000100 # 11: ADDI $1, $1, 4 # $1 points to A[i]
00100000010000100000000000000100 # 12: ADDI $2, $2, 4 # $2 points to B[i]
00100000011000110000000000000100 # 13: ADDI $3, $3, 4 # $3 points to C[i]
00001000000000000000000000000101 # 14: J 5 # Jump back up to the BEQ
11111100000000000000000000000000 # 15: EOP # End of Program
# Data goes below
00000000000000000000000000000001 # Word 16: A starts here (address 64)
00100000000000100000100000000000 # Word 17: A[1]
00100000000000100000100000000000 # Word 18: A[2]
00100000000000100000100000000000 # Word 19: A[3]
00100000000000100000100000000000 # Word 20: A[4]
00100000000000100000100000000000 # Word 21: A[5]
00100000000000100000100000000000 # Word 22: A[6]
00100000000000100000100000000000 # Word 23: A[7]
00100000000000100000100000000000 # Word 24: A[8]
00100000000000100000100000000000 # Word 25: A[9]
#
00000000000000000000000000000010 # Word 26: B starts here (address 104)
00100000000000100000100000000000 # Word 27: B[1]
00100000000000100000100000000000 # Word 28: B[2]
00100000000000100000100000000000 # Word 29: B[3]
00100000000000100000100000000000 # Word 30: B[4]
00100000000000100000100000000000 # Word 31: B[5]
00100000000000100000100000000000 # Word 32: B[6]
00100000000000100000100000000000 # Word 33: B[7]
00100000000000100000100000000000 # Word 34: B[8]
00100000000000100000100000000000 # Word 35: B[9]