BITLR [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
BITLR
The BITLR function returns the value of a particular bit of an
expression, where 0 is the Most Significant (or leftmost) bit. The
result is a SHORT INTEGER.
Syntax
BITLR(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 a bit layout for N1. It shows the results of the
BITLR function for several values of the second parameter (N2).
Bit Number: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
N1= 0 1 1 0 0 1 0 1 0 0 0 1 1 1 0 1
BITLR(N1,15)=1, BITLR(N1,11)=1, BITLR(N1,8)=0, BITLR(N1,3)=0
MPE/iX 5.0 Documentation