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;
posted on 2010-12-19 13:11  fyen  阅读(284)  评论(0编辑  收藏  举报