answer.
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]
2 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]2 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
The emissivity of galvanized steel sheet, a common roofing material, is ε = 0.13 at temperatures around 300 K, while its absorpt
Step2247 [10]

Answer:

759.99W/m²

Explanation:

Question: If the temperature of the sheet is 77C,what is the incident solar radiation on aday with Tinf= Tsurr= 16°C?

Given

Energy Equation of the Gas

αs * Gs * A + h * A * (T inf - Tg) + εσA (Tsurr⁴- Tg⁴) = 0

Where σ= 5.67 *10^-8 W/m²K⁴ (Stefan-Boltzmann constant)

ε = 0.13 (Emisivity)

αs = 0.65 (Absorptivity for solar radiation)

h = 7W/m²K⁴

Tg = 77 + 273.15K = 350.15K

T inf = 16 + 273.15 = 288.15K

T surr= T inf = 288.15

Substitute the above values in the Gas Equation, we have

0.65 * Gs * A + 7 * A * (288.15 - 350.15) + 0.13 * 5.67 * 10^-8 * A * (288.15⁴ - 350.15⁴) = 0

0.65 * Gs * A = - 7 * A * (288.15 - 350.15) - 0.13 * 5.67 * 10^-8 * A * (288.15⁴ - 350.15⁴)

A cancels out, so we are left with

0.65 * Gs = - 7 * (288.15 - 350.15) - 0.13 * 5.67 * 10^-8 * (288.15⁴ - 350.15⁴)

0.65Gs = 434 - 0.7372 * 10^-8(−8,137,940,481.697)

0.65Gs = 434 + 0.7372 * 81.37940481697

0.65Gs = 493.992897231070284

Gs = 493.992897231070284/0.65

Gs = 759.9890726631850

Gs = 759.99W/m² ------- Approximated

3 0
2 years ago
Suppose we store a relation R (x,y) in a grid file. Both attributes have a range of values from 0 to 1000. The partitions of thi
leva [86]

Answer:

For (a) The total number of buckets from the given query for the relation is 25 buckets (b) the nearest neighboring query is (80, 200) (80, 150), (100, 150), (120,150) and (120, 200)

Explanation:

From the question stated, we need to define what a Grid file is

Grid File it is a structure of data that are used to divide the total space into a grid non-periodic, where set of point (small) are defined by more than one cells of the grid.

(a)Finding buckets for the query

The relation is divided into two parts which ranges from 0 to 1000, the first part is partitioned in every 20 units, at 20, 40, 60 etc; a second part is partitioned into every 50 units at 50, 100, 150 etc.

The total number of buckets from the given query for the relation is 25 buckets

(b)Finding the closest point or nearest point

The closest point discovered in the distance is little above 15

These points are are the points closer to the point target (110, 205) which can be found in five neighboring rectangles with left corners lower is stated as follows:

(80, 200) (80, 150), (100, 150), (120,150) and (120, 200)

3 0
2 years ago
Technician A that shielding gas nozzles may have different shapes. Technician B says that gelding gas nozzles is attached to the
Lilit [14]
B is correct! in this senecio
5 0
2 years ago
A 50-kg iron block and 20-kg copper block, both initially at 80 oC, are dropped into a large lake at 15 oC. Thermal equilibrium
bija089 [108]
I need this answer to please
5 0
2 years ago
(a) If 15 kW of power from a heat reservoir at 500 K is input into a heat engine with an efficiency of 37%, what is the power ou
julsineya [31]

Answer:

(A) Power output will be 5.55 KW (b) lower temperature will be 315 K

Explanation:

We have given efficiency of heat engine \eta =37% = 0.37

Input power = 15 KW

Temperature of heat reservoir T_H=500K

(A) We know that \eta =\frac{output}{input}

So  [text]0.37=\frac{output}{15}[text]

Output = 5.55 KW

(B) We also know that [text]\eta =1-\frac{T_L}{T_H}0.37=\frac{output}{15}[text], here T_L  is lower temperature and T_H is higher temperature

So 0.37=1-\frac{T_L}{T_H}

0.37=1-\frac{T_L}{500}

T_L=315K

5 0
2 years ago
Other questions:
  • A 1020 CD steel shaft is to transmit 15 kW while rotating at 1750 rpm. Determine the minimum diameter for the shaft to provide a
    10·1 answer
  • Water at 400 kPa with a quality of 75% has its pressure raised 200 kPa (to 600 kPa) in a constant volume process. What is the ne
    15·1 answer
  • 3. (20 points) Suppose we wish to search a linked list of length n, where each element contains a key k along with a hash value
    7·1 answer
  • A 12-L volume of oil is subjected to a pressure change, which produces a volume strain on the oil of -3.0 × 10-4. The bulk modu
    6·1 answer
  • Your assignment is to write a menu driven program. The menu will be responded to using a switch statement. The menu options (cas
    6·1 answer
  • The velocity of a particle which moves along the s-axis is given by v = 2-4t+5t^(3/2), where t is in seconds and v is in meters
    11·2 answers
  • Air whose density is 0.082 lbm/ft3 enters the duct of an air-conditioning system at a volume flow rate of 450 ft3/min. If the di
    8·2 answers
  • Can crushers help us recycle in a space efficient way which is good for saving the earth and for giving you more room in your ap
    7·1 answer
  • Consider a steady developing laminar flow of water in a constant-diameter horizontal discharge pipe attached to a tank. The flui
    14·1 answer
  • Test if a number grade is an A (greater than or equal to 90). If so, print "Great!". Hint: Grades may be decimals. Sample Run En
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!