Would it be possible to flip the image? I think it’s a typo in the book. When the book says “you have to check log n elements” it really means that. So the example log 8 == 3 should mean that with 8 elements the code runs a max of 3 times in the worst case. Log 1024 == 10 means with 1,024 elements you have to run a max of 10 times.
I could be misreading some contextual element but the number 4 seems out of place.