|
i'm looking to make a Binary Calculator, but I need some help with the logic...
now, I was thinking of using a For loop, starting at 1237940039285380274899124224 (which is 2^90, or 1 Brontobyte (apparently the largest type of data storage), and go down from there... I figure keep dividing it by 2 until you get a number you can take out of the binary number, and then continue from there...
only problems are the following: 1. I don't think C# variables can hold that much information... 2. If they can, wouldn't it crash REALLY badly? =/
the other option is to start much lower, probably an exabyte (2^60 ) and do it from there? (exabyte is 1 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 in binary btw =) )
so basically, my logic is convert it into decimal and then figure it out from there... but there has to be a better way, right?
|