PTX ISA v9.4

9.7.9.1. Logic and Shift Instructions: and

and

Bitwise AND.

Syntax

ptx
and.type d, a, b;

.type = { .pred, .b16, .b32, .b64 };

Description

Compute the bit-wise and operation for the bits in a and b.

Semantics

ptx
d = a & b;

Notes

The size of the operands must match, but not necessarily the type.

Allowed types include predicate registers.

PTX ISA Notes

Introduced in PTX ISA version 1.0.

Target ISA Notes

Supported on all target architectures.

Examples

ptx
and.b32  x,q,r;
and.b32  sign,fpvalue,0x80000000;
esc
Type to search across all documentation