Question: iii) The Gauss's complex multiplication algorithm is used to compute the product of two complex numbers with 3 real multiplications. (Conventional way of multiplying two

 iii) The Gauss's complex multiplication algorithm is used to compute the

iii) The Gauss's complex multiplication algorithm is used to compute the product of two complex numbers with 3 real multiplications. (Conventional way of multiplying two complex numbers will incur 4 real multiplications). This algorithm is explained below. Let the two complex numbers given be Z1-x1 iy1 and Z2-x2 + iy2, where i is the imaginary operator. The product Z1 Z2 (x1iy1)*(x2 iy2) can be efficiently computed as follows. Compute p1-x2*x1y1) p2-x1*(y2 - x2) p3 -y1*(x2 + y2) Then the result is given by Z1 Z2 (p1- p3) ti(p1 +p2) You asked to develop an ARM assembly subroutine called testprod, which could be called by another function (such as main) to test whether the product of two complex numbers is real. The subroutine testprod should be AAPCS compliant. Write the ARM assembly code for testprod taking into account the following guidelines. [10 marks] Each complex number is stored within the register bank using one register for the real part and one for the imaginary part as follows. " x1 is in V1, y1 is in V2, x2 is in V3, and y2 is in V4 Your subroutine testprod takes four arguments in the orderx1, y1, x2, y2. Your answer should explicitly state any actions that should be performed by the caller of testprod if there are any. You are not required to write assembly code for the caller The subroutine must use the Gauss's multiplication algorithm to compute the product of the two complex numbers. " " " The return value of the subroutine is 1 if the imaginary part of the result i.e. p1 p2) is zero. Otherwise the return value is 0 " There are no other subroutines called within the testprod. " The assembly code you write for testprod should be properly commented, clearly indicating what are you doing in each step. Alternatively, you may use line numbers in the code to explain each line separately if you need more space iii) The Gauss's complex multiplication algorithm is used to compute the product of two complex numbers with 3 real multiplications. (Conventional way of multiplying two complex numbers will incur 4 real multiplications). This algorithm is explained below. Let the two complex numbers given be Z1-x1 iy1 and Z2-x2 + iy2, where i is the imaginary operator. The product Z1 Z2 (x1iy1)*(x2 iy2) can be efficiently computed as follows. Compute p1-x2*x1y1) p2-x1*(y2 - x2) p3 -y1*(x2 + y2) Then the result is given by Z1 Z2 (p1- p3) ti(p1 +p2) You asked to develop an ARM assembly subroutine called testprod, which could be called by another function (such as main) to test whether the product of two complex numbers is real. The subroutine testprod should be AAPCS compliant. Write the ARM assembly code for testprod taking into account the following guidelines. [10 marks] Each complex number is stored within the register bank using one register for the real part and one for the imaginary part as follows. " x1 is in V1, y1 is in V2, x2 is in V3, and y2 is in V4 Your subroutine testprod takes four arguments in the orderx1, y1, x2, y2. Your answer should explicitly state any actions that should be performed by the caller of testprod if there are any. You are not required to write assembly code for the caller The subroutine must use the Gauss's multiplication algorithm to compute the product of the two complex numbers. " " " The return value of the subroutine is 1 if the imaginary part of the result i.e. p1 p2) is zero. Otherwise the return value is 0 " There are no other subroutines called within the testprod. " The assembly code you write for testprod should be properly commented, clearly indicating what are you doing in each step. Alternatively, you may use line numbers in the code to explain each line separately if you need more space

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!