The number of digits in (base ) is . For example, has digits, and .
This works because , so . You can compute the number of digits without converting to a string.
Algorithms that process digits (like summing digits or reversing a number) run in time, which is the same as in Big-O notation.