CSE230 Exam 2025 Questions and
Answers
After having run both of the following instructions, what value will be in register
t8?
li $t8, 2
li $t8, 4 - ANSWER-4
If register t0 contains 0 and t1 contains 4, what will the following instruction do?
sw $t0, 0($t1) - ANSWER-Copy the contents of register t0 into the memory
address, 4
If register t2 contains 1 and register t3 contains 1, what value will they contain after
running the following instruction? - ANSWER-t2 will contain 2 and t3 will contain
1
Which of the following code snippets results in a loop? - ANSWER-label:
j label
Which of the following instructions will read a value from memory and copy it into
a register? - ANSWER-lw - The load immediate (li) instruction loads a value given
COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 1
, in the instruction (i.e. an immediate value) directly into a register and does not
interact with memory. The store word (sw) instruction performs a write to memory
rather than a read. Both the add immediate (addiu) and shift left logical (sll)
instructions only interact with registers and do not read from or write to memory.
Which of the following instructions will write a value from a register into memory?
- ANSWER-sw - The load immediate (li) instruction loads a value given in the
instruction (i.e. an immediate value) directly into a register and does not interact
with memory. The store word (sw) instruction performs a write to memory rather
than a read. Both the add immediate (addiu) and shift left logical (sll) instructions
only interact with registers and do not read from or write to memory.
At any given time while a program is running, where is the current value of the
switches located? - ANSWER-Memory address: 0xf0100000
If switch 2 and switch 3 are both set, what value will be read from the switches? -
ANSWER-12 (2^2 + 2^3)
Which types of instructions have branch delay slots? - ANSWER-Jump and branch
instructions
What is the smallest value that can be written to the address of the LED array in
order to turn on all 8 LEDs? - ANSWER-0xff
Which value, when written to the memory address of the LED array, will turn on
LEDs 0, 2, and 4? - ANSWER-0b10101
COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 2
Answers
After having run both of the following instructions, what value will be in register
t8?
li $t8, 2
li $t8, 4 - ANSWER-4
If register t0 contains 0 and t1 contains 4, what will the following instruction do?
sw $t0, 0($t1) - ANSWER-Copy the contents of register t0 into the memory
address, 4
If register t2 contains 1 and register t3 contains 1, what value will they contain after
running the following instruction? - ANSWER-t2 will contain 2 and t3 will contain
1
Which of the following code snippets results in a loop? - ANSWER-label:
j label
Which of the following instructions will read a value from memory and copy it into
a register? - ANSWER-lw - The load immediate (li) instruction loads a value given
COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 1
, in the instruction (i.e. an immediate value) directly into a register and does not
interact with memory. The store word (sw) instruction performs a write to memory
rather than a read. Both the add immediate (addiu) and shift left logical (sll)
instructions only interact with registers and do not read from or write to memory.
Which of the following instructions will write a value from a register into memory?
- ANSWER-sw - The load immediate (li) instruction loads a value given in the
instruction (i.e. an immediate value) directly into a register and does not interact
with memory. The store word (sw) instruction performs a write to memory rather
than a read. Both the add immediate (addiu) and shift left logical (sll) instructions
only interact with registers and do not read from or write to memory.
At any given time while a program is running, where is the current value of the
switches located? - ANSWER-Memory address: 0xf0100000
If switch 2 and switch 3 are both set, what value will be read from the switches? -
ANSWER-12 (2^2 + 2^3)
Which types of instructions have branch delay slots? - ANSWER-Jump and branch
instructions
What is the smallest value that can be written to the address of the LED array in
order to turn on all 8 LEDs? - ANSWER-0xff
Which value, when written to the memory address of the LED array, will turn on
LEDs 0, 2, and 4? - ANSWER-0b10101
COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 2