Convert IntToBin
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
Begin
Result := Result +
'0' ;
End ;
End ;
End ;
Example
:
Caption := IntToBin ( 10 , 8 ) ;