Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

RV32I instruction a) You have fetched an RV32I machine language instruction, and you are to decode the instruction into its corresponding assembly language instruction. The

RV32I instruction

image text in transcribed

image text in transcribed

a)

You have fetched an RV32I machine language instruction, and you are to decode the instruction into its corresponding assembly language instruction. The machine language instruction (in hexadecimal) is: 00 25 0D 93

Identify the corresponding assembly language instruction. Note that numbers in the assembly language instruction are given in base 10 (decimal) and the an "x" placed in front of a number identifies a register number. (x12 => register 12)

A. ORI x10, x27, 2

B. ANDI x10, x27, 2

C. XORI x27, x10, 2

D. ADDI x27, x10, 2

E. LB x27, x10, 2

b)

You have fetched an RV32I machine language instruction, and you are to decode the instruction into its corresponding assembly language instruction. The machine language instruction (in hexadecimal) is: 00 83 48 63

Identify the corresponding assembly language instruction. Note that numbers in the assembly language instruction are given in base 10 (decimal) and the an "x" placed in front of a number identifies a register number. (x12 => register 12)

A. LB x16, 8(x6)

B. LW x16, 8(x6)

C. BLT x6, x8, 8

D. BEQ x8, x6, 8

E. BGE x8, x6, 8

c)

Convert the following RV32I assembly language instruction into the corresponding machine language instruction. SRA x18, x5, x1

A. 40 12 D9 63

B. 00 12 D9 33

C. 00 12 E9 33

D. 40 12 D9 33

E. 40 12 E9 33

27 26 25 24 9 15 14 1211 0 R-type I-type S-type B-type U-type J-type imm 4:0 m 12 10 ctoTmm4.III imm 31:12 imm 20 10:111 19:12 RV32I Base Instruction Set imm 31:1:2 0110111 LUI imm 31:1:2 0010111AUIPc min 101111 JAL 100111 JALR imm 12 10:5 imm 12 10:5 000 imm 4:1 11 001 imm 100 imm 1100011 BNE 100011 BLT BLTU imm 11:0 mm 11:0 mm 11:0 000001 000001 0000011 0000011 0000011LHU LBU imm 11:5 imm 11:5 imm 11:5 mm 44:0 mm 44:0 mm 44:0 0100011SB 0100011SH imm 11:0 imm 11:0 imm 11:0 imm 11:0 0100011SW 0010011 ADDI 0010011 SLTI 0010011SLTIU 0010011 XORI 0010011 ORI 0010011 ANDI 27 26 25 24 9 15 14 1211 0 R-type I-type S-type B-type U-type J-type imm 4:0 m 12 10 ctoTmm4.III imm 31:12 imm 20 10:111 19:12 RV32I Base Instruction Set imm 31:1:2 0110111 LUI imm 31:1:2 0010111AUIPc min 101111 JAL 100111 JALR imm 12 10:5 imm 12 10:5 000 imm 4:1 11 001 imm 100 imm 1100011 BNE 100011 BLT BLTU imm 11:0 mm 11:0 mm 11:0 000001 000001 0000011 0000011 0000011LHU LBU imm 11:5 imm 11:5 imm 11:5 mm 44:0 mm 44:0 mm 44:0 0100011SB 0100011SH imm 11:0 imm 11:0 imm 11:0 imm 11:0 0100011SW 0010011 ADDI 0010011 SLTI 0010011SLTIU 0010011 XORI 0010011 ORI 0010011 ANDI

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions