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
boyakko [2]
3 years ago
5

Your task is to fill in the missing parts of the C code to get a program equivalent to the generated assembly code. Recall that

the result of the function is returned in register %eax. You will find it helpful to examine the assembly code before, during, and after the loop to form a consistent mapping between the registers and the program variables.
Engineering
1 answer:
Rudik [331]3 years ago
6 0

Answer:

See Explaination

Explanation:

//Function

long loop (long x, long n)

{

//Declare a variable named result and initialize it to zero

long result = 0;

//Declare a variable named mask

long mask;

//For loop

for(mask = 1; mask != 0; mask = mask << (n & 0xFF))

{

//Calculate

result | = (x&mask);

}

//Return result

return result;

}

You might be interested in
Many BLANK apply trial and error to develop a product. Please Help! I have one hour to finish. 30 points
Julli [10]

Answer:

Entrepreneurs?

Explanation:

8 0
3 years ago
Need help right now pls
LenaWriter [7]
Put them in 2,4,1,3 and got in 100 in the test
7 0
3 years ago
Circular fins are employed around the cylinder of a lawn mower engine to dissipate heat. The fins are made of aluminum are 0.3-m
frosja888 [35]

Answer: heat through each fin is 291W

Total no of required fin from design calculations is 3

Explanation:

The detailed calculations and explanation is shown in the image below.

8 0
3 years ago
A wood pipe having an inner diameter of 3 ft. is bound together using steel hoops having a cross sectional area of 0.2 in^2. The
Minchanka [31]

Answers:

31.7 inches

Explanation:

Given:

Diameter = 3ft

Let D = Diameter

So, D = 3ft. (Convert to inches)

D = 3 * 12in = 36 inches

Coss-sectional area of the steel = 0.2in²

Gauge Pressure (P) = 4psi

Stress in Steel (σ)= 11.4ksi

Force in steel = ½ (Pressure * Projected Area)

Area (A) = 2 * Force/Pressure

Also, Area (A) = Spacing (S) * Wood Pipe Diameter

Area = Area

2*Force/Pressure = Spacing * Diameter

Substitute values I to the above expression

2 * Force / 4psi = S * 36 inches

Also

Force in steel (F) = Stress in steel (σ) × Cross-sectional area of the steel

So, F = 11.4ksi * 0.2in²

F = 11.4 * 10³psi * 0.2in²

F = 2.28 * 10³ psi.in²

So, 2 * Force / 4psi = S * 36 becomes

2 * 2.28 * 10³/4 = S * 36

S = 2 * 2.28 * 10³ / (4 * 36)

S = 4560/144

S = 31.66667 inches

S = 31.7 inches (approximated)

5 0
3 years ago
Obtain a relation for the logarithmic mean temperature difference for use in the LMTD method?
kolezko [41]

Answer:

The log mean temperature difference is:

ΔT,lm=(ΔT1-ΔT2)/㏑(ΔT1/ΔT2)

Explanation:

To evaluate the equivalent average temperature difference between two fluids we consider a parallel-flow double-pipe heat exchanger (see attached diagram). The temperature of the hot and cold fluids is large at the inlet of the heat exchanger and decreases exponentially toward the outlet.  

We can assume that the outer surface of the heat exchanger is well insulated and that heat transfer only occurs between the two fluids. We can also assume negligible kinetic and potential. The energy balance on each fluid can be written as the rate of heat loss from the hot fluid is equal to the rate of heat gained by the cold fluid in any section of the heat exchanger:

Q = -m,h×c,ph×dT,h   (1)

where Q=rate of heat loss, m=mass flow rate, c,ph=heat capacity of the hot fluid, dT,h= differential temperature of the hot fluid

Q = m,c×c,pc×T.c  (2)

where Q=rate of heat loss, m=mass flow rate, c,ph=heat capacity of the cold fluid, dT,h= differential temperature of the cold fluid

The temperature of the hot fluid change is negative and is added to make Q positive. Solving equations 1 and 2 in terms of dT:

dT.h = - Q/(m,h×c,ph)

dT.c =  Q/(m,c×c,pc)

and taking the difference:

dT,h-dT,c= d(T,h - T,c) = -Q(1/(m,h×c,ph) + 1/(m,c×c,pc)) (3)

The heat transfer rate in the differential section of the heat exchanger can be expressed as:

Q = U(T,h-T,c)×dA,s  (4)

where U=overall heat transfer coefficients, dA,s = differential sectional area. Substitute equation 4 into 3:

d(T,h - T,c)/(T,h - T,c) = -U×dA,s×(1/(m,h×c,ph) + 1/(m,c×c,pc))  (5)

Integrating equation 5:

㏑((T,h out - T,c out)/(T,h in - T,c in)) = -U×A,s×(1/(m,h×c,ph) + 1/(m,c×c,pc))  (6)

The first law of thermodynamics requires the rate of heat transfer from hot and cold fluid to be equal.

Q= m×c, pc×(T, c out-T, c in)  (7)

Q= m×c, ph×(T,h out-T, h in)   (8)

Solve equations 7 and 8 for m,c×c, pc and m,h×c, ph and substituting into equation 6:

Q = U×A,s×ΔT,lm

Where the log mean temperature difference is:

ΔT,lm=(ΔT1-ΔT2)/㏑(ΔT1/ΔT2)

Download pdf
8 0
3 years ago
Other questions:
  • A civil engineer is studying a left-turn lane that is long enough to hold seven cars. Let X be the number of cars in the line at
    11·2 answers
  • A circuit with ____ -diameter connecting wires at a _____ temperature will have the least electrical resistance.
    13·1 answer
  • Air is to be heated steadily by an 8-kW electric resistance heater as it flows through an insulated duct. If the air enters at 5
    10·1 answer
  • what is the expected life 1 inch diameter bar machined from AISI 1020 CD Steel is subjected to alternating bending stress betwee
    9·1 answer
  • Which principle of the software engineering code of ethics has gilbert violated?.
    10·1 answer
  • Which of the following uses pressure and flow to transmit power from one location to another?
    11·1 answer
  • Which of the following is not an electronic device ?
    11·1 answer
  • Although studs are sometimes spaced 24" O.C. in residential structures, a spacing of_____ O.C. is more commonly used.
    5·1 answer
  • Derive the expression ε=ln(1+e), where ε is the true strain and e is the engineering strain. Note that this expression is not va
    14·1 answer
  • which of the following processes would be appropriate for cutting a narrow slot, less than 0.015 inch wide, in a 3/8- inch thick
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!