Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

please answer all if you may. explanation also too. thank you

Answered: 1 week ago

Question

Write a note on job design.

Answered: 1 week ago

Question

Compute the derivative of f(x)cos(-4/5x)

Answered: 1 week ago

Question

Discuss the process involved in selection.

Answered: 1 week ago

Question

Differentiate tan(7x+9x-2.5)

Answered: 1 week ago

Question

3. What might you have done differently

Answered: 1 week ago

Question

4. Did you rethink your decision?

Answered: 1 week ago