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

  Security and ethical concerns in web-based tool

How could you use a wiki to collaborate with fellow students to improve this course? What security and ethical concerns would you have to consider if you implemented this classroom wiki?

  What your research aims to do

You need to describe what your research aims to do, the objectives that need to be meet to get to the final aim, the context and technical background of the work and also why it is important that this work is carried out.

  Explaining multiple client computers and servers

In network with multiple client computers, servers, switches and wireless access points, write down resources must be scanned for possible vulnerabilities.

  Computing selection inputs for multiplexer system

Determine selection inputs are required if you used MUX A and MUX B system?

  Explain size of new working set system designers

Suppose a process changes its locality and size of new working set is too large to be stored into available free memory. What are some options system designers could choose from to handle this situation?

  Necessarily memorize to the best of the machine abilities

If a researcher uses computer models for studying the memorization capabilities of the human mind, do the programs developed for the machine necessarily memorize to the best of the machine's abilities? Explain.

  When users move the mouse

When users move the mouse over each thumb image of the item, an enlarged picture of the item will appear to the right of the thumb image. For each listed item, you should allow user to specify the numbers he/she intends to buy

  Compare and contrast announced penetration testing

Compare and contrast announced penetration testing and unannounced penetration testing. Speculate on whether or not there are instances where unannounced testing is preferred over announced testing. Justify your resp

  Define the balance for some of the accounts

Define the balance for some of the accounts to be less than $500 and some to be more than $500. After you have created your accounts print your account list, then withdraw $500 from all accounts and redisplay your list.

  Write a java program that creates an array of integers

It should also keep track of a value that appears most often, display what that value was, and how often that value appeared in the array. You may simplify by filling myArray with values such that only one value appears most often.

  Demonstrate the both the commit and the rollback

Write a script to test your procedure. Demonstrate the both the commit and the rollback.

  Explain the means of investigating trademark

Discuss and explain the means of investigating trademark and copyright infringement, sexual harassment incidents, and child pornography and laws concerning those incidents.

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