teach-ict.com logo

THE education site for computer science and ICT

3. Basic Boolean laws: Association

While Boolean algebra does have some of its own laws (see previous page), it also borrows some from regular arithmetic and algebra.

These include:

  • Association (grouping variables into brackets)
  • Commutation (order of variables doesn't matter)
  • Distribution (multiplying all at once is the same as multiplying individually)
  • Absorption (a trick of binary arithmetic that allows easy cancellation of factors)

Association

The Associative Law is what allows you to group variables into brackets, and to break brackets apart again.

In Boolean algebra, you can freely group together 'OR' expressions and 'AND' expressions, for example a set of inputs with only OR between means that you can bracket any way you want

$A + B + C$ could be laid out as $(A+B)+C$ or as $A + (B+C)$ and so on.

but a mix of AND and OR operations is more complicated.

For example, with OR expressions - the three horizonatal lines mean 'equivalent to'

$A + (B+C) \equiv (A + B) + C \equiv A + B + C$

And the associative law for AND means that:

$A(B.C) \equiv (A.B).C \equiv A.B.C$

 

 

As an example of how this can help simplify expressions, look at the one below:

$A + B + (C.D) + (A + B) = Q$

 

The Associative Law lets us group the first two terms together:

$(A + B) + (C.D) + (A + B) = Q$

 

There are now three sets of inputs, (A + B), (B.C), and (A + B). The first and third inputs are identical. And we learned on the previous page that if you have two identical inputs (identity A+A=A), it is the same as just having one of those inputs (idempotence).

This allows us to simplify the expression to

$(A + B) + (C.D) = Q$

 

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: boolean laws or rules