The only way I know how to do that is to convert the number into a string and then if necessary, add the leading zeros to the string with additional code. Here is a start in standard C using printf:
char buffer [33];
itoa (i,buffer,2);
printf ("binary: %s\n",buffer);