How can I convert hexadecimal to decimal numbers in calc of Emacs?

1.618 picture 1.618 · Dec 7, 2009 · Viewed 9.8k times · Source

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?

Answer

Svante picture Svante · Dec 7, 2009

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.