Bitwise operation in conditional node

Hi,

Is there a way to use bitwise operations in the conditional node? We have a status word that needs to be decoded bit by bit. I was able to use bit-shifting operations, but that only works if the upper bits are either zero or have a known value.

Thanks,
David

1 Like

Hey @David_Santoso,

You’ll likely have to use a Function Node to parse the status value into separate values on the payload. JavaScript does have a number of bitwise operators that can be used to extract the values at each bit.

1 Like

Ive used a function node to convert hex values to bin, then array nodes to pick out the bit flags of intrest.

Thank you @Brandon_Cannaday and @Stewart_McCallum, I was able to do bitwise operations using the Function Node.

Best,
David