Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MIPS Assembly (I am using MARS) Circular Shifts: Shift Left Circular (SLC): Implement a method (subprogram) called shiftLeftCircular that shifts the contents of a register
MIPS Assembly (I am using MARS)
Circular Shifts: Shift Left Circular (SLC): Implement a method (subprogram) called shiftLeftCircular that shifts the contents of a register and works as demonstrated below: #input 8 hex digits (shift left amount) ==>output 8 hex digits OXAA 00 00 BB (SLC 4) ==> OXAO 00 OB BA OXAA 00 00 BB (SLC 8) ==> OXOO OO BB AA As shown above the bits falling from left comes to right in the order they drop. Shift Right Circular (SRC): Implement a method (subprogram) called shiftRightCircular. It works like SLC but this time the bits falling from right comes to left in the order they drop. Write two separate subprograms for these circular shift operations. Provide the necessary interface for testing your code in the main (top level) program. Ask the user to enter the decimal integer number to be shifted and a number that indicates the amount of shift. Display the number to be shifted, the shift amount and direction, and the shifted number in hexadecimal on the console. You must pass the number to be shifted and the shift amount in $a0, and $al respectively and return the result in $vo (as required by the rules of MIPS software development). How to display an integer in hexadecimal: See Mars help menu on syscalls. Make sure that you have an efficient implementationStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started