in reply to How turn a huge decimal number to binary

Within the limitations of doubles to represent large numbers accurately, you can do this by breaking the number into hi and lo integers, converting them separately, and concatenating the results:

$huge = 1024**4;; $lo = $huge % 2**32;; $hi = int( $huge / 2**32 );; printf "%b%032b\n", $hi, $lo;; 10000000000000000000000000000000000000000

Otherwise take a look at the bigint pragma and Math::BigInt.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."