You might be interested in Tom Kyte's universal conversion routines that converts any base_N to any base_N and from any base_n to DEC and to HEX specificaly. An amazingly compact and efficient piece of PL/SQL code!

http://osi.oracle.com/~tkyte/hexdec/index.html