Created
August 12, 2015 03:00
-
-
Save nobusue/2fa6be2feeb39ffcb886 to your computer and use it in GitHub Desktop.
Groovyで16進->2進/10進変換
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groovy -e "def b='10 49 4a 03'; println b.split(' ').collect{ Integer.decode('0x'+it) }.join(' '); println b.split(' ').collect{ Integer.toBinaryString(Integer.decode('0x'+it)).padLeft(8,'0') }.join('_')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment