{****Value是要转换的十进制数,Count是输出的二进制位数,默认32位****}
function IntToBin(Value: Integer; Count: Integer=32): string;
var
iTemp: Integer;
begin
Result := ´´;
while Count>0 do
begin
iTemp := Value shr (Count-1) and 1;
case iTemp of
1: Result := Result+´1´;
0: Result := Result+´0´;
end;
Dec(Count);
end;
end;
function IntToBin(Value: Integer; Count: Integer=32): string;
var
iTemp: Integer;
begin
Result := ´´;
while Count>0 do
begin
iTemp := Value shr (Count-1) and 1;
case iTemp of
1: Result := Result+´1´;
0: Result := Result+´0´;
end;
Dec(Count);
end;
end;