HP 28C/S equivalent among HP's current products
#1

I formerly owned a 28C back in the 1980s. I dearly miss its very complete binary/octal/hexadecimal numerals. I have never found a comparable feature set for nondecimal bases. Do any of HP's current calculators have the following capabilities: 1) binary/octal/hexadecimal fractional numerals to the right of the radix point; 2) binary/octal/hexadecimal numerals larger than 32 bits; 3) negative-to-twos-complement-viewed-as-unsigned presentation (the equivalent in C language of: printf("%x",-37) that presents ffffffdb in hexadecimal); 4) setting word width for modulo arithmetic (e.g., 8-bit, 16-bit, 32-bit)?

#2

Daniel --

Well, I'm not the expert on RPL-based HP calculators, but I do have one each of the successor 48-series and 49-series models, in addition to the HP-28C. The 48- and 49-series models have all of the functionality of the original 28-series.

The presently-sold models include the HP-49G+ and the HP-48GII. These are outsourced products with the HP logo, and might still not be up to the standards of quality set by the genuine HP calculators.

The HP calc with the best binary/octal/hexadecimal functionlaity, IMO, was the HP-16C, which was discontinued in 1989 but is still readily available on eBay for a considerable price.

I'll admit that I do not share your high regard for the implementation of base-integer functionality on the HP-28/48/49. Here's a post of mine on the topic, which turned into a long thread about simulators versus emulators...

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv015.cgi?read=77331#77331

-- KS

#3

Hi, Daniel;

AFAIK, no HP calculator offered binary/octal/hexadecimal fractional numerals as standard operating feature. The binary representations deal with numbers as integers. Once a decimal number is shown as binary, the fractional part is truncated. The first implementation I saw as a program to deal with fractional numbers in any base was available with the HP25 Applications, an original HP application book for the HP25/25C.

As Karl mentioned, the HP16C deals with integers up to 64 bits, and it goes ahead with double precision multiplication, division and reminder. In this case, the resulting value may be up to 128 bits (Y and X stack registers used together to hold resulting value after [DBLĂ—] with word size=64).

Anyway, the HP48/49 series (RPL models) may accept libraries that enhance their functionality. I used 'binary' as an argument for search and found some relevant results. If you want to have a look at it...

Hope this helps.

Cheers.

Luiz (Brazil)

Edited: 20 May 2006, 2:02 a.m.

#4

Quote:
AFAIK, no HP calculator offered binary/octal/hexadecimal fractional numerals as standard operating feature.

True, the only one I know of (apart from binary) is the TI SR-22 that I happen to own: a really interesting machine!
Have a look at it at Viktor's site:TI SR-22

Greetings,
Massimo

Edited: 20 May 2006, 6:07 a.m.

#5

I'm happy to report that HP doesn't have anything equivalent to
the 28 series among its current offerings.

Quote:
I formerly owned a 28C back in the 1980s. I dearly miss its very
complete binary/octal/hexadecimal numerals. I have never found a
comparable feature set for nondecimal bases.

"Binary integers" also have a decimal base representation in these
calculators. Actually, they're all stored the same and treated the
same for arithmetic operations, and only displayed differently
depending on the base.

Starting with the 28S, binary integers are displayed with a
trailing h, d, o, or b to indicate the base. You can enter a
binary integer in something other than the current base by
including a trailing h, d, o, or b.

All 48 and 49 series can do everything that the 28 series can with
"binary integers"; possibly even a few more things, for all I
know.

The 16C seems to have better built-in capabilities for binary
integers. Maybe there's an emulator of the 16C available for the
48 or 49 series?

Quote:
Do any of HP's current calculators have the following
capabilities:

1) binary/octal/hexadecimal fractional numerals to the right of
the radix point;


Like Luiz, as far as I know, no HP calculator has ever had this
built-in. Maybe think of it as sort of like a slide rule, where
it's up to the user to keep track of where the decimal point has
to be.

