HP Forums
56-bit representation of numbers vs. what is displayed - 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: 56-bit representation of numbers vs. what is displayed (/thread-5666.html)



56-bit representation of numbers vs. what is displayed - brianrhill - 02-11-2016 01:13 AM

Something I am confused about is how the HP-35 decides whether to display

1.23 45
vs
12.3 44

You will find that you can enter both of these (in the obvious way) and the display preserves what you entered even though these are two ways of writing the same number.

In fact you can also enter

1.23000 45

which is yet another way of expressing the same number.

If I understand correctly, the 56-bit C-register (also known as the X register) is accumulating the value as it is entered. Where is the additional information stored that the display is relying on to distinguish between and maintain—even after hitting Enter—these various different visual representations of the number?

Of course this is all in the microcode for the HP-35 and HP-45, but perhaps someone can explain it plainly for those who haven't learned to read the microcode.

Thanks!

~Brian Hill

PS: Many thanks to the people that restored Jacques Laporte's site (http://home.citycable.ch/pierrefleur/Jacques-Laporte/index.html) and I am also grateful to Germaine Laporte for authorizing it.


RE: 56-bit representation of numbers vs. what is displayed - brouhaha - 02-11-2016 02:37 AM

The microcode n the Classic series uses the ARC chip's C register for the user stack X value, in normalized form. However, the actual entry and display uses the A and B registers along with several flags to control entry and display, so during entry the display isn't necessarily in normalized form.

While the details vary, the same general principle applies to numeric entry on all HP RPN handheld and small desktop calculators up through the Series 30. Numeric entry works in a somewhat different manner in the 41C and Voyager series.


RE: 56-bit representation of numbers vs. what is displayed - brianrhill - 02-11-2016 04:50 AM

Thanks! That makes a ton of sense. It means the display isn't always determined from what is in register X (also known as C). Sometimes it is showing a non-normalized value cooked up from A and B. My simulation job just got harder :)

EDIT/PS: Your explanation helped me home in on this information in Francois Roulet's re-creation of Jacques Laporte's site (the specific page is http://home.citycable.ch/pierrefleur/Jacques-Laporte/A&R.htm):

The A register is setup to hold the displayed number with the digits in the proper order.

The B regis­ter is used as a masking register with digits 9 inserted for each display position that is to be blanked and a digit 2 at the decimal point location.

The decimal point is not allocated a register position; but it has a full digit position in the output display : one digit and the decimal point share one of the 14 digit times.

When the anode driver of output display unit detects a decimal point code during T4, it provides a signal to the cathode driver of the output display unit to move to the next digit position.

The digit 9 mask in register B allows both trailing and leading zeros to be blanked (i.e., by programming 9's into the B register).

Use of all three working registers for display (the C register to retain the number in normalized form, the A register to hold the number in the displayed form, and the B register as a mask) allows the calculator to have easily both a floating point and a scientific display format. This scheme will be used in all Classic & Woodstock calculators.


RE: 56-bit representation of numbers vs. what is displayed - damaltor - 02-11-2016 04:48 PM

If you want to find out which version the calculator prefers (which it would use naturally), you might try to multiply it by 1 or similar.


RE: 56-bit representation of numbers vs. what is displayed - brianrhill - 02-11-2016 11:18 PM

Yes. I usually get to the canonical form if I want to see that by hitting x<->y twice, but

Enter 1 x

as you suggest does the same. ~Brian