# DHCONV - hex/dec conversion for the HP-17bii

This program is by Don Shepherd and is used here by permission.

This program is supplied without representation or warranty of any kind. Don Shepherd and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

## Overview

Solver equation DHCONV (decimal-hex conversion) can be used to convert numbers from hexadecimal to decimal number bases, and vice versa. This equation works on both the HP 17bii and the HP 17bii+. The 17bii gives the answer immediately; the 17bii+ has to iterate for awhile, typically, before it arrives at the answer.

Enter the equation as shown (SIGMA is the summation function). Since alphabetic entries are not possible on these calculators, enter hex values using 2 digits (A=10, B=11, 5=05, and so on). To convert a decimal number to hexadecimal, enter the decimal number, press the DEC soft-key, then press the HEX soft-key. A decimal input of 1512 results in a hex output of 51408 (5E8). To convert a hexadecimal number to decimal, enter the hex number (for 3CF, enter 31215), press the HEX soft-key, then press the DEC soft-key. A hex input of 111515 (BFF) results in a decimal output of 3071.

The maximum values permitted are HEX FFFFFF (151515151515) and decimal 16,777,215. This limitation is due to the 12-digit entry maximum on these calculators.

## Listing

DHCONV:IF(S(DEC):SIGMA(I:0:(LOG(HEX)+1)/2:1:MOD(IDIV(HEX:100^I):100)X16^I)-DEC:SIGMA(I:0:5:1:MOD(IDIV(DEC:16^i):16)X100^I)-HEX)=0

Go back to the software library

Go back to the main exhibit hall