Post Reply 
BITXOR in RPN mode
12-21-2017, 05:49 AM
Post: #1
BITXOR in RPN mode
I am an engineering student and just got this HP Prime. I am a long time user of RPN and have always used HP calculators. This Prime is taking a while to adjust to.

The calculator is set to RPN mode and I am in HOME

How do I use the command BITXOR(11,12) ? I keep getting "Error: Syntax Error." Even if I put 11 and 12 on the stack (see below) then type "BITXOR" nothing seems to happen. If I use BITXOR(11,12) in CAS mode then I get 7 which is the expected result. But I can't figure out how to make it work in RPN mode.

2: 11
1: 12
BITXOR

then I hit enter and i get:

2: 11
1: 12

That's it. BITXOR disappears and I just have 11 and 12 on the stack as before. What the heck?! Can someone try to use BITXOR in RPN mode and tell me what I need to do to make it work in RPN.
Find all posts by this user
Quote this message in a reply
12-21-2017, 05:35 PM
Post: #2
RE: BITXOR in RPN mode
11 enter 12 bitxor(2)
in rpn, you have to specify the number of arguments to be taken from the stack
Find all posts by this user
Quote this message in a reply
12-22-2017, 12:09 AM
Post: #3
RE: BITXOR in RPN mode
(12-21-2017 05:35 PM)wawa Wrote:  11 enter 12 bitxor(2)
in rpn, you have to specify the number of arguments to be taken from the stack

Specifically, it takes the minimum number of arguments automatically from the stack unless specified. This command can take a list of arguments as input allowing any number of XORs provided they were given in a list. Without a list, it can take up to 16 inputs directly.

Normally in RPN, the lowest number of arguments is the most common case and you don't have to do any specifying of argument count. This is a case where the most common use will be 2 args, but there was no way to support doing a list input without causing a slight inconvenience for RPN users.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)