How can we convert a hexadecimal value into decimal by using calculator (I know by using general formula we can do ,but is there any short key or button to do this)?
(I tried but didn't found any option )
5 Answers
You can use Ubuntu's default calculator in programming mode.
Open the dash and search for Calculator, then select : Mode > Programming Mode.
Enter the value to convert, then press equal =. The entered value will get bolded. Then you may select the target Base from the drop-box to have the value converted.
2And if you want something you can do from the command line, you can use trusty old bc
echo "obase=16; 255" | bcproduces FF
When I need to convert to hex from command line, I do this:
printf "%x\n" 255and when I need to convert from hex, it get simpler:
echo $((0xff)) Well, I don't do it often but, when I do, I just use Galculator. Why do I use Galculator? It is fast, light, and feature rich. It does everything I need it to do, these days.
If you're looking to convert then simply enter the information and then click on the appropriate button (DEC HEX OCT BIN) and it converts it for you all nice and easy like. Most of all, it's pretty small and easy to work with - I like small and simple and I also like a GUI for some things.
If you want to install it then sudo apt-get install galculator and follow the prompts.
dc(1)
Desktop Calculator, absolutely:
> dc <<< '16i FF p'
25516iis for input base16pfor print
PS Other useful conversions:
> dc <<< '16o 255 p' # decimal2hex
FF
> dc <<< '2o 16i EF p' # hex2binary
11101111
> dc <<< '2o 7 p' # decimal2binary
111@see