This is untested, but...
chilleruse POSIX qw(floor); sub dec2Bin($) { $n = shift; while ($n != 0) { $k = $n % 2; $n = floor($n / 2); $b = $k . $b; } print "$b"; }
In reply to Re: dec to bin conversion for large numbers
by chiller
in thread dec to bin conversion for large numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |