I'm not sure if I understand you correctly, but if you want to convert int to displayable binary, one quick approach would be to store remaining parts of division (which is either 1 or 0) in char array, eg.
...and then simply reverse array and print output.Code:int i = 0; while ( num > 0 ) { // num == int that'd be converted to binary if ( num % 2 == 0 ) charArray[i] = '0'; else charArray[i] = '1'; num /= 2; i++; }