Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume a processor that always predicts that conditional branches are not taken.

ID: 3820433 • Letter: A

Question


Assume a processor that always predicts that conditional branches are not taken. What percentage of the time would predict correctly for the following block of code? Percentage Correct: ___ If we modify the hardware so that the first time it encounters a conditional branch it predicts that it is not taken but after that it predicts it will do whatever it did on the previous time it executed the loop what will be the percentage of the time it will predict correctly? Modified Percentage Correct ___

Explanation / Answer

Here is 5 Instruction out of those 2 is conditional which is not taken(NT) and else is taken(T)

Actual : T NT T T NT

Predict: NT NT NT NT NT

Percentage Correct = 2/5 = 0.4

Actual : T NT T T T

Predict : NT NT NT NT NT

modified Percentage correct : 1/5 = 0.2

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote