# HP Forums

Full Version: HP-48SX strange?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.
(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.
Thanks guys you are both correct
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :