• 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 11 pages
Exam (elaborations)

COT exam Final pt 1 Questions With Complete Solutions

Document preview thumbnail
Preview 2 out of 11 pages

COT exam Final pt 1 Questions With Complete Solutions

Content preview

COT exam Final pt 1 Questions With Complete Solutions

$t0 is a read-only register (T/F) Correct Answers false

A comment in MIPSzy begins Correct Answers #

A subroutine is called using the instruction Correct Answers jal

A subroutine is returned using the instruction: Correct Answers
jr $ra

A subroutine should push all the registers it uses onto the
program stacks t the beginning of the subroutine Correct
Answers True

Assume
$t0: 20
$t1: 30
$t2: 40
What is in $t2 after the following instructions:
addi $t2, $t2, 1
add $t2, $t1, $t0 Correct Answers 50

Assume $t1 holds 5100. Which instruction copies the contents
of $t0 into memory location 5100(DM[4100]) Correct Answers
sw $t0, 0($t1)

Assume $t1 holds 5100. Which instruction copies the contents
of data memory location 5100 (DM[5100]) into $t0 Correct
Answers lw $t0, 0($t1)

, Assume that a subroutine, sub, is loaded beginning at address
1000. A program calls sub with the instruction: jal sub. If jal sub
is at address 2000, what is in $ra after Jalynns sub exectues
Correct Answers 2000??

Assume that the address of variables X and Y are in registers $t0
and $t1, respectively. Which assembly program implements C
statement below?
while ( x>=y)
x = x+ 1; Correct Answers while: blt $t0, $t1 endWhile
addi $t0, $t0, 1
j while
endWhile:

Assume that the address of variables X and Y are in registers $t0
and $t1, respectively. Which of the following assembly
programs implements C statement: x = y-2?
(lw $t2, 0($t1)
addi $t2, $t2, -2
sw $t2, 0($t0)) Correct Answers lw $t2, 0($t1)
addi $t2, $t2, -2
sw $t2, 0($t0)

Assume that the base of an array x is at DM[5000]. Which
MIPSzy instruction read x[1] into register 3? Correct Answers
addi $t0, $zero, 5000
lw $t3, 4($t0)

Assume that variable x is in DM[5100]. Which MIPSzy
instruction implements C statement x = 2; Correct Answers
addi $t0, $zero, 2

Document information

Uploaded on
January 28, 2026
Number of pages
11
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.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.
Classroom
4.0
(1209)
Sold
4998
Followers
3246
Items
56602
Last sold
3 hours 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