Question: MIPS ASSEMBLY LANGUAGE (IM USING MARS) Circular Shifts: Shift Left Circular (SLC): Implement a method (subprogram) called shiftLeftCircular that shifts the contents of a register

MIPS ASSEMBLY LANGUAGE (IM USING MARS)

MIPS ASSEMBLY LANGUAGE (IM USING MARS) Circular Shifts: Shift Left Circular (SLC):

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 implementation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!