Implement this function in assembly language

Assignment Help Basic Computer Science
Reference no: EM13535281

The greatest common divisor (GCD) of two integers is the largest integer that will evenly divide both integers. The GCD algorithm involves integer division in a loop, described by the following pweudocode:
int GCD(int x, int y)
{
x = abs(x)
y = abs(y)
do {
int n = x % y
x = y
y = n
} while (y > 0)
return x
}

Implement this function in assembly language and write a test program that calls the function several times, passing it different values. Display all results on the screen.

Reference no: EM13535281

Questions Cloud

Conclude about the voltage across the plate : The voltage across an air-filled parallel-plate capacitor is measured to be 85.0 V. When a dielectric is inserted and completely fills the space between the plates, the voltage drops to 25.0 V. If the dielectric doesnt completely fill the space betwe..
The mass of the hanging mass-velocity of the waves : Two waves traveling in opposite directions along a string fixed at both ends create a standing wave described by y(x, t) = 0.01 sin(44x)cos(1090t). The string has a linear mass density of 0.01 kg/m, and the tension in the string is supplied by a m..
Visit the websites of several social media sites : 1) Visit the websites of several social media sites (MySpace, Facebook, LinkedIn, Twitter). What differences do you notice between these various sites? Are you a member of any of these services? Why or why not?
Determine the minimum number of nutritional calories of food : In exercising, a weight lifter loses 0.145 kg of water through evaporation, the heat required to evaporate the water coming from the weight lifter's body. The work done in lifting weights is 1.21 x 105 J. (a) Assuming that the latent heat of vaporiza..
Implement this function in assembly language : Implement this function in assembly language and write a test program that calls the function several times, passing it different values. Display all results on the screen.
What are the final velocities of car : A bumper car with mass m1 = 103 kg is moving to the right with a velocity of v1 = 5 m/s. A second bumper car with mass m2 = 81 kg is moving to the left with a velocity of v2 = -3.3 m/s. The two cars have an elastic collision. Assume the surface is fr..
Find the velocity of the object when it hits the ground : An object is released from an aeroplane which is diving at an angle of 30 from the horizontal with a speed of 50m/s. If the plane is at a height of 4000m from the ground when the object is released, find the velocity of the object when it hits the gr..
Suspended from a coil spring : A 0.150-kg frame, when suspended from a coil spring, stretches the spring 0.070m . A 0.200-kg lump of putty is dropped from rest onto the frame from a height of 30.0cm.Find the maximum distance the frame moves downward from its initial position.

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Imagine you are an entrepreneur starting a new business

1. assess the challenges e-business and e-commerce technologies present to the field of information technology.

  Commands performs:a) dim raccoon(17) as string

1) Briefly describe what each of the following commands performs:a) Dim Raccoon(17) As String  b) Dim RxData() as Double

  What are the overall benefits of having professional codes

What are the overall benefits of having professional codes? Do the benefits outweigh the disadvantages of not having them? Find a current case involving ethical standards.

  Searches for items that are not in the list

How many searches for items that are not in the list would you have to do to make sorting and using binary search a better strategy than using linear search?

  Task manager to recognize and troubleshoot problems

Which system resources are probable to be at root of problem? How can you use system tools, like the Task Manager, to help recognize and troubleshoot these problems?

  Software engineering procedure

Can correctness proving solve the problem that the product as delivered to the customer may not be what the consumer really requires?

  Advantages of logging more information to alerts file

What are the advantages of logging more information to the alerts file? What are the disadvantages of logging more information to the alerts file?

  Describe the data normalization process

Describe the data normalization process including its specific steps. Why is it referred to as a "decomposition process?"

  Identify and evaluate two online stores

Identify and evaluate two online stores that sell business furniture. Briefly summarize your findings.

  Sodium sulfate is slowly added to a solution

Sodium sulfate is slowly added to a solution containing 0.0500 M Ca2 (aq) and 0.0390 M Ag (aq). What will be the concentration of Ca2 (aq) when Ag2SO4(s) begins to precipitate?

  Use the supplied superclass car to create classes

Because Toyotas are superior to Fords or Chevys it should also implement the supplied Airplane interface. Give the methods something to do. I would suggest a println method since you can then see that the method actually ran.

  Explain about how device works

Write down what first comes to mind as to what is good and bad about the way the device works. The range of tasks a typical user would want to do using it.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd