write nat-to-bin conversion function. i think it's quadratic but i'm not sure. is there a better way that's linear in the size of n? is there just a better way to do it?