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:
Answer & Explanation:
function Temprature
NYC=[33 33 18 29 40 55 19 22 32 37 58 54 51 52 45 41 45 39 36 45 33 18 19 19 28 34 44 21 23 30 39];
DEN=[39 48 61 39 14 37 43 38 46 39 55 46 46 39 54 45 52 52 62 45 62 40 25 57 60 57 20 32 50 48 28];
%AVERAGE CALCULATION AND ROUND TO NEAREST INT
avgNYC=round(mean(NYC));
avgDEN=round(mean(DEN));
fprintf('\nThe average temperature for the month of January in New York city is %g (F)',avgNYC);
fprintf('\nThe average temperature for the month of January in Denvar is %g (F)',avgDEN);
%part B
count=1;
NNYC=0;
NDEN=0;
while count<=length(NYC)
if NYC(count)>avgNYC
NNYC=NNYC+1;
end
if DEN(count)>avgDEN
NDEN=NDEN+1;
end
count=count+1;
end
fprintf('\nDuring %g days, the temprature in New York city was above the average',NNYC);
fprintf('\nDuring %g days, the temprature in Denvar was above the average',NDEN);
%part C
count=1;
highDen=0;
while count<=length(NYC)
if NYC(count)>DEN(count)
highDen=highDen+1;
end
count=count+1;
end
fprintf('\nDuring %g days, the temprature in Denver was higher than the temprature in New York city.\n',highDen);
end
%output
check the attachment for additional Information
Answer:
Some of the benefits are tangible for they are visible in the design and production process, while the other benefits are intangible which may not be visible directly but result in improvement in the quality of product, better control over designing and production process, reduction of stress on the designers etc.
Answer:
A) energy loss E = pgQtH
Where p = density in kg/m3
g = gravity acceleration in m/s2
Q = flow rate in m3/s
t = time taken for flow in sec
H = height of flow in m
B) power required to run pump;
P = pgQH
Explanation:
Detailed explanation and calculation is shown in the image below