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

  Explain the security risks and applicable laws

Explain the security risks and applicable laws that govern the privacy risk. Describe the security measures that the organization needs to implement to mitigate the risks.

  What are the advantages of using variables in a data type

What are the advantages of using variables in a data type? Substantiate your response with suitable examples. Justify your answers using examples and reasoning. Comment on the postings of at least two classmates with regard to whether you agree or..

  Explain the uses and advantages of the chips

Explain the uses and advantages of the chips. Mention likely privacy objections and refute them - making a presentation to a large retail chain to convince them to buy the chips to install in their products.

  How verbal and nonverbal communication affect communication

Write 1,750- to 2,100-word paper explaining how verbal and nonverbal communication can affect communication in given areas: Police situations (public announcement to the press).

  A fuel economy study was carried out

A Fuel economy study was carried out for five models of cars. each car was driven 100 miles, and then the model of the car and the number of gallons used were placed in a line of the file Mileage.txt. Table 7.22 shows the data for the entries of t..

  Describe the differences and similarities of an attack

Describe the differences and similarities of an attack of convenience and a targeted attack. Implement countermeasures to social and reverse social engineering attacks.

  Cybersquatting collapse

Local challenges Collapse . What are the issues and challenges facing your country regarding information security, spam, Internet governance and data? How would you approach a solution to the problem?

  Most common data structure is an array

A method is an identifiable, self-contained section of code that performs a specific task, such as calculating the square root of a number or resetting the text boxes on an interface. Methods have many uses and are a common way to add functionality t..

  The requirements are accurate and correct

Discuss the following questions with your classmates in the Class Discussion section: What does it mean to have integrated requirements models? How should they be used? Each of the UML models relates to the other models. How can cross checking betwee..

  Modular approach is better than a haphazard approach

When building a house, a structured, modular approach is better than a haphazard approach.

  Find the error in following code

The following code will not display the results expected by the programmer. Can you find the error? Declare Real lowest, highest, average Display "Enter the lowest score

  Many different concepts associated with oop

1. (1) There are many different concepts associated with OOP (Object-oriented programming) like:· Class· Object· Inheritance· Polymorphism

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