Computer Architecture – RISC-V Assembly Language Program

1) Write a program that adds two vectors of length 4, A[0,1,2,3] B[0,1,2,3] and stores the results in the vector C[0,1,2,3]. The address of the vectors are in respectively, x2,x3, and x5.
2) For the following C statement, write the corresponding RISC-V assembly code. Assume that the variables f, g, h, i, and j are assigned to registers x5, x6, x7, x28, and x29, respectively. Assume that the base address of the arrays A and B are in registers x10 and x11, respectively. B[8] = A[i−j].
(We have covered basic arithmetic, logic, and store/load instructions in class, so the answer needs that. I do NOT understand the content adequately! If you want to explain the actual topic for me I’d really appreciate it because this assembly language is very difficult and complicated.)