Преобразовать значение байта в шестнадцатиричное число (Hex)
function ByteToHexStr(AByte: Byte): string;
begin
case AByte and $0F of
0..9: Result := IntToStr(AByte and $0F);
10..15: Result := Chr(55 + (AByte and $0F));
end;
case (AByte shr 4) and $0F of
0..9: Result := IntToStr((AByte shr 4) and $0F) + Result;
10..15: Result := Chr(55 + ((AByte shr 4) and $0F)) + Result;
end;
end;
Использованы материалы http://smallweb.narod.ru/pages/program/d_info/t-004.html
Искать как: ByteToHexStr, ByteToHex, ToHex, ByteAsHex, ToHexStr, перевод в 16-ное число, двоичное в 16-чное