Algorithm Math Delphi

Title: Convert decimals to hexadecimals
Use Format function:
HexString:=Format('%0x',DecValue);