Questions: Assembly Language Basics

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

In a RISC assembly program, a programmer wants to add two values stored in memory. What must happen before the addition can occur?

AThe ADD instruction can directly reference memory addresses as its operands
BThe values must be loaded into registers first, because arithmetic operations work only on register contents
CThe values must be converted to hexadecimal before the processor can handle them
DThe programmer must declare the memory addresses as variables at the start of the program
Question 2 Multiple Choice

A student writes `lw $t0, 8($sp)`. Which addressing mode is this, and what does it do?

AImmediate addressing — it loads the constant 8 into register $t0
BRegister addressing — it copies the value of $sp into $t0, offset by 8 bits
CBase-plus-offset addressing — it loads the word in memory at address (sp + 8) into $t0
DIndirect addressing — it loads the word at the address stored in memory location 8
Question 3 True / False

Assembly language and machine code are equivalent terms — both refer to the binary instructions a CPU executes.

TTrue
FFalse
Question 4 True / False

In a RISC assembly program, all control flow — if-else, loops, and function calls — ultimately reduces to conditional and unconditional jump instructions.

TTrue
FFalse
Question 5 Short Answer

Why does the load-store model — where arithmetic happens only in registers and memory is accessed only through explicit load/store instructions — make hardware design simpler and faster?

Think about your answer, then reveal below.