Boolean Algebra with OR and XOR in sequence

137 Views Asked by At

For an expression like A (OR) B (OR) C (XOR) D, how would I interpret the output? Would it be (A (OR) B (OR) C) (XOR) D or (A (OR) B) (OR) (C (XOR) D)?

1

There are 1 best solutions below

1
On

There will probably be a few websites or even books that define precedence for these operators in some way, but there is really no consensus on this. Best thing to do is to ask the author what they meant. Also, there's a moral here: Using parentheses to disambiguate is usually a very good thing to do!