A[0] is the low-order bit.

A[k-1] is the high-order bit.

Increment(A) i = 0 while i < length(A) and A[i] = 1 A[i] = 0 i = i+1 if i < length(A) then A[i] = 1

- The worst case run time is ,
- Over n calls, worst case is O(nk),
- But actual worst-case run time for n calls is O(n).