Difficulties with vectorized logical operations due to operator precedence

Um, not sure I follow you. My example used ==, not =. Assignment does have lower precedence than comparison operators, as expected.

To clarify, I never use | and & as bitwise operators on numbers, I only use them for vectorized boolean operations. So I have no expectation regarding what 3 | 4 should equal.