BOOL returns a bit string that is the result of the Boolean operation
z,
on
x and
y. The length of the result is equal to
that of the longer operand,
x or
y.
>>-BOOL(x,y,z)-------------------------------------------------><
- x and y
- Expressions. x and y are converted to bit
strings, if necessary. If x and y are of different
lengths, the shorter is padded on the right with zeros to match the
longer.
- z
- Expression. z is converted to a bit string of length
4, if necessary. When a bit from x is matched with a bit
from y, the corresponding bit of the result is specified
by a selected bit of z, as follows:
|
x |
y |
Result |
|
0 |
0 |
bit 1 of z |
|
0 |
1 |
bit 2 of z |
|
1 |
0 |
bit 3 of z |
|
1 |
1 |
bit 4 of z |