Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CSE 140 || with 100% Correct Answers.

Beoordeling
-
Verkocht
-
Pagina's
18
Cijfer
A+
Geüpload op
07-04-2026
Geschreven in
2025/2026

CSE 140 || with 100% Correct Answers.

Instelling
CSE 140
Vak
CSE 140

Voorbeeld van de inhoud

CSE 140 || with 100% Correct Answers.
for(i = 0; i < 100; i++)
{
sum+=A[i];
}


$s0 = &A
$v0 = sum correct answers add $t0, $t0, $zero #let i = 0
addi $t1, $zero, 100 #temp = 100
LOOP: lw $t3, 0($s0) #temp1 = A[i]
add $v0, $v0, $t3 #sum += temp1
addi $s0, $s0, 4 #addr of A[i+1]
addi $t0, $t0, 1 #i = i+1
bne $t1, $t0, LOOP #if i < 100


To implement the following C code, what are the
instructions that we should put in the box?


for(i = 0; i < 100; i++)
A[i] = i;


add $t0, $zero, $zero
addi $t1, $zero, 100
LOOP: ??
??
addi $t0, $t0, 1
beq $t0, $t1, LOOP correct answers sw $t0, 0($s2)

,addi $s2, $s2, 4


Which of the following is NOT correct about these two
ISAs?
A. x86 provides more instructions than MIPS
B. x86 usually needs more instructions to express a program
C. An x86 instruction may access memory for 3 times
D. An x86 instruction may be shorter than a MIPS instruction
E. An x86 instruction may be longer than a MIPS instruction correct answers B. x86 usually
needs more instructions to express a program


Assume that we have an application composed with a total of 500000
instructions, in which 20% of them are the load/store instructions with an
average CPI of 6 cycles, and the rest instructions are integer instructions
with average CPI of 1 cycle. If the processor runs at 1GHz, how long is
the execution time?
A. 500000 ns
B. 1000000 ns
C. 1750000 ns
D. 3500000 ns
E. None of the above
500000 correct answers B. 1000000 ns


500000 * (0.8*1+0.2*6) * 1 ns = 1000000 ns


http://cseweb.ucsd.edu/classes/su12/cse141-a/slides/Performance_20120809.pdf

, • Assume that we have an application composed with a total of 500000
instructions, in which 20% of them are the load/store instructions with
an average CPI of 6 cycles, and the rest instructions are integer
instructions with average CPI of 1 cycle.
• If we double the clock rate to be 2GHz without improve the
memory latency, the average CPI for load/store instruction will also
be doubled to 12 cycles. What's the performance improvement after
this change?
A. No change
B. 1.25
C. 1.5
D. 2
E. None of the above correct answers B. 1.25


ETnew = 500000 * (0.8*1+0.2*12) * 0.5 ns = 800000 ns
Speedup = ETold/ETnew=1000000/800000 = 1.25


http://cseweb.ucsd.edu/classes/su12/cse141-a/slides/Performance_20120809.pdf


Why does an Intel Core i7 @ 2.8 GHz usually
perform better than an Intel Core 2 Extreme @ 3.2
GHz or AMD Phenom II X4@3.4GHz?
A. Because the instruction count of the program are different
B. Because the clock rate of Phenom II is higher
C. Because the CPI of Core i7 is better
D. Because the clock rate of Phenom II is higher and CPI of Core i7 is better
E. None of the above correct answers C. Because the CPI of Core i7 is better

Geschreven voor

Instelling
CSE 140
Vak
CSE 140

Documentinformatie

Geüpload op
7 april 2026
Aantal pagina's
18
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$13.59
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

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.
SirAnton NURSING, ECONOMICS, MATHEMATICS, BIOLOGY, AND HISTORY MATERIALS BEST TUTORING, HOMEWORK HELP, EXAMS, TESTS, AND STUDY GUIDE MATERIALS WITH GUARANTEED A+ I am a dedicated medical practitioner with diverse knowledge in matters
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
779
Lid sinds
3 jaar
Aantal volgers
438
Documenten
38563
Laatst verkocht
12 uur geleden
Reign Supreme Scholarly || Enlightened.

Get your revised study materials available here and elevate your educational outcomes. I have numerous verified learning materials (Research, Exams Questions and answers, Assignments, notes etc) for different courses guaranteed to boost your academic results. I am dedicated to offering you the best and unique learning content. You are encouraged to inquire further assistance from this end whenever need be. Kindly remember to leave your review, understanding your satisfaction is essential . We highly appreciate clients who always come back for more of the study content we offer, you are extremely valued. All the best.

Lees meer Lees minder
3.7

116 beoordelingen

5
49
4
20
3
23
2
8
1
16

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

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen