100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

CSE 230 exam 1 UPDATED ACTUAL Exam Questions and CORRECT Answers

Beoordeling
-
Verkocht
-
Pagina's
5
Cijfer
A+
Geüpload op
19-08-2025
Geschreven in
2025/2026

CSE 230 exam 1 UPDATED ACTUAL Exam Questions and CORRECT Answers For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables f, g, h, and i are given and could be considered 32-bit integers as declared in a C program. Use a minimal number of MIPS assembly instructions. f = g + (h − 5); - CORRECT ANSWER addi i ,h, -5 add f, g, i For the following MIPS assembly instructions above, what is a corresponding C statement? add f, g, h add f, i, f - CORRECT ANSWER add f,i,f add f,g,h

Meer zien Lees minder
Instelling
CSE
Vak
CSE









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
CSE
Vak
CSE

Documentinformatie

Geüpload op
19 augustus 2025
Aantal pagina's
5
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

CSE 230 exam 1 UPDATED ACTUAL
Exam Questions and CORRECT Answers
For the following C statement, what is the corresponding MIPS assembly code? Assume that the
variables f, g, h, and i are given and could be considered 32-bit integers as declared in a C
program. Use a minimal number of MIPS assembly instructions.

f = g + (h − 5); - CORRECT ANSWER addi i ,h, -5
add f, g, i


For the following MIPS assembly instructions above, what is a corresponding C statement?

add f, g, h add f, i, f - CORRECT ANSWER add f,g,h
add f,i,f


For the following C statement, what is the corresponding MIPS assembly code? Assume that the
variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively.
Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively.

B[8] = A[i−j]; - CORRECT ANSWER sub $s5, $s2, $s3
sll $s5,$s5,2
add $s5,$s6,$s5
lw $s6, 0($s5)
św $s6, 32 $(s7)


For the MIPS assembly instructions below, what is the corresponding C statement? Assume that
the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively.
Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively.
sll $t0, $s0, 2 # $t0 = f * 4
add $t0, $s6, $t0 # $t0 = &A[f]
sll $t1, $s1, 2 # $t1 = g * 4
add $t1, $s7, $t1 # $t1 = &B[g]
lw $s0, 0($t0) # f = A[f]

, addi $t2, $t0, 4
lw $t0, 0($t2)
add $t0, $t0, $s0

sw $t0, 0($t1) - CORRECT ANSWER B[g] = A[f] + A[1+f];


For the following C statement, write a minimal sequence of MIPS assembly instructions that
does the identical operation. Assume $t1 = A, $t2 = B, and $s1 is the base address of C.

A = C[0] << 4; - CORRECT ANSWER lw $t3, 0($s1)
sll $t1, $t3, 4


Assume $t0 holds the value 0x00101000. What is the value of $t2 after the following
instructions?


slt $t2, $0, $t0
bne $t2, $0, ELSE
j DONE
ELSE: addi $t2, $t2, 2

DONE: - CORRECT ANSWER $t2 = 3


What is 5ED4 - 07A4 when these values represent unsigned 16- bit hexadecimal numbers? The
result should be written in hexadecimal. Show your work. - CORRECT ANSWER 5730


Convert 5ED4 into a binary number. What makes base 16 (hexadecimal) an attractive numbering
system for representing values in computers? - CORRECT ANSWER 0101 1110 1101 0100


What is 4365 - 3412 when these values represent unsigned 12-bit octal numbers? The result
should be written in octal. Show your work. - CORRECT ANSWER 7777 = 111 111 111 111


Assume 185 and 122 are unsigned 8-bit decimal integers. Calculate 185 - 122. Is there overflow,
underflow, or neither? - CORRECT ANSWER 63, Neither.
€10,09
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten


Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
MGRADES Stanford University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
1078
Lid sinds
1 jaar
Aantal volgers
102
Documenten
68972
Laatst verkocht
1 dag geleden
MGRADES (Stanford Top Brains)

Welcome to MGRADES Exams, practices and Study materials Just think of me as the plug you will refer to your friends Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3,8

171 beoordelingen

5
73
4
30
3
46
2
8
1
14

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen