dc is a reverse-polish desk calculator
echo "2i 100 p"|dc
says: 100 is of base2 give o/p in base 10
echo "16i 100 p"|dc
says: 100 is of base16 give o/p in base 10
echo "16o 10i 100 p"|dc -- read 100 in base10 and o/p in base16
echo "2o 10i 100 p"|dc -- read 100 in base10 and o/p in base2
No comments:
Post a Comment