BITRL [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
BITRL
The BITRL function returns the value of a particular bit of an
expression, where 15 is the Most Significant (or leftmost) bit. The
result is a SHORT INTEGER.
Syntax
BITRL(N1,N2)
Parameters
N1 Binary representation of a numeric expression. This is
a SHORT INTEGER. This is the number containing the bit
to be extracted.
N2 Binary representation of a numeric expression. This is
a SHORT INTEGER. This is the number of the bit to be
extracted from N1.
Examples
The example below shows the bit layout for N1. It shows the result of
the BITRL functions for several values of the second parameter (N2).
Bit Number: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
N1= 0 1 1 0 0 1 0 1 0 0 0 1 1 1 0 1
BITRL(N1,15)=0, BITRL(N1,11)=0, BITRL(N1,8)=1, BITRL(N1,3)=1
MPE/iX 5.0 Documentation