Logic Circuits

advertisement
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
1. Go to the web site http://www.play-hookey.com/digital/adder.html
1
2. Use MultiMedia Logic to design the Half Adder below, and confirm that your
circuit generates the truth table provided.
3. The Truth Table for the Full Adder is given below. Give definitions for the
variables found at the top of the truth table, A, B, C in , C out, and Sum.
Defintions:
A=
B=
C in =
In spite of the long
explanation for the Full
Adder provided on the
web site, there is a simple
explanation for
mathematical rule
governing the Truth
Table.
What is the simple rule ?
( in English , please ! )
C out =
S=
4. It is NOT a simple matter to derive the logic circuits for the Full Adder.
Obviously, with 8 rows in the table, it is more difficult to give a simple expression
for Cout (Carry out) and S (for Sum). Presently, we do not have a diagram of the
Full Adder, and we will use this series of lessons to derive a solution.
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
Boolean Algebra Rules
2
The table below lists basic rules for simplifying Boolean Expressions. When making
your own proofs starting on page 7, justify each line of your proof by quoting the Rule
Number or Short Form of the expressions listed below.
Number
1
2
3
4
5
6
7
8
9
10
11
12
Rule
or
or
or
or
or
or
or
or
A0A
A 11
A00
A 1  A
A A A
A  A 1
A A A
A A0
AA
A  AB  A
A  AB  A  B
( A  B)( A  C )  A  BC
or
or
or
or
0 AA
1 A 1
0 A0
1 A  A
A A A
A  A 1
A A A
A A0
AA
AB  A  A
AB  A  A  B
( A  C )( A  B)  A  BC
A, B and C may represent a single variable or an entire boolean expression.
DeMorgan’s Theorems
The theorems developed by DeMorgan are listed below.
Theorem
X Y  X  Y
X  Y  X Y
Short Form
DM1
DM2
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
3
Laws of Operation
Law
Commutative Law
Associative Law
Distributive Law
Example
AB B A
ABB A
( A  B)  C  A  (B  C )
( A  B)  C  A  (B  C )
A  (B  C )  A  B  A  C
A  (B  C )  ( A  B)  ( A  C )
Short Form
COM
ASSOC
DIST
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
4
Boolean Algebra Proofs
All Boolean Algebra Proofs follow a rigorous and consistent approach as outlined below:
1. All work is completed within a four-column table labeled (from left to right):
 STEP (lists the step number, starting at 1)
 LEFT SIDE (denoting the left side of the equation you wish to prove),
 RIGHT SIDE (denoting the right side of the equation you wish to prove)
 REASON (either Rule 1 to 12, an Operations Rule (COM, ASSOC, DIST) or De
Morgan’s Laws (DM1 or DM2)
2.
Each line shows only one step (unless the simplification is exactly the same where
multiple simplifications are allowed). For example:


A  AB  AB  C  C  AB could be simplified to: A1  B  AB C  C
using the Distributive Law (DIST) in one step.
A  B is the same as AB .
3.
Sample Proofs:
Rule To Prove: Rule 10
Distributive Law
using only Rules 1 through 9 and the
PROOF:
Step
1
2
3
4
Left Side
A(1  B)
A 1
A
LS  RS
 A  AB  A
Right Side
A
A
A
A
Justification
Given
DIST
Rule 2
Rule 4
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
5
Rule To Prove: Rule 11: A  AB  A  B using only Rules 1 through 10 and the
Distributive Law (DIST). Note: AB is the same as A  B <This is a SNEAKY one>.
PROOF:
Step
1
Left Side
AB
AB
AB
A 1  A  B  AB
A  A  B  AB
A  ( A  A)B
A 1  B
AB
LS  RS
 A  AB  A  B
AB
AB
AB
DIST
AB
AB
Rule 6
Rule 4
3
5
6
7
8
Justification
Given
A  AB
A 1  AB
A  (1  B)  AB
2
4
Right Side
Rule 4
Rule 2
Rule 4
DIST
Boolean Algebra Simplifications
Boolean Algebra Simplifications are done the same as Boolean Algebra Proofs. The only
exception is that there are only three columns instead of four columns as there is no right
side.
Simplify:
Step
1
2
3
4
5
6
A B  A B  A B
Left Side
A B  A B  A B
A B B  A B
A  1  A  B
A  AB
A  AB
A B


Step 5 is another example of a SNEAKY one!
Justification
Given
DIST
6
4
9
11
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
Practice:
Simplify:
Y  ABC  ABC  ABC  ABC  BC  AC
Step
Left Side
ABC  ABC  ABC  ABC
1
2
3
4
5
6
8
9
10
ABC  ABC  ABC  ABC
A  ABC  ABC  ABC
1 BC  ABC  ABC
BC  ABC  ABC
BC  ABC
B  AB C
B  BA C
B  A   C
BC  AC
Justification
Given
COM
DIST
6
4
5
DIST
COM
11
COM
Boolean Algebra Circuit Practice
For the diagram below:
1. Write the Boolean Equation as shown by the circuit diagram.
2. Simplify the Boolean Equation using Boolean Algebra Rules.
Y  ( A  ( A  B))  B) ) simplifies to Y  ( A  B)  B
3.
4.
5.
6.
7.
Draw the circuit diagram of the simplified Boolean Equation.
Construct a Truth Table showing all gates of the original circuit diagram.
Include a column showing the simplified circuit diagram.
What do you notice about both these columns? (They will be identical)
What can you conclude? (That we have done it correctly by algebra rules. The truth
table verifies our answer.)
6
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
7
More Practice:
For each logic diagram below:
a) Write the Boolean Equation.
b) Simplify the Boolean Equation using Rules of Boolean Algebra and De Morgan’s
Rules. (Show as a two-column table – include reasons for simplification).
c) Write out the Truth Table for the simplified Boolean Equation.
d) Draw the Logic Diagram of the simplified Boolean Equation.
e) Prove with Truth Tables that the original and simplified Boolean Expressions are
equivalent.
1.
2.
3.
4.
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
8
Min-terms (Sum-of-Products method)
How to develop a circuit from a truth table, using "minterms".
a) Write the needed truth table to solve the specific problem.
b) On each line where the truth table has a 1 in the output, write the "minterm".
c) OR the minterms together to get the final equation. This gives a correct equation for
the truth table, but not necessarily the simplest equation.
What is a minterm? A minterm is an expression made from the inputs (A, B, C...) or the
inverses of the inputs ( A , B, C ) combined with AND. If the input is a 1, use the
input; if the input is a 0, use the inverse.
Summary of minterms:
A
B
MINTERM
Simple Example: A
B
X
0
0
A B
0
0
0
0
1
A B
0
1
1
1
0
1
0
0
1
1
A B
A B
MINTERM
A B
1
1
0
The equation is X  A  B
The minterm is written only for the line with a 1 in the output. The equation for this truth
table is therefore X  A  B
Exercise: Use minterms to make the equation for this truth table. It's equivalent to XOR
A
B
X
0
0
0
0
1
1
1
0
1
MINTERM
1
1
0
Write the result as an equation with XOR on the left and the minterm expression on the
right:
A  B =_ _ _ _ _ _ _ _ _ _ _ _ _
Exercise: Use Minterms to get an expression equivalent to XNOR.
Module 7 Assignment
9
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
Write the result as an equation with XNOR on the left and the minterm expression on the
right:
A  B =_ _ _ _ _ _ _ _ _ _ _ _ _
Those two equations are known as XOR theorems. They come in handy for simplifying
equations.
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
10
Finally Solving the Problem of the Full Adder:
Now let us return to the original problem of the Full Adder.
Here was the truth table for Adding Single Binary Digits A, B and Cin from a previous
addition:
Question: How might we apply min-terms to derive a correct solution for
this circuit?
Answer: We must actually derive an expression for Cout and an expression
for S separately:
Cout = A’BC + AB’C + ABC’ + ABC (is the min-term expression for the
4 1’s found in the Cout column)
Now use the rules from the previous lessons to simplify:
Cout
= A’BC + AB’C + ABC’ + ABC
(student to calculate the following…)
= ABC’ + ABC + A’BC + AB’C (reordering of terms)
= AB(C’ + C) + C(A’B + AB’)
 AB(1)  C ( A  B)
