Ver Mensaje Individual
  #19  
Antiguo 13-09-2007
Avatar de marcoszorrilla
marcoszorrilla marcoszorrilla is offline
Capo
 
Registrado: may 2003
Ubicación: Cantabria - España
Posts: 11.221
Reputación: 10
marcoszorrilla Va por buen camino
96 = 001100000
97 = 001100001
98 = 001100010
99 = 001100011
100 = 001100100
101 = 001100101
102 = 001100110
103 = 001100111
104 = 001101000
105 = 001101001
106 = 001101010
107 = 001101011
108 = 001101100
109 = 001101101
110 = 001101110
111 = 001101111
112 = 001110000
113 = 001110001
114 = 001110010
115 = 001110011
116 = 001110100
117 = 001110101
118 = 001110110
119 = 001110111
120 = 001111000
121 = 001111001
122 = 001111010
123 = 001111011
124 = 001111100
125 = 001111101
126 = 001111110

Antes de que venga Seoane:
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
n:LongInt;
begin
  For n:=96 to 126 do
  begin
  Memo1.Lines.Add(IntToStr(n)+' = '+IntToBin(n,8));
  end;
end;

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
      Result:=Result+'1'
    else
      Result:=Result+'0';
  end;
end;


Un Saludo.
__________________
Guía de Estilo de los Foros
Cita:
- Ça c'est la caisse. Le mouton que tu veux est dedans.
Responder Con Cita