convert in command line

use # in bash

from base 16, 8, 2 to 10
echo $((16#66))
echo $((8#146))
echo $((2#1100110))
from base10 to base16, 8, 2 (only in zsh)
echo $(([#16]102))
echo $(([#8]102))
echo $(([#2]102))

printf

from base 16 to 10
printf '%d\n' 0x66

from base10 to base16, 8, no base2 directly
printf '%x\n' 102
printf '%o\n' 102

many other ways

character

from number to character
echo "66" | xxd -p -r in base16
from character to number
printf '%d\n' \'f
printf '%x\n' \'f
printf '%o\n' \'f

files

vim

ga to show the acsii code under cursor
:%!xxd to see file in hexdecimal
:%!xxd -r traverse

xxd

see file in hexdecimal