RPN Advanced 42 manual · Chapter 12 of 18
Number bases and logic
Work in hexadecimal, octal and binary, and use AND, OR, XOR, NOT, bit test and rotate on 36-bit integers.
12.2Convert a number to another base#
255 in hexadecimal
Type 255 in decimal, then press HEX (second key).
255ENTER⇧BASE41/x

FF255 in octal
Press OCT (fourth key).
255⇧BASE4LOG

377255 in binary
Press BIN (fifth key).
255⇧BASE4LN

11111111Hexadecimal digits back to decimal
Choose HEX, open A…F (first key) and press F twice (sixth key), leave that menu, then press DEC (third key).
⇧BASE41/xΣ+XEQXEQEXIT√x

255.000012.3Type and calculate in a base#
Choose the base first, then type digits. Arithmetic works on integers; results are cut to whole numbers.
Add in hexadecimal
Choose HEX, type 15, ENTER, type 1 and add. 0x15 + 1 = 0x16.
⇧BASE41/x15ENTER1+

16Multiply in hexadecimal
0x15 times 2 is 0x2A.
⇧BASE41/x15ENTER2×

2A12.4AND, OR, XOR, NOT, bit test and rotate#
The LOGIC menu (sixth key of BASE) has AND, OR, XOR, NOT, BIT? and ROTXY. Logic works on the 36-bit two's complement form of the numbers.

12 AND 10
Type 12, ENTER, 10, open BASE, LOGIC, AND (first key).
12ENTER10⇧BASE4XEQΣ+

8.000012 OR 10
OR is the second key.
12ENTER10⇧BASE4XEQ1/x

14.000012 XOR 10
XOR is the third key.
12ENTER10⇧BASE4XEQ√x

6.0000NOT 5
NOT flips every bit: 5 becomes −6.
5⇧BASE4XEQLOG

-6.0000Test bit 2 of 5
Y = 5, X = bit number 2. BIT? (fifth key) answers Yes or No.
5ENTER2⇧BASE4XEQLN

YesRotate right
ROTXY rotates Y right by X bits: 1 rotated by 4 gives 2^32.
1ENTER4⇧BASE4XEQXEQ

4,294,967,296HP-42S is a trademark of HP Inc.. Trident Calculator is an independent product by South View Studios and is not affiliated with, sponsored by or endorsed by HP. The name is used only to describe the kind of calculator this model resembles; Trident's names, keys, display, fonts and software are its own clean-room design.
