CH 4
CH 4
1
Boolean Operations & Expressions
Variable
– A symbol that represents a logical quantity
– Usually italic uppercase (A, B, C, D)
– A single variable can have a 1 or 0 value
Complement
– The inverse of a variable
– Indicated by an overbar (Ā) or prime (A’)
– If A = 1 , then Ā = 0
Basic laws of BA
Commutative Laws
For addition and multiplication
Associative Laws
For addition and multiplication
Distributive Laws
3
3
Commutative Laws
A + B = B + A
A B
A+B B+A
B A
AB = BA
A B
AB BA
B A
4
Associative Laws
A + (B + C) = (A + B) + C
A A
A+B
A + (B + C)
B
B
(A + B) + C
B+C
C C
Associative law of addition
A(BC) = (AB)C
A A
A(BC)
B
B
(AB)C
BC
C C
A(B + C) = AB + AC
B A
B+C
C B
AB + AC
A(B + C)
A
A
C
6
Rules of Boolean Algebra
1 A+0=A
2 A+1=1
3 A 0=0
4 A 1=A
5 A+A=A
6 A+A=1
7 A A=A
8 A A=0
9 A=A
10 A + AB = A
11 A + AB = A + B
12 (A + B)(A + C) = A + BC
7
7
Rules of Boolean Algebra: Proof
Rule 1:
A= 1 A= 0
X=1 X=0
0 0
X=A+0=A
Rule 2:
A= 1 A= 0
X=1 X=1
1 1
X=A+1=1
8
8
Rule 3:
A= 1 A= 0
X=0 X=0
0 0
X=A 0=0
Rule 4:
A= 0 A= 1
X=0 X=1
1 1
X=A 1=A
Rule 5:
A= 0 A= 1
X=0 X=1
A= 0 A= 1
X=A+A=A
9
Rule 6:
A= 0 A= 1
X=1 X=1
A= 1 A= 0
X=A+A=1
Rule 7:
A= 0 A= 1
X=0 X=1
A= 0 A= 1
X=A A=A
Rule 8:
A= 1 A= 0
X=0 X=0
A=0 A=1
X=A A=0
Rule 9:
A =0
A =1
A= 1 A=1
A= 0 A=0
A=A
10
Rules 10, 11 and 12 can be proven using BA laws
Rule 10:
A + AB = A(1 + B) Factoring (distributive law)
=A.1 Rule 2: (1 + B) = 1
=A Rule 4: A . 1 = A
Rule 11:
A + AB = (A + AB) + AB Rule 10: A = A + AB
= (AA + AB) + AB Rule 7: A = AA
= AA + AB + AA + AB Rule 8: adding AA = 0
= (A + A)(A + B) Factoring
= 1 . (A + B) Rule 6: A + A = 1
=A+B Rule 4: drop the 1
Rule 12:
(A + B)(A + C) = AA + AC + AB + BC Distributive law
= A + AC + AB + BC Rule 7: AA = A
= A(1 + C) + AB + BC Factoring (distributive law)
= A . 1 + AB + BC Rule 2: 1 + C = 1
= A(1 + B) + BC Factoring (distributive law)
= A . 1 + BC Rule 2: 1 + B = 1
11
= A + BC Rule 4: A . 1 = A
Proof can also be shown by a truth table.
Rule 10
A B AB A + AB
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
equal
12
DeMorgan’s Theorems
X X
X+Y XY
Y Y
NOR Negative-AND
13
DM theorem 1:
The complement of a product of variables is equal
to the sum of the complements of the variables
XY = X + Y
DM theorem 2:
The complement of a sum of variables is equal to
the product of the complements of the variables
X + Y = XY
14
DeMorgan’s Theorem Application
DeMorgan's Theorems I
XYZ = X + Y + Z
WXYZ = W + X + Y + Z
DeMorgan's Theorem II
X + Y + Z = XYZ
W + X + Y + Z = WXYZ
15
15
Examples for DeMorgan’s Theorems
16
16
Quiz 2
( AB C )( A BC ) Y
17
Standard Form of Boolean Expressions
18
Sum-of-Products Form (Minterms)
SOP = when 2 or more product/AND terms are
summed/ORed
Some examples of this form are:
ABC ABC
AB ABC CD D
AB CD EF GH
Each AND term consists of one or more variables appearing in
either complemented or Uncomplemented form.
SOP can also contain a single variable term
ABC or RST
Cont…
A logic expression can be changed to SOP form using
Boolean algebra techniques.
A(B + CD) = AB + ACD
AB + B(CD + EF) = AB + BCD + BEF
20
Standard SOP
Domain = a set of variables contained in an
expression
E.g. AB + ABC domain = A, B, C
ABC + CDE + BCD domain = A, B, C, D, E
21
Example
Convert this Boolean expression to standard SOP form:
ABC A B ABC D
Domain = A, B, C, D.
What is missing?
Term 1: missing D or D’
Term 2: missing (C/C’) and (D/D’)
Complete these terms by applying Boolean rule 6
Term 1 : A BC A BC ( D D) A BCD A BC D
Term 2 : A B A BC A BC
A BC ( D D) A BC ( D D) A BCD A BC D A BC D A BC D
Now we have
ABC AB ABC D
ABCD ABC D ABCD ABC D ABC D ABC D ABC D
22
Product-of-Sums (POS) Form
POS = when 2 or more sum terms are
multiplied.
( A B C) ( A C)
( A B ) (C D) F
Like SOP, POS
can also contain a single variable term
a single overbar cannot extend over more than one
variable, but more than one variable can have an
overbar.
Example: we can not have
A B C
23
Standard POS
Standard POS form = where all the variables in
the domain appear in each sum term in the
expression.
To convert product terms to standard POS
Multiply each of the nonstandard term with the
missing term using Boolean algebra rule 8:
A A 0
Apply rule 12 :
A BC ( A B )( A C )
Repeat until all variables appear in each sum term.
24
Example
Convert this Boolean expression to standard POS form
( A B C )( B C D )( A B C D )
Domain = A, B, C, D.
What is missing?
Term 1: missing D or D’
Term 2: missing A or A’
Apply rules 8 and 12
Term 1 : A B C A B C D D ( A B C D)( A B C D)
Term 2 : B C D B C D A A
A B AX X B
0X X0
00 01 00 10
00 01 10
m 0 m1 m 2
m(0,1,2)
Exercise
Expand A BC ABC to minterms and maxterms
Expansion of a Boolean Expression to POS Form
The expansion of a Boolean expression to the standard
POS form is conducted as follows:
1. If one or more variables are missing in any sum term,
expand that term by adding the products of each of
the missing term and its complement.
2. Drop out the redundant terms.
The given expression can also be written in terms of
maxterms by using the following procedure:
A A BB C C
( A B )( A B ) C C
( A B C C )( A B C C )
( A B C )( A B C ) ( A B C )( A B C )
A C A C BB
(A B C)( A B C)
Hence,