Question

5 – What is the binary encoding of the following RISC-V assembly instruction? Please write your...

5 – What is the binary encoding of the following RISC-V assembly instruction? Please write your answer as an 8-digit hexadecimal number.

and x8, x6, x7

Homework Answers

Answer #1

5). ANSWER :

GIVENTHAT :

  • Get the instruction format from the manual.

  • Get the opcode, funct7,funct3, and register numbers from the manual(funct7=0000000,rs2=x7=00111,rs1=x6=00110,funct3=111,rd=x8=01000,opcode=0110011)
  • Understand the syntax of the AND instruction. ie AND rd,rs1,rs2(AND x8,x6,x7)
  • Encode the above binaries into the format as follows:

  • Group 4 bits each and get the hexadecimal equivalent as:0x00737433
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write LEGv8 "shift assembly instruction" to achieve the multiplication of a binary number by 16
Write LEGv8 "shift assembly instruction" to achieve the multiplication of a binary number by 16
Write a program in Mars MIPS Assembly Language that asks the user for an 8-digit hexadecimal...
Write a program in Mars MIPS Assembly Language that asks the user for an 8-digit hexadecimal and then prints out its 32-bit binary representation, the operation of the function, the format (I, R, or J), the fields associated with the format (op, rs, rt, imm, shamt, funct), and the instruction associated with the hexadecimal. All five parts must be written as functions.
Please add some explanation if possible 1.The machine code of LEGv8 instruction SUB X15,X16,X17 in hexadecimal...
Please add some explanation if possible 1.The machine code of LEGv8 instruction SUB X15,X16,X17 in hexadecimal is? 2.The LEGv8 assembly instruction assembled into the hexadecimal machine code D1001695 is? 3.What does the LEGv8 instruction below do? LSL X12,X12,#8 4. Which LEGv8 instruction set X12 to be X10's one's complement? (Assume X9 contains hexadecimal FFFFFFFF.) 5. What is the minimum number of LEGv8 assembly instructions needed to perform the following task? A[20] = A[10] + b + c - 8
Write a short RISC-V assembly program that operates on a NULL terminated string of arbitrary size...
Write a short RISC-V assembly program that operates on a NULL terminated string of arbitrary size (use your favourite phrase when you define it with DC for testing). The program (no need to define a function) scans the string and replaces every lower case character with the corresponding upper case. Your program prints the string before and after converting it to upper case.
What is the machine code that corresponds to the AVR Assembly Language Instruction and r31, r0...
What is the machine code that corresponds to the AVR Assembly Language Instruction and r31, r0 (Enter your answer as a 16 bit binary number. There must be no spaces or punctuation marks - just enter sixteen 1's or 0's.)
Write a possible assembly language instruction or set of instructions to accomplish the following: Compare the...
Write a possible assembly language instruction or set of instructions to accomplish the following: Compare the byte stored at the memory location pointed to by register R4 to the upper (higher) byte stored in register R5 b) Branch to instruction at label ‘ZERO’ if the lower byte of register R6 is zero c) Jump to the instruction at label ‘EVEN’ if the value in register R7 is an even number
Convert the hexadecimal number DEADBEEF to binary. Convert the following decimal number to binary: a) 356...
Convert the hexadecimal number DEADBEEF to binary. Convert the following decimal number to binary: a) 356              b) 658 What decimal value does the 8-bit binary number 10011110 represent if it is on a computer using two’s complement representation? What decimal value does the 8-bit binary number 10110100 have if it is on a computer using two’s complement representation? please show your work for question number 4. thank you.
2 Convert each of the following octal numbers to 10-bit binary, hexadecimal, and decimal. Show your...
2 Convert each of the following octal numbers to 10-bit binary, hexadecimal, and decimal. Show your work. (a) 368 (b) 7568 3 Convert the following binary values into Decimal, Octal and hexadecimal. Show your work. (a) 111010101011112 (b) 1010111011001102 (c) 1011101010001112 (d) 1111101011102 4 Convert the following hexadecimal numbers to 16-bit binary and decimal numbers. Show your work. (a) FE9816 (b) FCAD16 (c) B00C16 (d) FEDF16 5 Perform the addition on the following unsigned binary numbers. Indicate whether or not...
Consider the following MIPS assembly instructions: andi $s0, $t1, 65 a) What will be the machine...
Consider the following MIPS assembly instructions: andi $s0, $t1, 65 a) What will be the machine code for the assembler instruction? Justify the answer and state it in hexadecimal form. b) In which building blocks in the processor are the pieces in the machine code for the assembler instruction above used?
EE 263 Homework Assignment 1    Perform the following conversions: Convert 51 (decimal) to binary and...
EE 263 Homework Assignment 1    Perform the following conversions: Convert 51 (decimal) to binary and to hex Convert 0xD1 (hexadecimal) to binary and to decimal Convert 0b11001001 (binary) to hex and to decimal Find the 2’s complement of the following 4-bit numbers 1101 0101 Perform the following 4-bit unsigned operations. For each, indicate the 4-bit result and the carry bit, and indicate if the answer is correct or not. 5 + 8 2 + 12 13 – 7 4...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT