1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Blizzard [7]
3 years ago
13

Write a new ARMv8 assembly file called "lab04b.S" which is called by your main function. It should have the following specificat

ions: Create a function that computes factorials: n! = n · (n − 1) · ... · 3 · 2 · 1. Use the my_mul function in question 1 for all multiplications Use the concept of recursion. Do NOT directly use the concept of iteration. Do not forget that using the recursion is the same as using the STACK. Make sure you comment on the code. Demonstrate your code running to the TA. Turn in your lab04b.S file here when complete.
Engineering
1 answer:
Len [333]3 years ago
6 0

Answer:

my_mul:

.globl my_mul

my_mul:

   //Multiply X0 and X1

   //   Does not handle negative X1!

   //   Note : This is an in efficient way to multipy!

   SUB SP, SP, 16       //make room for X19 on the stack

   STUR X19, [SP, 0]    //push X19

   ADD X19, X1, XZR     //set X19 equal to X1

   ADD X9 , XZR , XZR //set X9 to 0

mult_loop:

   CBZ X19, mult_eol

   ADD X9, X9, X0

   SUB X19, X19, 1

   B mult_loop

mult_eol:

   LDUR X19, [SP, 0]

   ADD X0, X9, XZR      // Move X9 to X0 to return

   ADD SP, SP, 16       // reset the stack

   BR X30

Explanation:

You might be interested in
Six housing subdivisions within a city area are target for emergency service by a centralized fire station. Where should the new
Marina86 [1]

Answer:

Explanation:

Since there are six points, the minimum distance from all points would be the centroid of polygon formed by A,B,C,D,E,F

To find the coordinates of centroid of a polygon we use the following formula. Let A be area of the polygon.

