Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q3 RISC-V Machine Code 5 Points Convert each of the following RISC-V instructions to machine code. Format your answer as 32-bit hexadecimal number, e.g. 0xABADCAFE

Q3 RISC-V Machine Code

5 Points

Convert each of the following RISC-V instructions to machine code.

Format your answer as 32-bit hexadecimal number, e.g. 0xABADCAFE or 0xabadcafe (the cafe just sucks). Leave any unused bits as 0.

Refer to your RISC-V Green Sheet if needed.

Q3.1 sub s0,t0,t1

Q3.2 slli a0, t0, 2

Q3.3 sw t0, 4(s0)

Q3.4 jal ra, fib

Assume PC = 0x0040011CPC=0x0040011C, and NEXT is located at 0x0040010C0x0040010C

Q3.5 beq t3, t5, NEXT

Assume PC = 0x0040011CPC=0x0040011C, and NEXT is located at 0x0040010C0x0040010C.

Q4 Machine Code RISC-V Instructions

Convert each of the following 32-bit machine code instructions into a RISC-V instruction.

Formatting: use register names in your final answer, e.g. a0 instead of x10. The only exception is the zero register, which you should refer to as "x0" instead of "zero".

Example Format: "add t0, a0, x0" or "lw x0, 61(x5)"

For all questions, you can assume

PC = 0x00400010PC=0x00400010

and we have the following labels:

func1: 0x00400000func1: 0x00400000

func2: 0x00400018func2: 0x00400018

Q4.1 0x00598523

Q4.2 0x00b542b3

Q4.3 0x00628463

Q4.4 0xFF1FF06F

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

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

=+ (b) If ax(I) A(An I) for all I and if a > 0, then A( A) = 1.

Answered: 1 week ago