Question: if ( A [ 3 ] ! = A [ 6 ] ) { if ( A [ 3 ] = = 0 ) {

if ( A[3]!= A[6]){
if (A[3]==0){
A[3]= A[3]+2;
}else{
A[6]= A[6]/16;
}
}else{
A[6]= A[6]*8
}
a) Construct the equivalent RISC-V code of the above mentioned C code.
b) Base addresses of array A and B are in register X20 and X21.
From your converted codes, pick any instruction from each of the three formats(R,
I, S) and convert them into their corresponding binary values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!