function IntToBin(Value: LongInt; Size: integer): string; //十进制To二进制
var
i: integer;
begin
result := '';
for i := Size downto 0 do
if Value and (1 shl i) <> 0 then
result := result + '1'
else
result := result + '0';
十六到十
s:='$'+s;
i:=strtoint(s)
十到二
function inttobin(value:longint;size:integer):string;
var
i:integer;
begin
result:='';
for i:=size downto 0 do
begin
if value and( 1 shl i)<>0 then
begin
result:=result+'1';
end else
result:=result+'0';
end;
var
s:array[0..3] of string;
for i:=0 to 3 do
s:=copy(s,i*2,2);