function IntToBin(Value: LongInt;Size: Integer): String;
var
i: Integer;
begin
Result:='';
for i:=Size do
wnto 0 do
begin
if Value and (1 shl i)<>0 then
begin
Result:=Result+'1';
end else
begin
Result:=Result+'0';
end;
end;
end;
function BinToInt(Value: String): LongInt;
var
i,Size: Integer;
begin
Result:=0;
Size:=Length(Value);
for i:=Size do
wnto 0 do
begin
if Copy(Value,i,1)='1' then
begin
Result:=Result+(1 shl i);
end;
end;
end;
HEX -> Integer
var
i : integer
s : string;
begin
s := '$' + ThatHexString;
i := StrToInt(a);
end;
intohex DELPHI自己有!