Hepax Binary Function

Discussion around the SwissMicros DM41X calculator
Post Reply
danielCL
Posts: 60
Joined: Mon Jul 26, 2021 3:53 pm

Hepax Binary Function

Post by danielCL »

Hi

Does any one experience Binary Function. It seems doesn't work asexpected.

for instance. I input 12 and Hepax 003. The output is 0. 0<. I thought it should be 1100.

The NOT AND OR XOR function out put also different from what I understand.

May I know why is it like that ?
MeinKuipers
Posts: 58
Joined: Mon Jan 13, 2020 4:49 pm
Location: Netherlands

Re: Hepax Binary Function

Post by MeinKuipers »

The HEPAX Binary functions are truly binary, meaning that these work on the bits in the X- and Y-registers regpectively.
The HEPAX BCD>BIN takes a normal decimal number from X and translates that to a right aligned binary. The result is 1100, but in the bits of the X-register, which leads to the funny display. The DECODE function placed the binary value in ALPHA so you can view it better.
Regards from NL,
Meindert Kuipers DM41X #48
danielCL
Posts: 60
Joined: Mon Jul 26, 2021 3:53 pm

Re: Hepax Binary Function

Post by danielCL »

Thanks ! It seems works for BCD-BIN.
How about bitwise And OR XOR etc ? For instance 9 or 2. The result is 10 in X register . I used decode function, the out pit was 0B000000000000. Seems the result still wrong
MeinKuipers
Posts: 58
Joined: Mon Jan 13, 2020 4:49 pm
Location: Netherlands

Re: Hepax Binary Function

Post by MeinKuipers »

Same for all binary functions. For this some knowlegde of how the numbers are coded in the registers is needed. Best source is one of the books on Synthetic Programming.
In your case, the bitwise OR between 9 and 2 is B, so this is correct. The internal routines to display the X-register cannot handle the B, so it will do a best effort and show 10. The DECODE shows B (which is correct). What you have in X is called a Non Normalized Number (NNN), something that cannot exist in a normal HP41. Some NNN's may show up very strange in the display.
Regards from NL,
Meindert Kuipers DM41X #48
danielCL
Posts: 60
Joined: Mon Jul 26, 2021 3:53 pm

Re: Hepax Binary Function

Post by danielCL »

I see. Thanks for your explanation!
Post Reply