A processor uses a 2-bit saturating counter for branch prediction with states: 00 (Strongly Not Taken), 01 (Weakly Not Taken), 10 (Weakly Taken), and 11 (Strongly Taken). The counter is currently in state 10. The next four executions of this branch result in the actual outcomes: Taken, Not Taken, Not Taken, Taken. What is the final state of the predictor after these four executions?
Let's trace the state machine step-by-step. Start at 10 (Weakly Taken). 1st outcome is Taken: state saturates up to 11. 2nd outcome is Not Taken: state decrements to 10. 3rd outcome is Not Taken: state decrements to 01. 4th outcome is Taken: state increments back to 10. The final state is 10 (Weakly Taken).