bit-and(number)

koadrobot/bits/bit-and(number)

Computes bitwise AND of two or more number in integer_32. A resulting bit at a particular position is 1 only if corresponding bits of all inputs are 1.
bit-and(number)
@/bit-and(number)
Computes bitwise AND of two or more number in integer_32. A resulting bit at a particular position is 1 only if corresponding bits of all inputs are 1.
IN1number
Input number. Interpreted as a signed 32-bit interger
IN2number (variadic)
bit-and(number)
IN1
IN2
OUT
OUTnumber
To use the node in your project you should have the koadrobot/bits library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

#pragma XOD dirtieness disable

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    int32_t in1 = (int32_t)getValue<input_IN1>(ctx);
    int32_t in2 = (int32_t)getValue<input_IN2>(ctx);
    emitValue<output_OUT>(ctx, in1 & in2);
}

Tabular tests

IN1IN2OUT
000
010
100
111
120
311
898