• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 10 pages
Exam (elaborations)

CSE230 Question and answers rated A+ 2025/2026

Document preview thumbnail
Preview 2 out of 10 pages

CSE230 Question and answers rated A+ 2025/2026 After having run both of the following instructions, what value will be in register t8? li $t8, 2 li $t8, 4 - correct answer 4 If register t0 contains 0 and t1 contains 4, what will the following instruction do? sw $t0, 0($t1) - correct 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? - correct answer t2 will contain 2 and t3 will contain 1 Which of the follow

Content preview

CSE230 Question and answers rated A+
2025/2026
After having run both of the following instructions, what value will be in register t8?

li $t8, 2

li $t8, 4 - correct answer 4



If register t0 contains 0 and t1 contains 4, what will the following instruction do?

sw $t0, 0($t1) - correct 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? - correct answer t2 will contain 2 and t3 will contain 1



Which of the following code snippets results in a loop? - correct answer label:

j label



Which of the following instructions will read a value from memory and copy it into a register? - correct
answer lw - 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.



Which of the following instructions will write a value from a register into memory? - correct 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? -
correct answer Memory address: 0xf0100000

, If switch 2 and switch 3 are both set, what value will be read from the switches? - correct answer 12
(2^2 + 2^3)



Which types of instructions have branch delay slots? - correct 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? - correct answer 0xff



Which value, when written to the memory address of the LED array, will turn on LEDs 0, 2, and 4? -
correct answer 0b10101



Assume that register $t2 contains 0xf0100000. Which instruction will copy the current value of the
switches into register $s1? - correct answer lw $s1, 0($t2)

The first argument in the load word instruction is the destination register, which is where the value
copied from memory will be placed.



Assume that register $s3 contains 0xf0200000 and register $t4 contains 0b101. Which instruction will
turn on LEDs 2 and 0? - correct answer sw $t4, 0($s3)

The first argument in the store word instruction is the source register, which is where the value being
copied to memory will come from.



The following branch will never be taken:

bne $t0, $t0, label - correct answer True



If registers $t1, $t2, and $t3 all contain 2, what value will each of them contain after running the
following instruction?

addu $t1, $t2, $t3 - correct answer $t1 - 4

$t2 - 2

Document information

Uploaded on
October 18, 2025
Number of pages
10
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$16.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
flyhigher329
3.7
(61)
Sold
386
Followers
175
Items
18474
Last sold
3 weeks ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions