Professional Documents
Culture Documents
c 2005 Email: chamer, mlavelle, dmcmullan@plymouth.ac.uk
Last Revision Date: August 31, 2006 Version 1.0
Table of Contents
1. Logic Gates (Introduction)
2. Truth Tables
3. Basic Rules of Boolean Algebra
4. Boolean Algebra
5. Final Quiz
Solutions to Exercises
Solutions to Quizzes
Consider the AND gate where one of the inputs is 1. By using the
truth table, investigate the possible outputs and hence simplify the
expression x · 1.
Solution From the truth table for AND, we see that if x is 1 then
1 · 1 = 1, while if x is 0 then 0 · 1 = 0. This can be summarised in the
rule that x · 1 = x, i.e.,
x
x
1
Section 3: Basic Rules of Boolean Algebra 6
Example 2
x
0
Consider the AND gate where one of the inputs is 0. By using the
truth table, investigate the possible outputs and hence simplify the
expression x · 0.
Solution From the truth table for AND, we see that if x is 1 then
1 · 0 = 0, while if x is 0 then 0 · 0 = 0. This can be summarised in the
rule that x · 0 = 0
x
0
0
Section 3: Basic Rules of Boolean Algebra 7
x
(b) x + 1 which corresponds to the logic gate
1
x
(b) x · x which corresponds to the logic gate
Section 3: Basic Rules of Boolean Algebra 8
x
(b) x · x0 which corresponds to the logic gate
x x
(a)
y y
x x
(b)
y y
4. Boolean Algebra
(1a) x·y = y·x
(1b) x+y = y+x
(2a) x · (y · z) = (x · y) · z
(2b) x + (y + z) = (x + y) + z
(3a) x · (y + z) = (x · y) + (x · z)
(3b) x + (y · z) = (x + y) · (x + z)
(4a) x·x = x
(4b) x+x = x
(5a) x · (x + y) = x
(5b) x + (x · y) = x
(6a) x · x0 = 0
(6b) x + x0 = 1
(7) (x0 )0 = x
(8a) (x · y)0 = x0 + y 0
(8b) (x + y)0 = x0 · y 0
Section 4: Boolean Algebra 11
These rules are a direct translation into the notation of logic gates
of the rules derived in the package Truth Tables and Boolean
Algebra. We have seen that they can all be checked by investigating
the corresponding truth tables. Alternatively, some of these rules can
be derived from simpler identities derived in this package.
Example 3 Show how rule (5a) can be derived from the basic iden-
tities derived earlier.
Solution
x · (x + y) = x · x + x · y using (3a)
= x + x · y using (4a)
= x · (1 + y) using (3a)
= x · 1 using Exercise 1
= x as required.
The examples above have all involved at most two inputs. However,
logic gates can be put together to join an arbitrary number of inputs.
The Boolean algebra rules of the table are essential to understand
when these circuits are equivalent and how they may be simplified.
x
y (x · y) · z
z
and
x
y x · (y · z)
z
Section 4: Boolean Algebra 13
However, rule (2a) states that these gates are equivalent. The order
of taking AND gates is not important. This is sometimes drawn as a
three (or more!) input AND gate
x
y x·y·z
z
but really this just means repeated use of AND gates as shown above.
Exercise 6. (Click on the green letter for the solution.)
(a) Show two different ways of combining three inputs via OR gates
and explain why they are equivalent.
This equivalence is summarised as a three (or more!) input OR gate
x
y x+y+z
z
5. Final Quiz
Begin Quiz
1. Select the Boolean expression that is not equivalent to x · x + x · x0
(a) x · (x + x0 ) (b) (x + x0 ) · x (c) x0 (d) x
End Quiz
Solutions to Exercises 15
Solutions to Exercises
Exercise 1(a) From the truth table for OR, we see that if x is 1 then
1 + 0 = 1, while if x is 0 then 0 + 0 = 0. This can be summarised in
the rule that x + 0 = x
x
x
0
Exercise 1(b) From the truth table for OR we see that if x is 1 then
1 + 1 = 1, while if x is 0 then 0 + 1 = 1. This can be summarised in
the rule that x + 1 = 1
x
1
1
Exercise 2(a) From the truth table for OR, we see that if x is 1 then
x + x = 1 + 1 = 1, while if x is 0 then x + x = 0 + 0 = 0. This can be
summarised in the rule that x + x = x
x
x
Exercise 2(b) From the truth table for AND, we see that if x is 1
then x · x = 1 · 1 = 1, while if x is 0 then x · x = 0 · 0 = 0. This can
be summarised in the rule that x · x = x
x
x
Exercise 3(a) From the truth table for OR, we see that if x is 1 then
x + x0 = 1 + 0 = 1, while if x is 0 then x + x0 = 0 + 1 = 1. This can
be summarised in the rule that x + x0 = 1
x
1
Exercise 3(b) From the truth table for AND, we see that if x is 1
then x · x0 = 1 · 0 = 0, while if x is 0 then x · x0 = 0 · 1 = 0. This can
be summarised in the rule that x · x0 = 0
x
0
x y x0 y0 x0 · y 0
x 0 0 1 1 1
y 0 1 1 0 0
1 0 0 1 0
1 1 0 0 0
From these we deduce the identity
x x
(x + y)0 = x0 · y 0
y y
Click on the green square to return
Solutions to Exercises 22
x y x0 y0 x0 + y 0
x 0 0 1 1 1
y 0 1 1 0 1
1 0 0 1 1
1 1 0 0 0
From these we deduce the identity
x x
(x · y)0 = x0 + y 0
y y
Click on the green square to return
Solutions to Exercises 23
Exercise 5(a)
x+x·y = x · (1 + y) using (3a)
= x · 1 using Exercise 1
= x as required.
Solutions to Exercises 24
x
y (x + y) + z
z
and
x
y x + (y + z)
z
However, rule (2b) states that these gates are equivalent. The order
of taking OR gates is not important.
Solutions to Quizzes 25
Solutions to Quizzes
Solution to Quiz: From the truth table for NOT we see that if x
is 1 then (x0 )0 = (10 )0 = (0)0 = 1, while if x is 0 then (x0 )0 = (00 )0 =
(1)0 = 0. This can be summarised in the rule that (x0 )0 = x
x x
End Quiz