CSE 490/590 – Quiz 2 – February 28, 2025 – V2
Instructions:
1. This Quiz is closed book and closed notes.
2. You may have pens, pencils, erasers, a calculator, and a water bottle/drink.
3. Electronic devices are NOT ALLOWED during this Quiz, with the exception of a
calculator. You shall NOT share a calculator with others during the Quiz.
4. Place your student ID card on your desk for us to review.
5. When you are finished, remain in your seat and raise your hand and we will come and
collect your Quiz. You must not talk to anyone in the room until your Quiz has been
collected, and you have left the room.
6. Any form of cheating/academic integrity violation, including (but not limited to)
violation of the rules above will result in an automatic 0 for the Quiz.
Please fill your name in the blank and sign the statement below:
I, ________________________________________________________________,
have read, and acknowledge that I will adhere to the instructions above and if not followed, I will
accept the penalty given by the instructor.
Signature: ________________________________________
STOP!! PLEASE DO NOT START THE QUIZ
UNTIL YOU ARE TOLD TO DO SO
FOR GRADERS ONLY:
Q1: ___________6 points Q4: ___________10 points
Q2: ___________6 points Q5: ___________10 points
Q3: ___________6 points Q6: ___________12 points
Total: _____________50 points
, February 28 2025 CSE 490/590 Spring 2025 Quiz 2 – V2 Duration: 40 min
[Question 1] (6 Points)
Consider the following list of instructions. Assume that the initial values for $s1, $s2 and $s3 are
all 10:
loop: addi $s1, $s1, -3
sub $s2, $s2, $s1
sub $s3, $s3, $s2
addi $s3, $s3, -3
bne $s3, $s1, loop
Assume that we have a 1-bit branch predictor that stores the result of the last branch and makes
the prediction based on the result. Show the results of all predictions throughout the execution.
(Use T/N to represent Taken/Not Taken)
Branch Prediction (T/N) Actual (T/N)
1st bne N
Page 2
Instructions:
1. This Quiz is closed book and closed notes.
2. You may have pens, pencils, erasers, a calculator, and a water bottle/drink.
3. Electronic devices are NOT ALLOWED during this Quiz, with the exception of a
calculator. You shall NOT share a calculator with others during the Quiz.
4. Place your student ID card on your desk for us to review.
5. When you are finished, remain in your seat and raise your hand and we will come and
collect your Quiz. You must not talk to anyone in the room until your Quiz has been
collected, and you have left the room.
6. Any form of cheating/academic integrity violation, including (but not limited to)
violation of the rules above will result in an automatic 0 for the Quiz.
Please fill your name in the blank and sign the statement below:
I, ________________________________________________________________,
have read, and acknowledge that I will adhere to the instructions above and if not followed, I will
accept the penalty given by the instructor.
Signature: ________________________________________
STOP!! PLEASE DO NOT START THE QUIZ
UNTIL YOU ARE TOLD TO DO SO
FOR GRADERS ONLY:
Q1: ___________6 points Q4: ___________10 points
Q2: ___________6 points Q5: ___________10 points
Q3: ___________6 points Q6: ___________12 points
Total: _____________50 points
, February 28 2025 CSE 490/590 Spring 2025 Quiz 2 – V2 Duration: 40 min
[Question 1] (6 Points)
Consider the following list of instructions. Assume that the initial values for $s1, $s2 and $s3 are
all 10:
loop: addi $s1, $s1, -3
sub $s2, $s2, $s1
sub $s3, $s3, $s2
addi $s3, $s3, -3
bne $s3, $s1, loop
Assume that we have a 1-bit branch predictor that stores the result of the last branch and makes
the prediction based on the result. Show the results of all predictions throughout the execution.
(Use T/N to represent Taken/Not Taken)
Branch Prediction (T/N) Actual (T/N)
1st bne N
Page 2