Source for this is from Quick hex / decimal conversion using CLI.
Since, one way or another, I have a bash console up somewhere, it would be convenient to perform decimal <-> hexadecimal conversions right there.
To convert hexadecimal to decimal, a few native ways (the third example requires the bc app installed, and as it isn't installed by default on stretch or cygwin, I don't have output):
$ echo $((0x2ac))
684
$ printf '%d\n' 0x2ac
684
$ echo 'ibase=16;obase=A;15A' | bc
To convert the other way around, the printf commands seems to be the most straight-forward:
$ printf '%x\n' 684
2ac
To use bc: a) notation for ibase, obase is decimal, b) input number needs to be in upper case, c) some playing around to make ibase/obase convert correctly.
$ echo 'ibase=10;obase=16;684' | bc