Write the following programs in the ToyRISC ISA:
- Check if a given number is even or odd. If odd, write β1β to register x10. Else, write β-1β to register x10.
- Write a program to sort an array of numbers in the descending order.The sorted array should be placed in the same addresses in memory as the initial array.
- Write a program to place the first βnβ Fibonacci numbers in the memory.The first number is placed at address 216 β 1, the second at 216 β 2, and so on.
- Write a program to check if a given number is a palindrome. If yes, placeβ1β in x10. If no, place β-1β in x10.
- Write a program to check if a given number is prime. If yes, place β1β inx10. If no, place β-1β in x10.








