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

  Question about artificial intelligence

Artificial intelligence topics include Expert Systems and Genetic Algorithms. Do you think that corporations can really use artificial intelligence to make a good business decision?

  How did his presentation improve your understanding

Overview of the presentation - what did Mr Boti cover 2. How did his presentation improve your understanding of what engineers in your chosen field do when employed by engineering firms like ReCon.

  The current directory is c

Assume that the current directory is C: and a file named MESSAGE.BAT is located in C:Util directory. Which one of the following commands would be effective?

  Limit approach to determine the order

Use the limit approach to determine the order for g(n) = n^J and f(n) = n^k, where k > j > 2

  Discussing two of the additional dba responsibilities

Write a 500-1000 word paper using Word discussing two of the additional DBA responsibilities. Use at least two sources outside your text for this paper. Do not use Wikipedia. Use APA format for the paper, and be sure to cite all your sources using AP..

  Prevent race conditions in kernel code for a uni-processor

In early Unix kernels the approach used to avoid race conditions in kernel code was to use a combination of the following two techniques: (i) non- preemptive scheduling of threads when they are running in privileged mode and (ii) interrupt disabli..

  The reflexive closure of r has how many elements

For this question let:A = {a, b, c, d} and R is a subset of A * A where, R = {(a, a), (b,b), (c, c), (a, b), (b, c), (c, d), (d, c)} a) The reflexive closure of R has how many elements? b) The symmetric closure of R has how many elements? c) The tran..

  Let g=(v,e) be an undirected graph

Let G=(V,E) be an undirected graph in which the degree of each vertex is a multiple of 10 or of 15. Show that |E| is a multiple of 5.  |E| = number of edges

  Determine the frequency (in hz)

A. Determine the frequency (in Hz) and the period (in s) for the sinusoidal wave described in the last problem. B. An oscilloscope shows a wave repeating every 27 ms. What is the frequency of the wave?

  Distinguish between data and information

Distinguish between data and information

  Find the computes and displays the number of square feet

You need to find the computes and displays the number of square feet and the number of square meters in 1/4 acre of land.

  Computer discussion homework

Discuss additional approaches not mentioned in the textbook that may be warranted in aligning an organization for future growth and success.

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