HP Forums
HP-48SX strange? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP-48SX strange? (/thread-5118.html)



HP-48SX strange? - Leviset - 11-12-2015 10:22 PM

I was using my HP-48SX (1988) to convert some decimal numbers to binary by choosing MTH --> BASE which then rightly sets up the A --> F top row keys with
HEX DEC OCT BIN STWS RCWS
A. B. C. D. E. F

So I'm entering #976 pressing DEC and then enter to put 976d on the stack then BIN gives me
# 1111010000b
I enter a few more larger numbers THEN I entered #17000 pressed DEC and Enter and # 616d appears on the stack and pressing BIN gives # 1001101000b
So I tried to find out where the formatting of the decimal number on the stack was changing before any conversion was even done.
It changes after decimal 16383
#16382 DEC Enter puts # 16382d on the stack and BIN gives # 11111111111110b
BUT #16384 DEC Enter puts # 0d on the stack and BIN gives # 11111111111111b ??
Any numbers >= 16384 decimal give strange results e.g. # 88364 DEC Enter gives # 6444d on the stack and BIN gives #1100100101100b?

Any idea what is happening here?
Denny


RE: HP-48SX strange? - Gerson W. Barbosa - 11-13-2015 04:28 AM

Your word size is set to 14 bits (press RCWS to check this), which might be too small for the numbers you are working with. Just change it to 64 (64 STWS).

HTH,

Gerson.


RE: HP-48SX strange? - Paul Berger (Canada) - 11-13-2015 04:42 AM

(11-12-2015 10:22 PM)Leviset Wrote:  I was using my HP-48SX (1988) to convert some decimal numbers to binary by choosing MTH --> BASE which then rightly sets up the A --> F top row keys with
HEX DEC OCT BIN STWS RCWS
A. B. C. D. E. F

So I'm entering #976 pressing DEC and then enter to put 976d on the stack then BIN gives me
# 1111010000b
I enter a few more larger numbers THEN I entered #17000 pressed DEC and Enter and # 616d appears on the stack and pressing BIN gives # 1001101000b
So I tried to find out where the formatting of the decimal number on the stack was changing before any conversion was even done.
It changes after decimal 16383
#16382 DEC Enter puts # 16382d on the stack and BIN gives # 11111111111110b
BUT #16384 DEC Enter puts # 0d on the stack and BIN gives # 11111111111111b ??
Any numbers >= 16384 decimal give strange results e.g. # 88364 DEC Enter gives # 6444d on the stack and BIN gives #1100100101100b?

Any idea what is happening here?
Denny
I would suspect you have your word size set to 14 the SX store the full number but the displayed number is truncated according to the word size set. You can see what it is set to with the RCWS soft key and set it by entering a number and pressing STWS soft key.
See chapter 14 in the manual for a full explanation of binary functions.

Paul.


RE: HP-48SX strange? - Leviset - 11-14-2015 05:22 PM

Thanks guys you are both correct