Question
The first program will demonstrate a variety of MIPS instructions. Your program should begin by loading the contents of four integer operands (A, B, C,
The first program will demonstrate a variety of MIPS instructions. Your program should begin by loading the contents of four integer operands (A, B, C, and D) into registers. Next, your program should use the shift and rotate instructions described in the Patterson/Hennessy textbook to multiply the value of A by 6, divide the value of B by 8 (truncating the result), shift the value of C to the right 10 bit places (writing 0s into the most significant bits of the register), and rotate the value of D 12 bit places to the left. Finally, your program should write the new values of A, B, C, and D back to memory. Be sure to test your program carefully, using both positive and negative integers for inputs. Validate correct program operation by examining the updated contents of the memory operands. (HINT: 6A = 2A + 4A!)
Step 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