Just sort of thinking out loud here, maybe you could treat a
fractional number as an integer and a divisor; for example,
#ABC.DEFh could be treated as #ABCDEFh/(#10h^#3h), although RPL
doesn't allow raising a binary integer to a power. Maybe store
that in a list as { #ABCDEFh #3h }, where the second element is
understood to be the number of places to move the radix point to
the left.

For displaying hexadecimal numbers with a fractional part, I
suppose that you'd have to either display it as a character string
or as two separate numbers (perhaps within a list). Much the same
would apply to a decimal, octal, and binary representation with
over twelve digits.

The 49 series adds a new object type, the "exact integer", a
decimal integer with the length limited only by available memory.
As long as the calculator is in "exact" mode and you don't involve
the exact integers in any operation with "real" numbers, or force
them to reals with, for example, I\->R or \->NUM, they stay exact.
For example, the sequence:

12 10 / returns '6/5' instead of 1.2.
Binary integers can be converted to exact integers with the
sequence B\->R R\->I, but converting through real numbers limits
exact conversions to 12 significant decimal digits, so that's good
only for integers #E8D4A50FFFh and less. Exact integers can be
converted to binary integers with R\->B, although I don't know the
limit of the accuracy with that. Too bad that they didn't provide
UserRPL B\->I and I\->B commands.

For a binary integer to exact integer conversion with 64-bit
accuracy, you could use a string as an intermediate object
instead; for example:

%%HP: T(3)F(.);         @ ASCII transfer header.
\<< @ Begin program.
PUSH @ Save flags and path.
DEC @ Force decimal representation.
\->STR @ Convert binary integer to string.
3. OVER SIZE 1. - SUB @ Extract digits.
STR\-> @ Convert string to exact integer
POP @ Restore flags and path.
\>> @ End program.
Note that the above doesn't force an object to the current
wordsize. If you also want that, first do a unity operation such
as adding or subracting 0, or multiplying or dividing by 1.

Converting an exact integer to a binary integer with 64-bit
accuracy is even easier:

%%HP: T(3)F(.);         @ ASCII transfer header.
\<< @ Begin program.
"#" SWAP + @ Prepend binary integer delimiter.
"d" + @ Append decimal base indicator.
STR\-> @ Convert string to binary integer.
\>> @ End program.
Again, this doesn't force the binary integer to the current
wordsize (although it will be displayed that way). You can force
that by doing a unity operation after the conversion.

I don't know, but maybe using exact integers could be helpful.

Quote:
2) binary/octal/hexadecimal numerals larger than 32 bits;

All 28, 48, and 49 series can have the wordsize for binary integer
operations set from 1 through 64 bits. But note that user binary
integers are always stored (and recalled) as 64-hit numbers. The
display depends on the current wordsize and HEX/DEC/OCT/BIN
display mode. Any arithmetic, logic, shift, or rotate operation on
a binary number forces any bits more significant than specified by
the wordsize to zero.
Quote:
3) negative-to-twos-complement-viewed-as-unsigned presentation
(the equivalent in C language of: printf("%x",-37) that presents
ffffffdb in hexadecimal);

I don't follow that, but the two's complement of a binary integer
is returned by pressing the [+/-] key to invoke the NEG command.
Of course the NOT command gives you the one's complement. I expect
that you can figure out how to do what you want here. Remember to
use the appropriate wordsize.

I recall doing byte-wise big-endian / little-endian conversions on
the 48SX by using strings too. These kinds of things aren't all
that difficult to program, even though they're not built-in.

Quote:
4) setting word width for modulo arithmetic (e.g., 8-bit, 16-bit,
32-bit)?

See my response to your number 2 question.

Also, do some searches at http://www.hpcalc.org/ and
http://groups.google.com/group/comp.sys.hp48.

Regards,
James

#6

Hey, Massimo;

thank you for pointing this out. I remember that some (long?) time ago, this issue came across and the TI52 was mentioned as being able to handle not only binary integers, but also binary, hex and octal numbers with fractionary part. I was not sure which calculator was the one able to such feat, I was about to think of a Casio or some other brand.

Thanks again!

Luiz (Brazil)



Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime equivalent of OBJ-> ? John Colvin 2 1,338 11-18-2013, 07:48 PM
Last Post: John Colvin
  Hand Held Products RS232 to HP-IL aj04062 11 3,363 08-31-2013, 07:12 PM
Last Post: Paul Berger (Canada)
  HP-41C Transition to HP-28C book? Dan Grelinger 6 2,130 03-30-2013, 10:32 AM
Last Post: David Hayden
  HP-35 and HP-65 Current Requirements Dan Lewis 0 915 03-05-2013, 12:11 AM
Last Post: Dan Lewis
  CAS hp50g non equivalent commands peacecalc 0 855 12-16-2012, 02:47 PM
Last Post: peacecalc
  I really like the HP-28C keyboard Eddie W. Shore 13 3,781 06-28-2012, 04:31 PM
Last Post: Matt Agajanian
  Charging Current in HP97, 82143A, 82162A Les Wright 5 2,017 06-17-2012, 02:11 PM
Last Post: Les Wright
  Hand Held Products Corp John W Kercheval 12 3,317 05-23-2012, 01:56 AM
Last Post: Matt Agajanian
  2K==A lot of place for (HP-28C) stuff Matt Agajanian 4 1,702 05-21-2012, 09:59 PM
Last Post: Dominic Richens
  HP 20S with very high "off" current Neil Hamilton (Ottawa) 2 1,192 04-01-2012, 11:49 AM
Last Post: Neil Hamilton (Ottawa)

Forum Jump: