I'm assuming you want to convert them to ascii. Binary is fairly simple.

Just load the number into a register shift left, the carry flag will tell you if the next digit is a zero or a one, store it into your buffer, repeat for all the bits in the register.

Converting to decimal requires a bit of knowledge of the ASCII table.
Work on it one byte at a time. Each nibble in the byte represents one hex digit which still needs to be converted into a decimal digit.
-isolate the high order nibble
-OR it with char '0'
-if the result is greater than char '9', then add 7 (not char '7'!) to the result.
-append this into your buffer.
-repeat with low order nibble.