= ( A  B)  (( A  B)  C )
And for the Sum, S, we have
S
= A’B’C + A’BC’ + AB’C’ + ABC
(student to calculate the following…)
=A’B’C + ABC + A’BC’ + AB’C’ (reordering terms)
=C(A’B’ + AB) + C’(A’B + AB’) (distributive property)
(by truth table A’B’ + AB = 1)
 C (1)  C ' ( A  B)
(by definition of exclusive or)
 A B C
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
11
Use the diagram of the Full Adder, given below and copied from http://www.playhookey.com/digital/adder.html to verify your answer.
Your challenge is to use MultiMedia Logic to build and connect the circuits represented
by the schematic on the left. The 4 bits of A and B are numbered 0 to 3 going right to
left, which corresponds to bottom to top in the schematic below.
Give the Truth Table for Adding two 4-bit Binary
numbers by testing your circuit.
A
(4 bits )
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
B
(4 bits)
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Sum
(4 bits)
Cout
(4 bits)
Boolean
Algebra
Rules
Module 7 Assignment
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
12
Think About It:
How did you teach Boolean Algebra?
My first teachings will be that any Boolean expression with identical truth tables are in
fact identical expressions. Much follows from this basic premise. That was covered also
in grade 11.
I thought it best to use basic rules at first – many obvious ones. Then, do Commutative,
Associative and Distributive Law. Then, DeMorgan’s Theorems and finally Minterms.
This was sufficient to solve the initial investigation about building the Full Adder.
There are still DeMorgan Transformations and Karnaugh Maps to teach, but they were
not needed for this investigation.
Did you integrate it into your teaching of Integrated Circuits? How did you develop
the rules and their application to Boolean equations? Were Truth Tables developed
in conjunction with the schematics and the equations?
The above rules were integrated with circuits, because students were familiar from grade
11 with the task of building the 4-bit adder. So to investigate HOW the circuit was
derived was a good, natural extension of grade 11, and it motivated much of the above
discussions.
Truth tables would have been used to prove laws 1 to 9, which can then easily be
extrapolated to laws 10, 11 and 12 (as was done in the examples above).
What tools do you use to make circuit diagrams easier to create and read?
I use Multimedia Logic. Some others use CircuitMaker 2000.
As you develop your assignment, think about the students' knowledge of Logic
Circuits and how complex a problem they could solve and document (Circuit
Diagram and Truth Table).
By starting with a familiar problem, students were able to expand the complexity of
problems which they could attempt.
Work With It:
The big decision is whether the assignment is formative or summative. Is the student
learning from this experience or showing off their knowledge? The design of your
assignment and its complexity hinges on these premises.
Module 7 Assignment
13
Boolean Algebra and Digital Logic
With Multimedia Logic and Powered Breadboards
As you develop your assignment, look at the variety of ways that a student could learn
(acquire) the subject material from the assignment. Or, in the case of a summative
assignment, how many different ways could a student demonstrate that they had mastered
the material?
As stated at the beginning, most of this assignment WAS formative. ONLY the last
derivation of Csum and S could be construed as formative – and that being so only if
students were asked to repeat the process on a test. Certainly they could do so. They
would need to study their notes up to that point.
Students have demonstrated their master of the material in steps: Simple Truth Tables to
derive laws 1 to 9, extension of laws 1 to 9 to 10, 11 and 12 by arguments, Boolean
proofs by citing rules, and simplification with rules. Then finally, simplification by
minterms.
All of these steps rely upon knowing the previous steps.
Thus, a student who does not understand ALL of the above could still demonstrate
considerable achievement.
Discussion Topic: Learning From Multiple Representations
There are a variety of models of learning and there are a number of learning theories. We
have to try to develop materials that cater to these differences in our students. It may
require a variety of explanations and representations to produce understanding in all your
students.
How do you present material so that all learners in your classroom are taken into
account?
We use truth tables, simulation software and mathematical expressions – all intertwined.
Some students will always resort to truth tables, and others may always resort to
simulation software. Not many would resort to final real circuits on a breadboard,
because of the difficulty of doing so. But the fact is, many different media are used to
achieve the desired outcomes, and lessons are delivered in a manner which allows natural
transmediation between the different methods.
Download