Boolean associativity
If a booleans operator is associative, it means that we can group the values in any way and we get the same result.
For any operator
A \ominus (B \ominus C) = (A \ominus B) \ominus C
The main booleans operations that are associative are:
- AND:
A \cdot (B \cdot C) = (A \cdot B) \cdot C - OR:
A + (B + C) = (A + B) + C - XOR:
A \oplus (B \oplus C) = (A \oplus B) \oplus C
This means that we can group the values in any way we like when we’re using these operations, and we’ll get the same results.
flashcards
| Question | Answer |
|---|---|
| What does it mean for a boolean operator to be associative? | It means we can group the values in any way and get the same result: |
| Which main boolean operations are associative? | AND ( |
| How can we rewrite an expression using an associative operator? | We can rewrite |