Question
In this lab, you will perform two tasks, one as an assembler and the other as disassembler. An assembler is a computer program that translates
In this lab, you will perform two tasks, one as an assembler and the other as disassembler. An assembler is a computer program that translates assembly language to machine language, by encoding assembly instructions with their binary representation. A disassembler is a computer program that translates binary machine language into assembly languagethe inverse operation to that of an assembler. The two tasks are:
1) given RISC-V assembly instructions, identify the class and encoding format of the instructions and encode them into 32-bit instruction words, and
2) given instruction words in hexadecimal format, decode the instructions and write down their assembly instructions. Encoding format and decoding of RISC-V instructions are studied in book chapter 2.4 (2s complement binary representation), 2.5 (R-, I- and Sformat instruction encoding for arithmetic, logic, load and store instructions) and 2.10 (SB- and J-Format encoding for branch and jump instructions, and decoding instructions). You should review the related lecture slides or the text book sections before working on the lab.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started