I have for example the number 3021 that should have a high bit of 30 and low bit 21. How can I do this? I need it to do an FTP listing thing.

here is the thing from where i'm reading from :
This address information is broken into 8-bit fields and the value of each field is transmitted as a decimal number (in character string representation). The fields are separated by commas.
http://www.vbip.com/winsock/winsock_ftp_ref_02.asp

Thanks in advance