I have two numbers. 5437 in base 8 and 6312817211 in base 256 for example.. How can I convert both of these to a binary representation? I know how to convert the 5437, that is easy, but I want a algorithm that will deal with both as I can not convert the larger number because it wont fit in a int
, it will only fit in a BigInteger
which I don't think has any built in ways to convert a BigInteger
of base 256 to a binary representation (base 2). Any advice or help would be great. I'm out of ideas and my brain is about to explode.
(I'm working in C# btw)