Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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