# Logical Intrinsics

Intel® Streaming SIMD Extensions 2 (Intel® SSE2) intrinsics for floating-point logical operations are listed in the following table. The prototypes for Intel® SSE2 intrinsics are in the emmintrin.h header file.

To use these intrinsics, include the immintrin.h file as follows:

    #include <immintrin.h>

The results of each intrinsic operation are placed in registers. The information about what is placed in each register appears in the tables below, in the detailed explanation for each intrinsic. For each intrinsic, the resulting register is represented by R0 and R1, where R0 and R1 each represent one piece of the result register.

Intrinsic Name | Operation | Corresponding Intel® SSE2 Instruction
--- | --- | ---
_mm_and_pd | Computes AND | ANDPD
_mm_andnot_pd | Computes AND and NOT | ANDNPD
_mm_or_pd | Computes OR | ORPD
_mm_xor_pd | Computes XOR | XORPD

## _mm_and_pd

__m128d _mm_and_pd(__m128d a, __m128d b);

Computes the bitwise AND of the two DP FP values of a and b.

R0 | R1
--- | ---
a0 & b0 | a1 & b1

## _mm_andnot_pd

__m128d _mm_andnot_pd(__m128d a, __m128d b);

Computes the bitwise AND of the 128-bit value in b and the bitwise NOT of the 128-bit value in a.

R0 | R1
--- | ---
(~a0) & b0 | (~a1) & b1

## _mm_or_pd

__m128d _mm_or_pd(__m128d a, __m128d b);

Computes the bitwise OR of the two DP FP values of a and b.

R0 | R1
--- | ---
a0 | b0 | a1 | b1

## _mm_xor_pd

__m128d _mm_xor_pd(__m128d a, __m128d b);

Computes the bitwise XOR of the two DP FP values of a and b.

R0 | R1
--- | ---
a0 ^ b0 | a1 ^ b1

Parent topic: Floating-point Intrinsics