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
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.
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...
1. Write the single-precision Representation for the following decimal number. (-0.625) or -5/8. Final Results must...
1. Write the single-precision Representation for the following decimal number. (-0.625) or -5/8. Final Results must be in HEX. SHOW WORK PLEASE. 2. Given Hexadecimal 0x3F300000, convert it to decimal number if it is a single precision floating point number. SHOW WORK PLEASE.
Please Write the whole program in assembly i am able to calculate the fibonacci series but...
Please Write the whole program in assembly i am able to calculate the fibonacci series but not sure how to print it in reverse order. Please give a Complete code !! Programming Exercise 1 (10 points): [call it Ass2-Q1.asm] Write an ASM program that reads an integer number N and then displays the first N values of the Fibonacci number sequence, described by: Fib(0) = 0, Fib(1) = 1, Fib(N) = Fib(N-2) + Fib(N-1) Thus, if the input is N...
Please complete in MASM (x86 assembly language). Use the code below to get started. Write a...
Please complete in MASM (x86 assembly language). Use the code below to get started. Write a program that uses a loop to calculate the first seven values of the Fibonacci number sequence, described by the following formula: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n – 1) + Fib(n – 2). .386 .model flat,stdcall .stack 4096 ExitProcess PROTO,dwExitCode:DWORD .data    ; define your variables here .code main PROC    ; write your assembly code here    INVOKE ExitProcess,0 main...
Please use loop and branch instructions to write an assembly code segment to do the following:...
Please use loop and branch instructions to write an assembly code segment to do the following: Read DIP switch. If DIP switch has the setting: b7 = b0 = 1, then, load A with number $11, load B with number $22, and do A+B; save the result to memory location $1000; if DIP switch has the setting: b4= b3 = 1, then, load A with number $55, load B with number $33, and do A-B; save the result to memory...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT