add digits! function

Added a digits! function, with an optimization for the arguably common case of base = 2.
Why must it return a? a is being modified internally by the function. I don't see any harm in returning a, but I don't see any benefits either.