C_{x}=\frac{1}{6A} sum(({x_{i} +x_{i+1})(x_{i}y_{i+1}-x_{i+1}y_{i}))     where i=1 to N-1 and N=6

C_{y}=\frac{1}{6A} sum(({y_{i} +y_{i+1})(x_{i}y_{i+1}-x_{i+1}y_{i}))

A area of the polygon can be found by the following formulaA=\frac{1}{2} sum(x_{i} y_{i+1} -x_{i+1} y_{i}) where i=1 to N-1

A=\frac{1}{2}[ (x_{1}  y_{2} -x_{2}  y_{1})+ (x_{2}  y_{3} -x_{3}  y_{2})+(x_{3}  y_{4} -x_{4}  y_{3})+(x_{4}  y_{5} -x_{5}  y_{4})+(x_{5}  y_{6} -x_{6}  y_{5})]

A=0.5[(20×25 -25×15) +(25×32 -13×25)+(13×21 -4×32)+(4×8 -18×21)+(18×14 -25×8)

A=225.5 miles²

Now putting the value of area in Cx and Cy

C_{x} =\frac{1}{6A}[ [(x_{1}+x_{2})(x_{1}  y_{2} -x_{2}  y_{1})]+ [(x_{2}+x_{3})(x_{2}  y_{3} -x_{3}  y_{2})]+[(x_{3}+x_{4})(x_{3}  y_{4} -x_{4}  y_{3})]+[(x_{4}+x_{5})(x_{4}  y_{5} -x_{5}  y_{4})]+[(x_{5}+x_{6})(x_{5}  y_{6} -x_{6}  y_{5})]]

putting the values of x's and y's you will get

C_{x} =15.36

For Cy

C_{y} =\frac{1}{6A}[ [(y_{1}+y_{2})(x_{1}  y_{2} -x_{2}  y_{1})]+ [(y_{2}+y_{3})(x_{2}  y_{3} -x_{3}  y_{2})]+[(y_{3}+y_{4})(x_{3}  y_{4} -x_{4}  y_{3})]+[(y_{4}+y_{5})(x_{4}  y_{5} -x_{5}  y_{4})]+[(y_{5}+y_{6})(x_{5}  y_{6} -x_{6}  y_{5})]]

putting the values of x's and y's you will get

C_{y} =22.55

So coordinates for the fire station should be (15.36,22.55)

5 0
3 years ago
Ann’s Retail, a women’s clothing store, hires female attendants to assist clients in the store’s dressing rooms. Larry, a male,
mojhsa [17]

Answer:

A bona fide occupational qualification defense

Explanation:

Since the store is for women clothing, the retail may prefer to employ only female to assist the customers.  Under a bona fide occupational qualification defense, an employer is allowed to discriminate if a characteristic is a necessity for the performance of the job and for the business. Therefore, the store has a bona fide occupational qualification defense.

3 0
3 years ago
Series and parrarel circuts combination a. Find the currents I1, I2, I3, I4, I5, and I6. a 5 k R1 = 1 k R7 = 2 k I1 I428 V 6 k R
satela [25.4K]

Answer:

Explanation:

R1 = 1 k; R2 = 1k; R3 = 3k; R4 = 6k; R5 = 5k; R6 = 6k and R7 = 2k

Vt = 428V

The series and parallel circuit combination is as follow:

(R6║R7 + R5) + R4 + R3║R2 + R1

(6*2/6 + 2) + 5 = 13/ k

(13/2*6/13/6 + 6) = 78/31k

78/3 + 3 = 171/3 = 57k

57k║R2 = 57k║1k = 57/58k + R1 = (57/58 + 1)k = 115/58k = 2k

It = Vt/2k = 428/2000 = 0.2A

∴ I1 = 0.2A

I1 = I2 + I3

Using current divider rules to obtain I2 and I3

∴ I2 = I1 X (I2/I2 + I3) = 0.2 X ( 1/4) = 0.05A

and I3 = I1 X (I3/I2 + I3) = 0.2 X (3/4) = 0.15A

I3 = I4 + I5, using current divider

I4 = I3 X (I4/I4 + I5) = 0.15 X (6/6 + 5) = 0.08

I5 = 0.15 - 0.08 = 0.07A

I5 = I6 + I7, using current divider

I6 = I5 X (I6/I6 + I7) = 0.07 X (6/6 + 2) = 0.05A

I7 = 0.07 - 0.05 = 0.02A

8 0
3 years ago
1<br> Create an example of a positive correlation
BlackZzzverrR [31]

Answer:

fhv

Explanation:

gjf

5 0
3 years ago
Read 2 more answers
What is the acceleration of a car that has a velocity of 20 m/s, and
ella [17]

Acceleration of Car = 10 ms⁻²

Explanation:

Step 1:

The basic formula of acceleration is a = (v-u)/t  ms⁻²

where, v- final velocity

            u- initial velocity

             t= time taken

Step 2:

Here v = 70 ms⁻¹

        u = 50  ms⁻¹

         t = 5 s

∴ a = ( 70 - 20)/5

a = 10 ms⁻²

7 0
3 years ago
Other questions:
  • Find the thickness of the material that will allow heat transfer of 6706.8 *10^6 kcal during the 5 months through the rectangle
    8·1 answer
  • Explain what entropy is in relation to the second law of thermodynamics?
    9·1 answer
  • The state of plane strain on an element is:
    15·1 answer
  • The slope of a moment diagram is the load. a)-True b)-False
    8·1 answer
  • 5. Identify the pros and cons of<br> manufactured siding.
    12·1 answer
  • Which of the following best describes a central idea of the text?
    10·1 answer
  • Which statement concerning symbols used on plans is true?
    10·1 answer
  • What are the nominal dimensions for a 1x2 stick of lumber, a 2x4 stick of lumber and a standard sheet of plywood?
    11·1 answer
  • If the load parameters are: Vln=600kV, Il=100A (resistive), calculate the source voltage and current when the line is 50Miles (s
    14·1 answer
  • the tire restraining device or barrier shall be removed immediately from service for any of these defects except
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!