procedure TForm1.Button1Click(Sender: TObject);
var
bb: array [0..15] of Integer;
s: string;
ai: Int64;
bi, I: Integer;
begin
FillChar(bb, sizeof(bb), 0);
ai := StrToInt64(Edit1.Text);
I := 15;
s := '';
repeat
bi := ai mod 256;
bb := bi;
ai := ai div 256;
Dec(I);
if I < 0 then
Break;
until (ai = 0) or (I < 0);
for I := 0 to 15 do
Caption := Caption + '$' + IntToHex(bb, 2);
end;