• 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 3 out of 17 pages
Exam (elaborations)

CDA3100 Final Study Revised Questions

Document preview thumbnail
Preview 3 out of 17 pages

CDA3100 Final Study Revised Questions

Content preview

CDA3100 Final Study Revised Questions
1.What does the following instruction perform? li $s1,10: Loads the
integer value of 10 into register $s1
2.What is the value of Register $s1 after the following set of
instructions? li $s1,10
addiu $s1,$s1,10: 20
3.What is the difference between the ADD and ADDU instruction?: The
ADDU allows negative numbers but does not check for overflow.
4.Why is there no Subtract Immediate in MIPS?: It would be redundant
because you can add negative immediate numbers using the ADDI or
ADDIU instruction.
5.What is the result of the following Code Segment?
.data
MSG1: .asciiz "Hello World"
.text
.globl main
main: li $v0,4
la $a0,MSG1
syscall
jr $ra: Prints the message Hello World
6.What is the purpose of Line #8?
.data # Line #1
MSG1: .asciiz "Hello World" # Line #2
.text # Line #3
.globl main # Line #4
main: li $v0,4 # Line #5
la $a0,MSG1 # Line #6
syscall # Line #7
jr $ra # Line #8: Returns control to the operating system or stops the
program
7.What is the purpose of Line #6?
.data # Line #1
MSG1: .asciiz "Hello World" # Line #2
.text # Line #3
.globl main # Line #4
main: li $v0,4 # Line #5
la $a0,MSG1 # Line #6
syscall # Line #7
jr $ra # Line #8: Put the address of MSG1 into register $a0
1/
17

,8.What value will be contained in Register $s1 after the following code
seg- ment?
li $s1,10
li $s2,3
div $s1,$s2
mvhi $s1:
1
9.What value will be contained in Register $s1 after the following code
seg- ment?
li $s1,10
li $s2,3
mul $s1,$s1,$s2: 30
10.What is a faster way to multiply and divide using numbers that are
powers of 2?: Shift Left for multiplication, Shift Right for division.
11.Match the service code that is loaded into register $v0 with the
description of the service

(1) : Print Integer
12.Match the service code that is loaded into register $v0 with the
description of the service.

(2) : Print Single Float
13.Match the service code that is loaded into register $v0 with the
description of the service.

(3) : Print Double Float
14.Match the service code that is loaded into register $v0 with the
description of the service.

(4) : Print String
15.Match the service code that is loaded into register $v0 with the
description of the service.

(5) : Read an Integer
16.Match the service code that is loaded into register $v0 with the
description of the service.

(6) : Read a Single Float
17.Match the service code that is loaded into register $v0 with the
description of the service.
2/
17

, (7) : Read a Double Float




3/
17

Document information

Uploaded on
June 25, 2025
Number of pages
17
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$22.99

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.
HESIGRADER001
2.6
(8)
Sold
50
Followers
41
Items
4054
Last sold
8 months 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