Removed the need to reverse the string after caluclating the binary representation