You are here: Math Resources > Operators in Propeller Assembly

Operators in Propeller Assembly

The following operators are available in Spin. There is a separate table for Operators in Spin.

Propeller Assembly Math and Logic Operators

Operator

Is Unary

Description

+

 

Add

+

ü

Positive (+X); unary form of Add

-

 

Subtract

-

ü

Negate (-X); unary form of Subtract

*

 

Multiply and return lower 32 bits (signed)

**

 

Multiply and return upper 32 bits (signed)

/

 

Divide (signed)

//

 

Modulus (signed)

#>

 

Limit minimum (signed)

<#

 

Limit maximum (signed)

^^

ü

Square root

||

ü

Absolute value

~>

 

Shift arithmetic right

|<

ü

Bitwise: Decode value (0-31) into single-high-bit long

>|

ü

Bitwise: Encode long into value (0 - 32) as high-bit priority

<<

 

Bitwise: Shift left

>>

 

Bitwise: Shift right

<-

 

Bitwise: Rotate left

->

 

Bitwise: Rotate riight

><

 

Bitwise: Reverse

&

 

Bitwise: AND

|

 

Bitwise: OR

^

 

Bitwise: XOR

!

ü

Bitwise: NOT

AND

 

Boolean: AND (promotes non-0 to -1)

OR

 

Boolean: OR (promotes non-0 to -1)

NOT

ü

Boolean: NOT (promotes non-0 to -1)

==

 

Boolean: Is equal

<>

 

Boolean: Is not equal

<

 

Boolean: Is less than (signed)

>

 

Boolean: Is greater than (signed)

=<

 

Boolean: Is equal or less (signed)

=>

 

Boolean: Is equal or greater (signed)

@

ü

Symbol address

 

Propeller Help Version 1.1

Copyright © Parallax Inc.

5/13/2009