I always find the description within Blender interface or in the docs confusing:
Mode
And: True when both inputs are true. (AND)
Or: True when at least one input is true. (OR)
Not: Opposite of the input. (NOT)
Not And: (True when at least one input is false. NAND)
Nor: True when both inputs are false. (NOR)
Equal: True when both inputs are equal. Also known as “exclusive nor”. (XNOR)
Not Equal: (XOR) True when both inputs are different. Also known as “exclusive or”.
Imply: True unless the first input is true and the second is false. (IMPLY)
Subtract: True when the first input is true and the second is false. Also known as “”not imply”. (NIMPLY)
...And for how ridiculously few combinations there are for 2 binary operands and one binary result, I just draw myself a table, decide which results I want in the table and see which mode achieves that. So I decided to prepare a tidy cheat-sheet to make this process easier for myself and others in the future.
Node tree used: