developing the half adder and full adder

19
Module 7 Assignment 1 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 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 = C out = 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 ! )

Upload: faisal-khan

Post on 24-Oct-2014

55 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Developing the Half Adder and Full Adder

Module 7 Assignment 1Boolean Algebra and Digital Logic

With Multimedia Logic and Powered Breadboards1. Go to the web site http://www.play-hookey.com/digital/adder.html

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.

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.

Defintions:A =

B =

C in =

C out =

S =

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 ! )

Page 2: Developing the Half Adder and Full Adder

Module 7 Assignment 2Boolean Algebra and Digital Logic

With Multimedia Logic and Powered BreadboardsBoolean Algebra Rules

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 Rule1 or2 or

3 or4 or5 or6 or7 or8 or9 or

10 or11 or12 or

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 Short Form

DM1DM2

Page 3: Developing the Half Adder and Full Adder

Module 7 Assignment 3Boolean Algebra and Digital Logic

With Multimedia Logic and Powered Breadboards

Laws of Operation

Law Example Short FormCommutative Law

COM

Associative Law ASSOC

Distributive Law DIST

Page 4: Developing the Half Adder and Full Adder

Module 7 Assignment 4Boolean Algebra and Digital Logic

With Multimedia Logic and Powered Breadboards

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:

could be simplified to: using the Distributive Law (DIST) in one step.

3. is the same as .

Sample Proofs:

Rule To Prove: Rule 10 using only Rules 1 through 9 and the Distributive Law

PROOF:  Step Left Side Right Side Justification

1 Given2   DIST3 Rule 24 Rule 4

Page 5: Developing the Half Adder and Full Adder

Module 7 Assignment 5Boolean Algebra and Digital Logic

With Multimedia Logic and Powered BreadboardsRule To Prove: Rule 11: using only Rules 1 through 10 and the Distributive Law (DIST). Note: is the same as <This is a SNEAKY one>.

PROOF: 

Step Left Side Right Side Justification1  Given2   Rule 43 Rule 24 DIST5 Rule 46 DIST7 Rule 68 Rule 4

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 Left Side Justification1 Given2 DIST3 64 45 96 11

Step 5 is another example of a SNEAKY one!

Page 6: Developing the Half Adder and Full Adder

Module 7 Assignment 6Boolean Algebra and Digital Logic

With Multimedia Logic and Powered BreadboardsPractice:

Simplify:

Step Left Side JustificationGiven

1 COM2 DIST3 64 45 56 DIST8 COM9 1110 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.

) simplifies to

3. Draw the circuit diagram of the simplified Boolean Equation.4. Construct a Truth Table showing all gates of the original circuit diagram.5. Include a column showing the simplified circuit diagram.6. What do you notice about both these columns? (They will be identical)7. What can you conclude? (That we have done it correctly by algebra rules. The truth

table verifies our answer.)

Page 7: Developing the Half Adder and Full Adder

Module 7 Assignment 7Boolean Algebra and Digital Logic

With Multimedia Logic and Powered Breadboards

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.

Page 8: Developing the Half Adder and Full Adder

Module 7 Assignment 8Boolean Algebra and Digital Logic

With Multimedia Logic and Powered BreadboardsMin-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 ( ) 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 MINTERM

0 0 0 0 0

0 1 0 1 1

1 0 1 0 0

1 1 1 1 0

The equation is

The minterm is written only for the line with a 1 in the output. The equation for this truth table is therefore

Exercise: Use minterms to make the equation for this truth table. It's equivalent to XOR

A B X MINTERM

0 0 0

0 1 1

1 0 1

1 1 0

Write the result as an equation with XOR on the left and the minterm expression on the right:

Exercise: Use Minterms to get an expression equivalent to XNOR.

Page 9: Developing the Half Adder and Full Adder

Module 7 Assignment 9Boolean Algebra and Digital Logic

With Multimedia Logic and Powered BreadboardsWrite the result as an equation with XNOR on the left and the minterm expression on the right:

Those two equations are known as XOR theorems. They come in handy for simplifying equations.

Page 10: Developing the Half Adder and Full Adder

Module 7 Assignment 10Boolean Algebra and Digital Logic

With Multimedia Logic and Powered Breadboards

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’)

=

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)

(by definition of exclusive or)

Page 11: Developing the Half Adder and Full Adder

Module 7 Assignment 11Boolean Algebra and Digital Logic

With Multimedia Logic and Powered BreadboardsUse the diagram of the Full Adder, given below and copied from http://www.play-hookey.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.

Boolean Algebra Rules 

A B Sum Cout (4 bits ) (4 bits) (4 bits) (4 bits)0000 00000001 00010010 00100011 00110100 01000101 01010110 01100111 01111000 10001001 10011010 10101011 10111100 11001101 11011110 11101111 1111

Page 12: Developing the Half Adder and Full Adder

Module 7 Assignment 12Boolean Algebra and Digital Logic

With Multimedia Logic and Powered Breadboards

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.

Page 13: Developing the Half Adder and Full Adder

Module 7 Assignment 13Boolean Algebra and Digital Logic

With Multimedia Logic and Powered BreadboardsAs 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.