Find the element with rank 4

Assignment Help Computer Engineering
Reference no: EM133626036

IN ASSEMBLY ARMv8 program that computes the histogram of a set of non-negative integers. The input numbers will be specified in double word type in your program and will range between 0 and 100. Your program will count how many times each integer appears in a histogram with 101 bins.

(2) The code must include a procedure for returning the element of a particular rank, e.g. the 8th smallest number. The rank will always be defined starting from the minimum value, and rank 1 corresponds to the smallest element. See the example below.

(3) Optionally, the code can accept a list of ranks and call the procedure multiple times. In this case, the number of ranks to be tested should also be provided in the data section (not shown in example).

(4) The procedures must return correctly to the caller and this must be demonstrated by a printout of the result by the caller.

(5) The code must print the histogram, as well as the values with the ranks specified in the data section using printf as shown below.

The input data and the length of the array will be specified as follows:

.data inpdata: .dword 2, 0, 2, 3, 4, 6 inplen: .dword 6 rank:

.dword 4

The output of the histogram computation should be:

Number:0,1,2,3,4,5,,6 count: 1,0,2,1,1,0,1

The last printed row should correspond to the maximum value found in the data. You can use \t in the printf format string to insert a tab in the output, but ugliness of the printouts will not be penalized.

To find the element with rank equal to 2, we need to look for the histogram bin that includes the second smallest number. This can be found by adding the counts in the bins of the histogram, starting from 0, until we reach or exceed 2. In this example, we need to include bins 0, 1 and 2 to include the second smallest number of the input (in bin 2). Therefore, the element with rank 2 has value equal to 2.

Similarly, to find the element with rank 4, we need to identify the histogram bin that includes the fourth smallest number. To reach it, we need to include bins 0, 1, 2 and 3

Therefore, the element with rank 4 has value equal to 3.

The output of your program should have the following form. Keep in mind that the main function should print the value returned by your procedure.

The value of the rank-4 element is 3

Test your code with data that span the entire range from 0 to 100; that would produce histograms with empty bins; or histograms with one non-empty bin.

Test your rank finder procedure with rank equal to 1, N (the length of the input array), a value in the middle of a bin, and a value at the end of a bin, such as 2 and 3 in the above example.

Reference no: EM133626036

Questions Cloud

What happens to the compute resources during : What happens to the compute resources during a FaaS call? Server scales for less resources Server scales for more resources Server is turned off after function
Create a filter on the data display a multiple filter : Create a filter on the data Display a multiple filter showing 2014, 2016 January Invoice month and Aggregate Sales Type set to International
Which medications you give to help with common side effect : You just ordered amoxicillin/clavulanate for a 35 year old male for a sinus infection. Which medications can you give to help with the most common side effect?
Apply the general number format to values : Apply the General number format to values on the vertical (value) axis. Use default values for format code and links. (Hint: close the Format pane and do not
Find the element with rank 4 : Find the element with rank 4, we need to identify the histogram bin that includes the fourth smallest number. To reach it, we need to include bins 0, 1, 2 and 3
Discuss how you would go about designing the study : Discuss how you would go about designing this study. Identify the advantages as well as limitations of the design you choose.
How you have personally empowered a patient or fellow nurse : What are the best strategies the nurse can employ to empower patients. Provide example of how you have personally empowered either a patient or a fellow nurse.
Describe problems for this compatibilist account of freedom : Soft-determinists (also known as compatibilists) maintain that free actions are those that are caused in the right way.
Write a program that asks the user to provide their name : Write a program that asks the user to provide their name. The program should then display their name 5 times, separated by spaces. For example

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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