Question: I need help with this exercise. It needs to be coded on MARS 3 Quadratic Congruence (40 marks One of the problems in the set

 I need help with this exercise. It needs to be coded

I need help with this exercise. It needs to be coded on MARS

3 Quadratic Congruence (40 marks One of the problems in the set of NP-Complete problems is that of quadratic congruences: given positive integers a, b and c, does there exist an integer x c such that x2 a mod b? For small values of a, b, and c, we can decide by brute force if the congruence can be solved Write a program in assembly to get values for a, b and c from the user and then outputs each value of r, for which congruence holds, or reports back that there is no solution. You can use a single main program for this question; i.e., you do not have to use subroutines However, if you use subroutines make sure that they are commented and your code is well structured. Note that you can use the rem pseudo-instruction to get the modulus of two numbers. Please name your solution file quad.asm. An example of four test cases is given below. We will test your program with these and some other (different) test cases. Note, you can print your solutions for x in any way you like the table below just shows the full solution set for certain choices of a, b, c a bc Solution (x) 475 Yes (2,5) 156 Yes (1,4,6) 3 10 4No solution 5 127No solution This has to be written in MIPS language 3 Quadratic Congruence (40 marks One of the problems in the set of NP-Complete problems is that of quadratic congruences: given positive integers a, b and c, does there exist an integer x c such that x2 a mod b? For small values of a, b, and c, we can decide by brute force if the congruence can be solved Write a program in assembly to get values for a, b and c from the user and then outputs each value of r, for which congruence holds, or reports back that there is no solution. You can use a single main program for this question; i.e., you do not have to use subroutines However, if you use subroutines make sure that they are commented and your code is well structured. Note that you can use the rem pseudo-instruction to get the modulus of two numbers. Please name your solution file quad.asm. An example of four test cases is given below. We will test your program with these and some other (different) test cases. Note, you can print your solutions for x in any way you like the table below just shows the full solution set for certain choices of a, b, c a bc Solution (x) 475 Yes (2,5) 156 Yes (1,4,6) 3 10 4No solution 5 127No solution This has to be written in MIPS language

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!