Task-1 :Write the following C/C++ program that will generate the instruction for
ID: 643966 • Letter: T
Question
Task-1 :Write the following C/C++ program that will generate the instruction format for a given MIPS instruction. Your program will get user input which will be a MIPS instruction and then will print the instruction format on the console. Your program needs to support at least the following MIPS instructions; add addi bne beq 1w sw sll and or j The sample execution of your program is shown below: Enter the MIPS instruction? add $t1, $t1,$s6 Instruction format will be Opcode: 0 rs register: 9 rt register: 22 rd register: 9 shift amount:0 Function code:32Explanation / Answer
#include #include using namespace std; int main () {string ins,str; CoutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.