[SOLVED] CS311-Assignment 1

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Assignment-1-108nsy.zip (258 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Write the following programs in the ToyRISC ISA:

  1. Check if a given number is even or odd. If odd, write β€˜1’ to register x10. Else, write β€˜-1’ to register x10.
  2. 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.
  3. 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.
  4. Write a program to check if a given number is a palindrome. If yes, placeβ€˜1’ in x10. If no, place β€˜-1’ in x10.
  5. Write a program to check if a given number is prime. If yes, place β€˜1’ inx10. If no, place β€˜-1’ in x10.
  • Assignment-1-108nsy.zip