HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
5- 4
Syntax
BINOR(
N1
,
N2
)
Parameters
N1
Binary representation of the value of a numeric
expression. This is a short integer.
N2
Binary representation of the value of a numeric
expression. This is a short integer.
Examples
The example below shows the bit layout for the BINOR function. It shows
each bit of both arguments, and the result of the BINOR function.
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
N2= 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0
BINOR(N1,N2)= 0 1 1 0 1 1 1 1 0 1 0 1 1 1 1 1
BINXOR
The BINXOR function returns the Binary Exclusive OR for all
R
such that
R
(
n
) = N1(
n
) XOR N2(
n
)
for all
n
in [0, 15] where N1(
n
) and N2(
n
) represent the value of bit
n
in each expression and
R
represents the short integer result of the
function. That is, if a particular bit of both arguments have the same
contents (either zero or one) the same bit in the result will contain a
zero. If a particular bit in both arguments do not have the same
contents, the same bit in the result will contain a one.
Syntax
BINXOR(
N1
,
N2
)
Parameters
N1
Binary representation of a numeric expression. This is
a short integer.
N2
Binary representation of a numeric expression. This is
a short integer.
Examples
The example below shows the bit layout for the BINXOR function. It shows
the values in each bit of the arguments, and the values in each bit of
the result.
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
N2= 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0
BINXOR(N1,N2)=0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1
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