The num
command displays the argument given in binary, octal, decimal or hexadecimal number in each base.
$ num 0xff
bin: 0b11111111
oct: 0o377
dec: 255
hex: 0xff
$ num 255
bin: 0b11111111
oct: 0o377
dec: 255
hex: 0xff
$ num 0b11111111
bin: 0b11111111
oct: 0o377
dec: 255
hex: 0xff
% go get github.com/Songmu/num/cmd/num