Add efficinet method to get binary string from num. TODO: extend numdigits to take a base