print "$_\t", dec_bin2s($_), "\n" for -42 .. 42; sub dec_bin2s { $dec = shift; return unpack "B8", (pack "i", $dec); }
In reply to Re: How do I convert from decimal to 2's Complement
by tachyon
in thread How do I convert from decimal to 2's Complement
by kevin8
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |