Main program prints gcd and lcm value

Assignment Help Basic Computer Science
Reference no: EM13934784

1. Write a program which defines total m integer numbers in pre-defined data area 'var_a'. The number m is stored in a location var_m. The program implements a selection sort on the array variable var_a. Name the program as selection_sort.asm.

2. Write a program which defines total m integer numbers in pre-defined data area 'var_a'. The number m is stored in a location var_m. The program implements a insertion sort on the array variable var_a. Name the program as insertion_sort.asm.

3. Write a program which defines total m integer numbers in pre-defined data area 'var_a'. Implement procedure 'gcd' which takes two argument in $a1 and $a0 and return GCD (Greatest Common Divisor) in $v0. Implement another procedure 'lcm' which takes two argument in $a1 and $a0 and return LCM (Least Common Multiplies) in $v0. This 'lcm' procedure uses 'gcd' procedure internally. Implement another procedure 'gcd_lcm_set' which takes two argument $a0 as address to the start of array var_a and $a1 as number of elements in the array. It returns GCD of the set of numbers in $v0 and LCM of the set of the number in $v1. The 'main' program prints GCD and LCM value of the given array of integer numbers in var_a. Name the program as gcd_lcm_arr.asm.

Reference no: EM13934784

Questions Cloud

Program that adds the elements in the odd indices : Write an assembly program that adds the elements in the odd indices of the following array. Use LOOP. What is the final value in the register? array1 DWORD 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
Applicaion for menu design : The user selects the Clear menu to clear the form.
Smith die company manufactures cutting dies : Smith Die Company manufactures cutting dies for the shoe industry.
Competency standards for the enrolled nurse : 1. competency standards for the enrolled nurse 2. code of professional practice for nurses 3. code of ethics for nurses
Main program prints gcd and lcm value : Write a program which defines total m integer numbers in pre-defined data area 'var_a'. The number m is stored in a location var_m. The program implements a selection sort on the array variable var_a. Name the program as selection_sort.asm.
What is molecular reasons for this functional difference : Diagram the pathway of Glycolysis from glucose to pyruvate, giving structures and names of all pathway intermediates (enzyme mechanisms are not required) and names of enzymes (no abbreviations). Indicate where ADP, ATP, Pi, NAD+, or NADH is a subs..
Analyze the role of professional regulation : Analyze the role of professional regulation, the standard of care, and codes of ethics in healthcare providers' accountability to self, their profession, their patients, and the public
Scientific knowledge relating to altered health states : For the this assessment you must 1- detailing the scientific knowledge relating to altered health states. 2- Answers should cover the genetic, tissue, cellular, molecular and biochemical aspects of the disorder
Policy as result of failure to correct fire hazard : Bill Blum insured his hardware store with a fire insurance policy for $88,000 at a cost of $.84 per $100. Ten months later his insurance company cancelled his policy as a result of failure to correct a fire hazard. The cost of the policy to Bill was:

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create an array to hold the hours and the hourly rate

Create an array to hold the hours and the hourly rate. Then print out the wages for each entry. The program should use a multi-dimensional array, a loop, and a jsr to calculate and print the values. this is in Jasmin language

  Discuss three standard configuration and security

In addition, discuss three standard configuration and security tools each OS provides. Search the web and describe two third-party or open source tools that can help with managing your OS's security configuration. In what ways do these third-party to..

  What is the const keyword in c++ and why would you use

What is the const keyword in C++? Why would you use the const keyword

  How would the export demand change

a. Suppose that the PST appreciates relative to the EUR. For the following parts, you will not receive anycredit without providing an explanation.(i) In the UK:  How would the export demand change? Why?-

  Introduction to information systems

Complete the On Your Own project (PC or Mac version) according to the project instructions and submit your assignment through the online course shell.

  Make a list of the field names and field types

1.Make a list of the field names and field types you plan to include in the table. What fields are you going to put in this table? What are their field types? Would it make sense to reduce any of the field sizes? Do you need to add captions?

  Hash algorithm used by protocols such as radius

1. In 1996, the Message Digest 5 (MD5) hash algorithm used by protocols such as RADIUS (Remote Authentication Dial In User Service) to protect passwords was found to have a weakness that could subject it to collision attacks. In 2004, researchers sho..

  Analysis on the viability of upgrading to windows

Develop a SWOT analysis on the viability of upgrading to Windows 8 for the organization as a whole. Provide a detailed upgrade plan for the organization, including the sales staff. At a minimum:

  Design a stop-and-wait-like error control protocol

Design a stop-and-wait-like error control protocol for reliably transferring a packet from A to B and C such that A will not accept the next payload from the upper layer until both B and C have correctly received the current payload. Describe the ..

  Market for ethanol in the united states

Consider the market for ethanol in the United States depicted in the figure to the right. Assume the world price of ethanol is $0.90 per gallon, and at that price the United States can buy as much ethanol as it wants without causing the world pric..

  Alter computation of prefix function-correctly match string

if ‘_' is wild-card, then pattern ‘foo*bar*nad' can be found in ‘foofoowangbarnad'. Alter computation of prefix function to correctly match strings using KMP.

  About tdma-fdma-cdma

Write a one page paper comparing the advantages of Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Code Division Multiple Access (CDMA), and Orthogonal Frequency Division Multiplexing, as used in wireless mobile co..

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