Working for everything except when base 2 is greater than 16.