<div><font size="4">&nbsp;I
have written a code to convert hexadecimal numbers into base 10 number but its working only for 32 bits and I&nbsp; need it to work upto 160 bits , code is given below. please help.<br>
<br>
--its a program to convert hexadecimal numbers into base 10 numbers<br>
<br>
import Char<br>
<br>
-- the function &quot;func&quot; takes a list of strings in hexadecimal and convert <br>
-- it to a list of corresponding numbers in decimal format<br>
-- func &quot;eefba12&quot; = [14,14,15,11,10,1,2] <br>
<br>
func [] = []<br>
func (x:xs) <br>
&nbsp;&nbsp;&nbsp; |(ord x &gt; 57) = ((ord x)-87):func xs<br>
&nbsp;&nbsp;&nbsp; |otherwise&nbsp; =&nbsp; ((ord x)-48):func xs<br>
<br>
-- (mul.func) function takes a hexadecimal number and convert it to base 10 but its working only for 32 bits<br>
-- whereas haskell supports calculations much higher than 32 bits.....<br>
-- mul.func $ &quot;ee&quot; = 238&nbsp; <br>
-- mul.func $ &quot;e23e&quot; = 57918<br>
<br>
mul xs = mul1 xs ((length xs)-1)<br>
mul1 (x:xs) 0 = x<br>
mul1 (x:xs) n = (x*16^n)+ mul1 xs (n-1)<br>
</font>
</div>