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
Somebody help me!! It’s due today
Bas_tet [7]

Answer:

1.0.7

2.6.0

3.2.7

4.1.8

5.4.2

6.3.7

5 0
3 years ago
Ammonia gas is diffusing at a constant rate through a layer of stagnant air 1 mm thick. Conditions are such that the gas contain
fiasKO [112]

Answer:

The solution to this question is 5.153×10⁻⁴(kmol)/(m²·s)

That is the rate of diffusion of ammonia through the layer is

5.153×10⁻⁴(kmol)/(m²·s)

Explanation:

The diffusion through a stagnant layer is given by

N_{A}  = \frac{D_{AB} }{RT} \frac{P_{T} }{z_{2} - z_{1}  } ln(\frac{P_{T} -P_{A2}  }{P_{T} -P_{A1} })

Where

D_{AB} = Diffusion coefficient or diffusivity

z = Thickness in layer of transfer

R = universal gas constant

P_{A1} = Pressure at first boundary

P_{A2} = Pressure at the destination boundary

T = System temperature

P_{T} = System pressure

Where P_{T} = 101.3 kPa P_{A2} =0, P_{A1} =y_{A}, P_{T} = 0.5×101.3 = 50.65 kPa

Δz = z₂ - z₁ = 1 mm = 1 × 10⁻³ m

R =  \frac{kJ}{(kmol)(K)} ,    T = 298 K   and  D_{AB} = 1.18 \frac{cm^{2} }{s} = 1.8×10⁻⁵\frac{m^{2} }{s}

N_{A} = \frac{1.8*10^{-5} }{8.314*295} *\frac{101.3}{1*10^{-3} }* ln(\frac{101.3-0}{101.3-50.65}) = 5.153×10⁻⁴\frac{kmol}{m^{2}s }

Hence the rate of diffusion of ammonia through the layer is

5.153×10⁻⁴(kmol)/(m²·s)

5 0
3 years ago
According to the article "Edward R. Murrow: Inventing Broadcast Journalism," how did Murrow perceive the threat of Adolf Hitler?
aliya0001 [1]

Answer:

d. To Murrow, Hitler was a threat to all of civilization

Explanation:

For Murrow, Hitler's rise was a serious problem and a major threat to the entire civilization. For this reason, he believed that covering news about Hitler's advance and the battles of Nazi Germany was essential, even if the American population did not see Hitler as a threat and the European population, believed that these reprotations were only a way to denigrate the image of the continent to the world.

For Murrow reporting on Hitler's actions was as important as reporting on natural disasters.

8 0
3 years ago
As shown, a load of mass 10 kg is situated on a piston of diameter D1 = 140 mm. The piston rides on a reservoir of oil of depth
telo118 [61]

Answer:

165 mm

Explanation:

The mass on the piston will apply a pressure on the oil. This is:

p = f / A

The force is the weight of the mass

f = m * a

Where a in the acceleration of gravity

A is the area of the piston

A = π/4 * D1^2

Then:

p = m * a / (π/4 * D1^2)

The height the oil will raise is the heignt of a colum that would create that same pressure at its base:

p = f / A

The weight of the column is:

f = m * a

The mass of the column is its volume multiplied by its specific gravity

m  = V * S

The volume is the base are by the height

V = A * h

Then:

p = A * h * S * a / A

We cancel the areas:

p = h * S * a

Now we equate the pressures form the piston and the pil column:

m * a / (π/4 * D1^2) = h * S * a

We simplify the acceleration of gravity

m / (π/4 * D1^2) = h * S

Rearranging:

h = m / (π/4 * D1^2 * S)

Now, h is the heigth above the interface between the piston and the oil, this is at h1 = 42 mm. The total height is

h2 = h + h1

h2 = h1 + m / (π/4 * D1^2 * S)

h2 = 0.042 + 10 / (π/4 * 0.14^2 * 0.8) = 0.165 m = 165 mm

7 0
2 years ago
A water skier leaves the end of an 8 foot tall ski ramp with a speed of 20 mi/hr and at an angle of 250. He lets go of the tow r
klemol [59]

Answer:

At highest point:

y1 = 10.4 ft

v1 = (26.5*i + 0*j) ft/s

When he lands:

x2 = 31.5 ft (distance he travels)

t2 = 1.19 s

V2 = (26.5*i - 25.9*j) ft/s

a2 = -44.3°

Explanation:

Since he let go of the tow rope upon leaving the ramp he is in free fall from that moment on. In free fall he is affected only by the acceleration of gravity. Gravity has a vertical component only, so the movement will be at constant acceleration in the vertical component and at constant speed in the horizontal component.

20 mi / h = 29.3 ft/s

If the ramp has an angle of 25 degrees, the speed is

v0 = (29.3 * cos(25) * i + 29.3 * sin(25) * j) ft/s

v0 = (26.5*i + 12.4*j) ft/s

I set up the coordinate system with the origin at the base of the ramp under its end, so:

R0 = (0*i + 8*j) ft

The equation for the horizontal position is:

X(t) = X0 + Vx0 * t

The equation for horizontal speed is:

Vx(t) = Vx0

The equation for vertical position is:

Y(t) = Y0 + Vy0 * t + 1/2 * a * t^2

The equation for vertical speed is:

Vy(t) = Vy0 + a * t

In this frame of reference a is the acceleration of gravity and its values is -32.2 ft/s^2.

In the heighest point of the trajectory the vertical speed will be zero because that is the point where it transitions form going upwards (positive vertical speed) to going down (negative vertical speed), and it crosses zero.

0 = Vy0 + a * t1

a * t1 = -Vy0

t1 = -Vy0 / a

t1 = -12.4 / -32.2 = 0.38 s

y1 = y(0.38) = 8 + 12.4 * 0.38 + 1/2 * (-32.2) * (0.38)^2 = 10.4 ft

The velocity at that moment will be:

v1 = (26.5*i + 0*j) ft/s

When he lands in the water his height is zero.

0 = 8 + 12.4 * t2 + 1/2 * (-32.2) * t2^2

-16.1 * t2^2 + 12.4 * t2 + 8 = 0

Solving this equation electronically:

t2 = 1.19 s

Replacing this time on the position equation:

X(1.19) = 26.5 * 1.19 = 31.5 ft

The speed is:

Vx2 = 26.5 ft/s

Vy2 = 12.4 - 32.2 * 1.19 = -25.9 ft/s

V2 = (26.5*i - 25.9*j) ft/s

a2 = arctg(-25.9 / 26.5) = -44.3

3 0
3 years ago
Other questions:
  • Cng containers need to be inspected
    7·1 answer
  • 2. A fluid at 14.7 psi (lb-f per square inch) with kinematic viscosity (????????) 1.8 x10-4 ft2/sec and density(????????) 0.076
    11·1 answer
  • How to identify this fossil
    9·1 answer
  • A water tower that is 90 ft high provides water to a residential subdivision. The water main from the tower to the subdivision i
    10·1 answer
  • The water level in a large tank is maintained at height H above the surrounding level terrain. A rounded nozzle placed in the si
    9·1 answer
  • What is the ideal cooling system for low horsepower motor? For example1hp motor
    9·1 answer
  • Why won't Brainly let me make a account or log in? It's always telling me that it can't take my registration at this time or it
    9·1 answer
  • What effect will increasing numbers of high-profile green building projects likely have on thinking about building?
    5·1 answer
  • using the following data for july, calculate the cost of goods manufactured: beginning finished goods inventory 150,475. Ending
    5·1 answer
  • Question 8 (1 point)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!