Question: Using your suite of RISC - V instructions, create a pseudorandom number generator using arithmetic and bitwise logical instructions. a . Write a RISC -
Using your suite of RISCV instructions, create a pseudorandom number generator using
arithmetic and bitwise logical instructions.
a Write a RISCV program that will use a loop to generate random numbers and store
them in an array beginning at memory location in data memory. please use these instructions only Arithmetic: ADD, ADDI, SUB
Logical: AND, ANDI, OR ORI, XOR, XORI
Shift: SLLI
Memory: LW SW
Jump: JAL
Branch: BEQ, BNE, BLT BGE
i Hand in your code for this program as well as a list of the numbers you
generated.
b Given the first random number, write a RISCV program to determine how many
numbers must be generated in order to revisit the first number.
i Hand in your code for this program
ii Hand in the first random number and the number of steps it takes to revisit that
first number.
c Create and hand in a report that explains your algorithm for your random number
generator and includes the components mentioned in parts a and b
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
