Instruction Encoding
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
RISC-V Instruction Encoding
The following questions ask you to provide the 32-bit binary encoding
of different RISC-V instructions. You will need to use the RISC-V ISA handout for reference. For clarity, please separate each
field of the instruction with an underscore in your answer (e.g.,
11111_00000).
xor x2, x4, x6? 0b
slti x3, x3, 7? 0b
srai x7, x8, 24? 0b
bge x2, x3, label if label is 4 instructions after the current instruction (pay close attention to how the branch offset gets encoded)? 0b
sw x6, 8(x2)? 0b
2**3 + 2**5).