Re: Convert number to binary

Posted by Geof on November 14, 2007

In Reply to Convert ASCii posted by freddyarimbi on November 13, 2007

: i'm having problem using delphi to convert ascii code into binary code. ex: A = 65(Dec), 1000001(binary)
: is there any function in Delphi that can convert from dec into binary code? please help

Delphi has the built-in functions IntToStr (returns a string that is the decimal representation of a number) and IntToHex (returns a string that is the hexadecimal representation of a number). But alas, Delphi has no "IntToBinary" function.

You'll have to write the function yourself ;)
Or otherwise, search the Net for a library that contains such a function. If you find it, maybe let me know how it goes? :-p

Related articles


Follow Ups