ECE 366: Computer Organization- Fall 2018 Program #2 write a MIPS assembly programs and verify that they run correctly with the simulator MARS that does the following Count how many "best matches" exist in an array of 20 patterns, to a given target pattern (T). Input/ Output: (assuming the "compact" memory configuration from MARS >Setting) The target pattern of T should be a 32-bit value in data memory location Ox2000 The array of 20 patterns (Pattern_Array) should be given in data memory, starting from location 0x200C, containing 20 words. The results (best match score, best_match_count) should be written back in memory at location 0x2004, and 0x2008, respectively (see below for an example). data T: word 12 best matching-score.word-1 # best score ? within [0, 32] best-matching-count: 'word-1 # how many patterns achieve the best score? Pattern Array: .word 0,1, 2, 3, 4, 5, 6, 7,8,9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20 . . .text # Your code goes here About Matching The highest possible matching score is 32, meaning the two 32-bit patterns are exactly the same (i.e., Hamming Distance-0). . A matching score of x means there are a total of x matching bits over the total of 32 bits: ox (32-Hamming Distance) o For example, both 0xABCDEF01 and 0x6BCD2FD3 have matching score 27 with the target pattern 0x6BCDEF81, because both have 5 mismatching bits (for example, in OxABCDEF01 vs. Ox6BCDEF81, A and 6 differ in 4 bits, O and 8 differ in 1 bit). Your program should store back the highest matching score among the Pattern Array for pattern T, and the count of how many of them exist. For the above example, ECE 366: Computer Organization- Fall 2018 Program #2 write a MIPS assembly programs and verify that they run correctly with the simulator MARS that does the following Count how many "best matches" exist in an array of 20 patterns, to a given target pattern (T). Input/ Output: (assuming the "compact" memory configuration from MARS >Setting) The target pattern of T should be a 32-bit value in data memory location Ox2000 The array of 20 patterns (Pattern_Array) should be given in data memory, starting from location 0x200C, containing 20 words. The results (best match score, best_match_count) should be written back in memory at location 0x2004, and 0x2008, respectively (see below for an example). data T: word 12 best matching-score.word-1 # best score ? within [0, 32] best-matching-count: 'word-1 # how many patterns achieve the best score? Pattern Array: .word 0,1, 2, 3, 4, 5, 6, 7,8,9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20 . . .text # Your code goes here About Matching The highest possible matching score is 32, meaning the two 32-bit patterns are exactly the same (i.e., Hamming Distance-0). . A matching score of x means there are a total of x matching bits over the total of 32 bits: ox (32-Hamming Distance) o For example, both 0xABCDEF01 and 0x6BCD2FD3 have matching score 27 with the target pattern 0x6BCDEF81, because both have 5 mismatching bits (for example, in OxABCDEF01 vs. Ox6BCDEF81, A and 6 differ in 4 bits, O and 8 differ in 1 bit). Your program should store back the highest matching score among the Pattern Array for pattern T, and the count of how many of them exist. For the above example