function IntToBin(Value: Byte): string;overload;
var
i: Integer;
begin
SetLength(result, 8);
for i := 1 to 8 do
begin
if ((Value shl (i - 1)) shr 7) = 0 then
result[ i ] := '0'
else
result[ i ] := '1';
end;
end;
function IntToBin(Value: Byte): string;overload;
var
i: Integer;
tmpByte : Byte;
begin
SetLength(result, 8);
for i := 1 to 8 do
begin
tmpByte := Value shl (i - 1);
tmpByte := tmpByte shr 7;
if tmpByte = 0 then
result[ i ] := '0'
else
result[ i ] := '1';
end;
end;