Download as:
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Language:EN
Pages: 2
Words: 283

Use mips assembly code implement loop for calculating the factorial

Be sure to end the result string with a null after its final character.

2. Use MIPS assembly code to implement a loop for calculating the factorial of N. For instance, given input 6, it should return the output 720 (i.e., 6!). Use a procedure call to calculate the factorial of N. Therefore, you only need to pass the parameter N to the procedure, and then to print out the value returned by this procedure, which should be N!. You can assume that the result of the factorial can be represented by 32 bits (i.e. you do not need to support very large input values).

3. Write a MIPS assembly language procedure to implement the bubble-sort algorithm. Here is pseudo-code of the bubble-sort

BubbleSort(A)
for i = n-1, i >= 1, i--

end for

end for

Copyright © 2009-2023 UrgentHomework.com, All right reserved.