Question: Consider the following RISCV code loop: beq 1,x0, exit // if x1=x0 exit subi 1,x1,1// sub 1 from 1 sll 2,2,1 //shift left 2 one
Consider the following RISCV code loop: beq 1,x0, exit // if x1=x0 exit subi 1,x1,1// sub 1 from 1 sll 2,2,1 //shift left 2 one position jloop //go to loop exit: Assume initially x2=3, and x1=3. Also remember x0 is always zero. What is the final value in 2? 32 24 256 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
