CS39001 (Solution)

$ 29.99
Category:

Description

Indian Institute of Technology Kharagpur
COMPUTER SCIENCE AND ENGINEERING
CS39001: Computer Organization Laboratory
Assignment-7: MIPS-32 Assembly Language Programming
Full Marks: 30
Time allowed: 6 hours
INSTRUCTIONS: ATTEMPT ALL PROBLEMS. Make one submission per group of your source code on Moodle. Name your submitted source files following the format
Assgn 7 Prob 1 Grp <Group no>.s (e.g. Assgn 7 Prob 1 Grp 25.s), etc. Inside each submitted file, there should be a clear header describing the assignment no., problem no., semester, group no., and names of group members. Liberally comment your code to improve its comprehensibility.
2. [Insertion Sort in MIPS-32] Write a MIPS-32 program to collect an array of eight integers from the user, and then sort the array in ascending order using the Insertion Sort algorithm. Collect the numbers from the input console using a loop, and store in memory in an array called array. Do not store the numbers as scalars in eight different non-contiguous locations or in eight different registers. Write a function InsertionSort to implement the sorting algorithm. Pass the address of the 1-D array and the required parameters while implementing the function. After sorting, print the sorted array on the console with a proper message. (10 marks)
3. [Recursive Binary Search in MIPS-32] Write a MIPS-32 program to collect an array of nine integers from the user, sort the array in ascending order using the Insertion Sort algorithm you have implemented in Problem-2, and then search the array for the presence of a value in the array, using Recursive Binary Search. The value to be searched in the array is also to be entered by the user. If the search is successful, the program will print an appropriate success message, with the array index where the value was found. If the search is unsuccessful, the program will print a failure message. No credit will be given for an iterative (linear) search implementation. Your program should have a recursive function BinarySearch to implement the sorting algorithm. After sorting the array containing the numbers, pass the address of the sorted 1-D array and the required parameters to implement the BinarySearch function. (10 marks)

Reviews

There are no reviews yet.

Be the first to review “CS39001 (Solution)”

Your email address will not be published. Required fields are marked *