Question: Using RISCV a) Write an assembly language subroutine converts a four-digit binary coded decimal value to binary value. Assume the lower halfword of register x10,
Using RISCV
a) Write an assembly language subroutine converts a four-digit binary coded decimal value to binary value. Assume the lower halfword of register x10, stores the value. Place the final binary number in register x20. Minimize the number of instructions in your solution. b) Write an assembly language subroutine that counts the number of bits that are set in register x10 and x11. If both registers have the same number of bits set, clear both registers. Otherwise, replace the value in the register with the higher number of set bits with the number of bits that are set in that register (don't alter the other register). For example, if four bits are set, place 0x04 in that register. Minimize the number of instructions you use in your solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
