Rewrite function hexTObcd
Rewrite hexTObcd revers.