linux 进制转换

Submitted by lepton on Wed, 01/09/2019 - 09:49

echo $((0x41FE))

printf %d\\n 0x41FE

echo 'ibase=16;obase=10; 41FE'|bc    //need upper case

on linux obase=10;  need to change to obase=A;  or leave space  echo 'ibase=16; 41FE'|bc



test on mac and gentoo

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.