I have read various explanations why a 1-bit branch predictor is wrong twice per loop, once at the beginning when it wrongly predicts against entering the loop and once at the end when it wrongly predicts against leaving the loop. Makes sense.
What I don't understand is why the 2-bit predictor is better. It seems it could even be worse, since it might well predict against entering the loop in the first place, hold to that prediction for a second time before beginning to be "right," and then still wrongly predict against leaving the loop at the end.
I could live with "in practice it turns out to not happen that way all that often," but most of these explanations don't seem to be based on such. Rather, they seem (to me) to begin with a demonstration how the 1-bit predictor fails twice, and then merely state that the 2-bit predictor does better without demonstrating that it does.
So...what am I missing?