User Tools

Site Tools


prime:bitwise

This is an old revision of the document!


Bitwise Manipulation on the HP Prime.

BITSR(X) and BITSL(X,n) shift right and left respectively. The second argument says how much to shift. If not specified, it shifts only one position. Rotation and carry are not supported by default. Neither is bit test or selection. However, BITAND, BITNOT, BITOR and BITXOR are supported. BITNOT only takes one argument and inverts the bits. The other functions take as many arguments as you like and the specified logical operation is performed between the bits in all the integers specified.

Here are a group of useful functions to provide more traditional support for bit manipulation.



prime/bitwise.1512385917.txt.gz · Last modified: 2017/12/04 03:11 by webmasterpdx