Why halving means O(log n)

Binary search throws away half the remaining items each step. The question "how slow is it?" becomes "how many times can you halve n before you reach 1?" — and that count is log₂(n).

Start with n =
Remaining items (halved each step)
Halvings to reach 1
0
×1000 the input, +10 steps
n161,02410⁶10⁹
steps4102030