Delphi-Quellcode:
function IntToBin(Int: Integer): String;
var
i : Integer;
begin
Result := '';
for i := 7 downto 0 do
Result := Result + IntToStr((Int shr i) and 1);
end;
function BinToInt(Binary: String): Integer;
var
i : Integer;
begin
Result := 0;
for i := Length(Binary) downto 1 do
Inc(Result, StrToInt(Binary[i]) * 1 shl (Length(Binary) - i));
end;
Und was bekomme ich jetzt dafür, dass ich anderer Leute die hausaufgaben mache?