Logic and Shift Instructions Instructions
9 PTX instructions in this category - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | PTX Version | Summary |
|---|---|---|---|
| and | and.type d, a, b; | PTX ISA 1.0 | Bitwise AND of two operands. |
| cnot | cnot.type d, a; | PTX ISA 1.0 | Compute the logical negation using C/C++ semantics. |
| lop3 | lop3.b32 d, a, b, c, immLut; | PTX ISA 4.3 | Compute bitwise logical operation on inputs a, b, c and store the result in destination d. |
| not | not.type d, a; | PTX ISA 1.0 | Bitwise complement of an operand. |
| or | or.type d, a, b; | PTX ISA 1.0 | Bitwise OR of two operands. |
| shf | shf.l.mode.b32 d, a, b, c; // left shift | PTX ISA 3.1 | Shift the 64-bit value formed by concatenating operands a and b left or right by the amount specified by the unsigned 32-bit value in c. |
| shl | shl.type d, a, b; | PTX ISA 1.0 | Shift bits left, filling with zero. |
| shr | shr.type d, a, b; | PTX ISA 1.0 | Shift bits right, arithmetic or logical depending on the operand's signedness. |
| xor | xor.type d, a, b; | PTX ISA 1.0 | Bitwise XOR of two operands. |