How to Convert Binary String of Length 1024 to its Respective Decimal Number.

for example

101 of length 3 and the respective Decimal Number is 5

10111 of length 5 and the respective Decimal Number is 23

like this .. i have a binary number of length upto 1024 ...

The resultant decimal number range is more than the builtin data type ranges.

So how can i made calculations on numbers out of Builting data types ranges.

Please Tell me...

Thank you in Advance.