So I've been poking around these parts (and google) looking for any way to convert a huge binary string (hundreds of digits) back into decimal. I've been searching for a couple hours with no luck so I figure it's time for a forum post. I've found quite a bit on binary/decimal conversion, but nothing to deal with Huge binary/decimal number conversion without using BigInt. The big catch for my problem is I can't use any BigInt/BigEtc.. types. Thus far I've been able to write a program to convert a huge int to binary which I've stored in a doubly linked list so I can easily do binary multiplication, etc. I'm just plain stuck on how to convert a huge binary number to decimal again. I know I can't store an integer like 2^200
in an int (or a double or a long) and I'm not allowed to use BigInt or anything like it for this assignment. I should probably mention that I'm working with signed integers in 2s compliment. Any help (even a good push!) would be much appreciated. Being stuck is no fun =(.
This is my first post here, but seeing as I'm a CS Student (and passionate about my work!), I hope to become a part of this community to better my knowledge of Java and hopefully help other kind souls on their pursuit of knowledge as well
. Thanks in advance for your time, I promise it wont be wasted!