The binary operator
and performs a logical conjunction.
FPC also does a bitwise
and when supplied with ordinal types.
and accepts to two Boolean type values.
It is the logical conjunction written in classic logic as [math]A \land B[/math].
Electrical engineers may write [math]A \times B[/math] or [math]A \cdot B[/math], or eliminating the multiplication sign altogether writing [math]AB[/math].
However, the asterisk has a different meaning in programming.
and evaluates to
true if and only if both operands are
FPC also defines a bitwise
Taking two ordinal operands logical
and is calculated bit by bit:
1010'1100 and 0011'0100 ―――――――――――― 0010'0100
- § “boolean operators” in the “Free Pascal Reference Guide”
- § “logical operators” in the “Free Pascal Reference Guide”
notBitwise negation (unary)
shlBitwise shift to the left
shrBitwise shift to the right
oddDetermine if number is odd
- << Bitwise shift to the left (same as shl)
- >> Bitwise shift to the right (same as shr)
- Bit manipulation