logo

UTK Notes


Instructions Practice

Question 1

Which of the following registers are used for function arguments? (select all that apply)

a1, a3, a4

Question 2

To request services from the operating system, the service’s number must be placed in what register?

a7

Question 3

A/an pseudo is an instruction that doesn’t exist on the machine, but it is instead expanded by the assembler.

Question 4

Which of the following corresponds with the code below?

1
t1 %= a0; 

rem t1, t1, a0

Question 5

Which of the following statements correspond to the instruction below?

slli  t0, a0, 3

t0 = a0 << 3

Question 6

Which of the following data types corresponds to the following instruction?

lbu t0, 0(sp)

unsigned char

Question 7

Which of the following allocates 64 bits on the stack?

addi sp, sp, -8

Question 8

How many floating-point registers are in a RISC-V machine?

32

Question 9

Which of the following best describes the register that stores the address of the instruction after a call.

ra

Question 10

What instruction requests services from the operating system?

ecall

Question 11

A/an Branch instruction is an instruction that is executed based on a condition.

Question 12

Which of the following best describes the term immediate?

a small literal encoded directly into the instruction.

Question 13

How many bits does each RISC-V register store?

64

Question 14

Which of the following C++ statements corresponds with the instruction below?

add t0, a2, a4

t0 = a2 + a4