How to represent hex number in Maxima?



You could certainly write your own conversion, preferably something more 
elegant than

(%i1)
h2d(ch):=
     if equal(ch,"0") then 0
     elseif equal(ch,"1") then  1
     elseif equal(ch,"2") then 2
     elseif equal(ch,"3") then 3
     elseif equal(ch,"4") then 4
     elseif equal(ch,"5") then 5
     elseif equal(ch,"6") then 6
     elseif equal(ch,"7") then 7
     elseif equal(ch,"8") then 8
     elseif equal(ch,"9") then 9
     elseif equal(supcase(ch),"A") then 10
     elseif equal(supcase(ch),"B") then 11
     elseif equal(supcase(ch),"C") then 12
     elseif equal(supcase(ch),"D") then 13
     elseif equal(supcase(ch),"E") then 14
     elseif equal(supcase(ch),"F") then 15$

(%i2)
hex2dec(str) := block(
     [cl,nl, ex],
     cl: charlist(str),
     nl: length(cl),
     ex: makelist(nl-i, i, 1, nl),
     map(h2d, cl) . (16^ex)
)$

(%i3)
hex2dec("1a4");
(%o3) 420

(%i4)
prefix("0x")$
"0x"(expr) := hex2dec(expr)$
(%i6) 0x"1a4";
(%o6) 420