Back

The commutative, associative and distributive Boolean laws

Introduction
So far, we know what some of the basic logic gates look like, we have drawn simple logic diagrams to explain the twelve basic identities that we will be using to manipulate Boolean expressions and we have used a couple of simple truth tables to help us understand a few of the diagrams, although we will deal truth tables in more detail in another section. There are a few more rules that we need to know, but fortunately, the ones in this section are straightforward. 

The important thing to remember about these three Boolean algebra laws, the commutative law for addition and multiplication, the associative law for addition and multiplication and the distributive law are that they are the same as for normal algebra, the kind that you have been doing in Maths since the start of secondary school.

Commutative law
This law says:

commutative

A AND B ≡ B AND A    and in notation, we would write:

A Λ B  B Λ A

as well as 

A OR B ≡ B OR A    and in notation, we would write:

A V B  B V A

All the commutative law is saying is that if you are dealing solely with ANDs or solely with ORs, then you can move the elements in a Boolean equation around. It's a little bit like saying if you need to add 5 to 14, it doesn't matter whether the sum is 5 + 14 or 14 + 5, or if you need to multiply 3 by 5, it doesn't matter if you do 3 times 5, or 5 times 3. The answer will be the same. We should note that in Boolean algebra, addition and logical OR are the same, and multiplication and AND are the same, but we will see more of this in later sections.


Associative law

This law says:

associative

A AND (B AND C) ≡ (A AND B) AND C     and in notation, we would write:

A Λ (B Λ C)   (A Λ B) Λ C

as well as

(A OR B) OR C ≡ A OR (B OR C)      and in notation, we would write:

(A V B) V C  A V (B V C)

As long as you are dealing only with ANDs, or only with ORs, then it doesn't matter which elements you AND or OR first. The associative law is a little bit like saying if you want to add three numbers, it doesn't matter whether you add the first two numbers first and then the third number, or add the second and third number first and then add the first number. The result will be the same. Of course, we aren't adding, we are using logic operations but the idea is the same. 


Distributive law
This law says:

distributive

A AND (B OR C) ≡ (A AND B) OR (A AND C)       and in notation, we would write:

A Λ (B V C)  (A Λ B) V (A Λ C)

as well as

A OR (B AND C) ≡ (A OR B) AND (A OR C)      and in notation, we would write:

A V (B Λ C)  (A V B) Λ (A V C)

Note the reverse is true as well, in that you can remove factors (common variables), like in normal algebra. for example if you had (3 * 4) + (3 * 2), you could factorise this into 3(4 + 2). Both answers give 18. The Boolean equivalent of this is:

(A AND B) OR (A AND C) ≡ A AND (B OR C)

Back