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

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
Here, the value of
Bitwise Shift Left may also be used within expressions for intermediate results; see
Intermediate Assignments, page 253.
Bitwise Shift Right ‘
The Bitwise Shift Right operator shifts the bits of the first operand right by the number of bits
indicated in the second operand. The original LSBs (rightmost bits) drop off and the new
MSBs (leftmost bits) are set to zero. Bitwise Shift Right can be used in both variable and
integer constant expressions, but not in floating-point constant expressions. Example:
X := Y >> 3
If
...the Bitwise Shift Right operator would shift that value right by three bits, setting
Since the nature of binary is base-2, shifting a value right is like performing an integer divide
of that value by powers of two, 2
Bitwise Shift Right has an assignment form,
first operand and the result destination. For example,
X >>= 2 'Short form of X := X >> 2
Here, the value of
Bitwise Shift Right may also be used within expressions for intermediate results; see
Intermediate Assignments, page 253.
Bitwise Rotate Left ‘
The Bitwise Rotate Left operator is similar to the Bitwise Shift Left operator, except that the
MSBs (leftmost bits) are rotated back around to the LSBs (rightmost bits). Bitwise Rotate
Left can be used in both variable and integer constant expressions, but not in floating-point
constant expressions. Example:
X := Y <- 4
If
Y
Y
started out as:
%10000000 01110000 11111111 00110101
%00010000 00001110 00011111 11100110
started out as:
%10000000 01110000 11111111 00110101
X
X
is shifted right two bits and is stored back in
is shifted left four bits and is stored back in
>>
<-
’, ‘
’, ‘
>>=
<-=
b
, where b is the number of bits shifted.
>>=
, that uses the variable to its left as both the
Propeller Manual v1.0 · Page 267
X
X
. The assignment form of
. The assignment form of
X
to:

Related parts for 122-32000