tags:

views:

313

answers:

3

How can I convert hexadecimal to decimal numbers in Emacs calc? For example, if I enter FF, I want it to convert it to 255.

UPDATE: How do I get the reverse operation, turn base 10 to base 16?

+7  A: 

You can enter any number in the format <base>#<number>. Example: 16#FF is immediately converted to 255.

For the reverse, you need to set the output display mode. In this example, d r 16 RET sets the display to base 16. Set it to base 10 to get the default behaviour again.

By the way, you can also Read The Fine ManualTM: GNU Emacs Calc Manual.

Svante
A: 

(Not an answer, was merged into question; please delete this)

1.618
the orig author can delete this.
Cheeso
A: 

Svante answered your question, but I'd like to add that the Radix Display Mode change has a quicker keystroke:

  • Show in hexidecimal mode: d 6
  • Show in decimal mode: d 0
piyo