Question: # The program below contains several comments (all of which start with ##) describing an operation to be performed on one or more of the

# The program below contains several comments (all of which start with ##) describing an operation to be performed on one or more of the variables # declared at the start of the program. Replace each ## comment with *one* # appropriate instruction to complete the program (or, as I've done below, simply move each comment to the right of the instruction) ### EACH INSTRUCTION YOU USE MUST BE A BITWISE, SHIFT, OR ROTATE INSTRUCTION # # # SOME OF THE "INSTRUCTIONS" LISTED BELOW ACTUALLY REQUIRE MULTIPLE INSTRUCTIONS THESE LINES HAVE BEEN MARKED, AND YOU ARE ALLOWED TO USE >1 INSTRUCTION FOR EACH ONE OF THE MARKED LINES (THE LINES THAT CHANGE $t0,$t1, AND $t6) This program gives you some practice working with bitwise, # shift, and rotate operators global main v1: V2: .data .word .word 12 OxFEEDABEE .text .set .ent noreorder main *** main: lw $51, v1 ## $s1 = v1 lw $52, v2 ## $s2 = v2 *REQUIRES >1 INSTRUCTION***: $t0 = v2 with lowest 12 bits cleared (set to o), other bits staying the same ## ***REQUIRES >1 INSTRUCTION***: $t1 = v2 with 8 highest bits set to 0, other bits staying the same ## $t2 = v1 multiplied by 8 *without using a multiply instruction ## ***REQUIRES >1 INSTRUCTION***: $t3 = v2 multiplied by 12 *without* using a multiply instruction ## $t4 = v1 divided by 2 *without* using a divide instruction ## $t5 = v2 with the lowest 16 bits flipped (inverted) and the upper 16 bits staying the same ## ***REQUIRES >1 INSTRUCTION***: ## $t6 = OxFD000010 without using the li pseudo-instruction # This code simply loops infinitely spin: j spin nop .end main # The program below contains several comments (all of which start with ##) describing an operation to be performed on one or more of the variables # declared at the start of the program. Replace each ## comment with *one* # appropriate instruction to complete the program (or, as I've done below, simply move each comment to the right of the instruction) ### EACH INSTRUCTION YOU USE MUST BE A BITWISE, SHIFT, OR ROTATE INSTRUCTION # # # SOME OF THE "INSTRUCTIONS" LISTED BELOW ACTUALLY REQUIRE MULTIPLE INSTRUCTIONS THESE LINES HAVE BEEN MARKED, AND YOU ARE ALLOWED TO USE >1 INSTRUCTION FOR EACH ONE OF THE MARKED LINES (THE LINES THAT CHANGE $t0,$t1, AND $t6) This program gives you some practice working with bitwise, # shift, and rotate operators global main v1: V2: .data .word .word 12 OxFEEDABEE .text .set .ent noreorder main *** main: lw $51, v1 ## $s1 = v1 lw $52, v2 ## $s2 = v2 *REQUIRES >1 INSTRUCTION***: $t0 = v2 with lowest 12 bits cleared (set to o), other bits staying the same ## ***REQUIRES >1 INSTRUCTION***: $t1 = v2 with 8 highest bits set to 0, other bits staying the same ## $t2 = v1 multiplied by 8 *without using a multiply instruction ## ***REQUIRES >1 INSTRUCTION***: $t3 = v2 multiplied by 12 *without* using a multiply instruction ## $t4 = v1 divided by 2 *without* using a divide instruction ## $t5 = v2 with the lowest 16 bits flipped (inverted) and the upper 16 bits staying the same ## ***REQUIRES >1 INSTRUCTION***: ## $t6 = OxFD000010 without using the li pseudo-instruction # This code simply loops infinitely spin: j spin nop .end main
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
