HP Forums

Full Version: HEX <-> Decimal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I need for the hp41 a routine of conversion of Hex <-> Decimal very small.
Thank you.

Hi, Gileno;

(I was typing it in while Randy was faster... I'll let my answer here, though.)

I have a converting routine that uses X-Functions, would that be a problem? Unfortunatyely I do not have it right now. As soon as I get back home I'll post the listing.

Maybe you already have it, but there is a converting program in the HP41 standard pack. I actually think it is too long and somehow odd, but maybe it can help you.

I'll be back in a couple of hours, O.K.?

Cheers.

Luiz

Edited: 11 Nov 2005, 6:34 p.m.

The Advantage module has the base conversions, and work just about as fast as the LCD can respond.

Hi, Gileno;

sorry taking too long.

Please, have a look at this set of programs and you'll probably find something usefull. HEX to DEC and DEC to HEX listings are in page 14. You can use only the H-D and D-H listing, that is 73 steps long (it is surely more than 100 bytes long). ALENG, AROT, ATOX and XTOA are from the X-Functions module.

Hope it helps.

Luiz (Brasil)

Garth posted,

Quote:
The Advantage module has the base conversions, and work just about as fast as the LCD can respond.

True, but the hexadecimal numbers are limited to unsigned integers up to 32 bits. This differs from most other implementations of integer base conversions on calculators, which assume 2's-complement signed integers of word size 32 bits, 36 bits, or 40 bits.

See my base-conversion thread in the Archives. NOTE: The 41C Advantage module is not covered, because it was not a built-in capability.

-- KS


Edited: 12 Nov 2005, 2:45 a.m.

The best solution for my needs. I thank all.

http://www.hpmuseum.org/software/41hexcon.htm