I have a bunch of numbers that I want to print in hexadecimal form using exactly 16 symbols, padded left with zeros if needed. For example, if $x=255$, I want to get $f[x]="00000000000000FF"$ or $f[x]="0x00000000000000FF"$. I tried BaseForm and NumberForm but didn't quite get it.
Any help is appreciated!