Currently you must call d@Sum[x^100, {x, 0, 10}] to get it to display in HEX form.
To input custom HEX numbers simply call use the 16^^ff. In addition I have included a custom base16 function because I prefer a generalized solution that works for bases larger then 36 and support capital letters in stead of lowercase letters.
t[x_] := Module[{l, r, h},
l = DeleteDuplicates@Select[
Cases[x, _String, {0, Infinity}],
StringMatchQ[#, DigitCharacter ..] &];
h = Replace[
l, {k_String :> {k, ToExpression@k, base16@ToExpression@k}}, {1}];
r = Replace[
h, {a_, b_,
c_} :> (a :>
InterpretationBox[
StyleBox[c, FontColor -> RGBColor[1, 0, 0],
StripOnInput -> False], b]),
{1}
];
Replace[x, r, {0, Infinity}]
];
SetAttributes[d, HoldFirst];
d /: MakeBoxes[d[x_], form_] :=
t[ToBoxes@Unevaluated@x];
base16[x_] := StringJoin@Replace[
IntegerDigits[x, 16],
MapIndexed[(
(#2[[1]] - 1) :> #
) &, StringSplit["0123456789ABCDEF", ""]]
, {0, Infinity}
];
$PrePrint = HoldForm[#] /. k_Integer :> BaseForm[k, 16] &? – Szabolcs Oct 06 '14 at 22:56_Integer, No? Then it will work for inexact hex numbers too. – m_goldberg Oct 06 '14 at 23:36$PrePrint = BaseForm[#, 16] &. This still doesn't do what you're asking for though. – Szabolcs Oct 07 '14 at 15:37(k_Integer | k_Rational | k_Real)becausek_is way to general. – William Oct 07 '14 at 15:51