122-32000 Parallax Inc, 122-32000 Datasheet - Page 270

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
The above example ANDs %00101100 with %00001111 and writes the result, %00001100,
to X.
Bitwise AND has an assignment form,
operand and the result destination. For example,
X &= $F 'Short form of X := X & $F
Here, the value of
form of Bitwise AND may also be used within expressions for intermediate results; see
Intermediate Assignments, page 253.
Be careful not to get Bitwise AND ‘
for bit manipulation while Boolean AND is for comparison purposes (see page 272).
Bitwise OR ‘
The Bitwise OR operator performs a bitwise OR of the bits of the first operand with the bits
of the second operand. Bitwise OR can be used in both variable and integer constant
expressions, but not in floating-point constant expressions.
Each bit of the two operands is subject to the following logic:
Example:
X := %00101100 | %00001111
The above example ORs %00101100 with %00001111 and writes the result, %00101111, to
X
Bitwise OR has an assignment form, |=, that uses the variable to its left as both the first
operand and the result destination. For example,
X |= $F 'Short form of X := X | $F
Page 270 · Propeller Manual v1.0
.
|
’, ‘
|=
X
is ANDed with $F and the result is stored back in
Table 4-12: Bitwise OR Truth Table
0
0
1
1
Bit States
&
0
1
0
1
’ confused with Boolean AND ‘
&=
, that uses the variable to its left as both the first
Result
0
1
1
1
AND
X
’. Bitwise AND is
. The assignment

Related parts for 122-32000