You are on page 1of 14

# 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 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 = What is the simple rule ? ( in English , please ! ) 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.

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

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

## A+0=A A +1 =1 A0=0 A 1 = A A+ A=A A + A =1 A A= A A A=0

Rule or or or or or or or or or or or or

## 0+A=A 1+ A =1 0A=0 1 A = 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

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. DeMorgans Theorems The theorems developed by DeMorgan are listed below. Theorem Short Form DM1 DM2

X Y = X + Y X + Y = X Y

Module 7 Assignment Boolean Algebra and Digital Logic With Multimedia Logic and Powered Breadboards Laws of Operation Law Commutative Law Example

AB =B A

Short Form
COM ASSOC DIST

## Associative Law Distributive Law

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 )

Module 7 Assignment Boolean 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 Morgans 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.

3.

A B is the same as AB .

Sample Proofs: Rule To Prove: Rule 10 Law PROOF: Step 1 2 3 4 Left Side Right Side using only Rules 1 through 9 and the Distributive

A(1 + B) A 1 A LS = RS A + AB = A

A A A A

## Justification Given DIST Rule 2 Rule 4

Module 7 Assignment 5 Boolean Algebra and Digital Logic With Multimedia Logic and Powered Breadboards 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 2 3 4 5 6 7 8 Left Side

A + AB A 1 + AB A (1 + B) + AB A 1 + A B + AB A + A B + AB A + ( A + A)B A + 1 B A+B LS = RS A + AB = A + B

Right Side

## Justification Given Rule 4 Rule 2 DIST Rule 4 DIST Rule 6 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: A B + A B + A B Step 1 2 3 4 5 6 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!

Module 7 Assignment Boolean Algebra and Digital Logic With Multimedia Logic and Powered Breadboards Practice: Simplify:
Y = ABC + ABC + ABC + ABC = BC + AC

Step 1 2 3 4 5 6 8 9 10

Left Side
ABC + ABC + ABC + ABC

## ( A + A )BC + ABC + ABC

(1) BC + ABC + ABC
BC + ABC + ABC BC + ABC

## ABC + ABC + ABC + ABC

(B + A ) C
BC + AC

(B + AB) C (B + BA ) C

## 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.)

Module 7 Assignment Boolean 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 Morgans 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 1Min-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 0 0 1 1 B 0 1 0 1 MINTERM Simple Example: A 0 0 1 B 0 1 0 X 0 1 0

MINTERM

A B A B A B A B

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 0 0 1 B 0 1 0 X 0 1 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 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:

10

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 = ABC + ABC + ABC + ABC (is the min-term expression for the 4 1s found in the Cout column) Now use the rules from the previous lessons to simplify: Cout = ABC + ABC + ABC + ABC

(student to calculate the following) = ABC + ABC + ABC + ABC (reordering of terms) = AB(C + C) + C(AB + AB) = AB(1) + C ( A B) = ( A B) + (( A B) C ) And for the Sum, S, we have S = ABC + ABC + ABC + ABC

(student to calculate the following) =ABC + ABC + ABC + ABC (reordering terms) =C(AB + AB) + C(AB + AB) (distributive property) (by truth table AB + 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 Use the diagram of the Full Adder, given below and copied from http://www.playhookey.com/digital/adder.html to verify your answer.

11

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)

Module 7 Assignment Boolean Algebra and Digital Logic With Multimedia Logic and Powered Breadboards Boolean Algebra Rules

12

Module 7 Assignment Boolean Algebra and Digital Logic With Multimedia Logic and Powered Breadboards Think About It: How did you teach Boolean Algebra?

13