06-03-2013, 10:05 AM
I recently became the owner of HP-16c and I want make a program to convert hexadecimal number to decimal by a special rule.
I use the following formulas in Excel:
- Remove in the hexadecimal number the last two digits from left:
=LEFT(A2,(LEN(A2)-2))
- Converts HEX to DEC:
=HEX2DEC(B2)
- Remove first digits starting with the “1“ for such a rule
=IF(LEFT(C2,4)="1000",RIGHT(C2,1),
(IF(LEFT(C2,3)="100",RIGHT(C2,2),
(IF(LEFT(C2,2)="10",RIGHT(C2,3),
(IF(LEFT(C2,1)="1",RIGHT(C2,4),
"???")))))))
HEX DECBut I have difficulty trying to program HP-16c begin at first step-how to remove two digit? Shifting Bits, or...?
285801 328
271101 1
3e7F03 5999
3f7F03 6255
ae01 174
f02 15
3dA01 ???
3f3e02 6190
2b6799 1111