function IntToBin(AInt: Integer): string; begin Result := ''; for var lIndex := 1 to Sizeof(AInt) * 8 do Result := Result + (AInt shr (Sizeof(AInt) * 8 - lIndex) and 1).ToString; end;
转自群里大佬的代码:
标签:AInt,二进制,delphi,整型,lIndex,Sizeof,Result From: https://www.cnblogs.com/yoooos/p/16660865.html