The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Fall 2017 ECOM 2013 Khaleel I. Shaheen Combinational Digital Design Laboratory Manual Experiment #3 Boolean Algebra Continued
Objectives To use LogicAid software to directly and easily derive simplified logic equations from Sum-of-Products and Product-of-Sums equations, and truth tables. To practically implement expressions before and after simplification and show the difference in cost in every case. Theoretical Background LogicAid is a computer-aided design program that performs many functions commonly needed in the logic design process. It is capable of simplifying Boolean functions specified as equations and truth tables. Simplification of Boolean expressions LogicAid will accept Boolean equations in either sum-of-products or product-of-sums form and then simplify these equations. 2 1. Pull down the Input menu and select Equations. 2. When the Input Equations Format dialog box appears, type in the number of input variables if it is different from the default value of 4. If you want to enter more than one function, hit Tab and then enter the number of functions. The default input variable names are X1, X2, X3,, and the default function names are Z1, Z2, Z3,. If you wish to change any of these names, select Enter Names. If you want to enter your equation(s) in product-of-sums form instead of sum-of-products form, click on the appropriate button. Then click OK. 3. If you have selected Enter Names, the Input Variable Names dialog box will appear next. Change any names that you want to be different from the default values and then click OK. 4. An input window titled Equations appears next. Type the equations into the window. Here are some tips for making your input acceptable to LogicAid: Each equation must start with a function name followed by =, and must end with a period.
Each variable name should be followed by a space, a complement (') or a plus sign. Example of equations entered in sum-of-products form: F1 = A C' + A B' D + A' B' C + A' C D' + B' C' D'. Examples of equations entered in product-of-sums form are: F2 = (A'+ C'+ D) (A + B'+ C) (A + C + D') (B'+ C'+ D'). In product-of-sums form, a single variable must be enclosed in parentheses: F3 = (A + B) (C) (D'). Next you may select Check Syntax from the Input menu. After you have entered one or more logic equations, use the following procedure to derive simplified equations: 1. Select Simplification from the Routine menu. 2. Choose the output format (SOP or POS). 3. Select any other desired options and click OK. In product-of-sums form, a single variable must be enclosed in parentheses: F4 = (A + B) (C) (D'). Ex: Simplify the following expression using Boolean theorems then use LogicAid to verify your answer. z = ab cd e + acd + acf gh + abcd e + acde + e h = acd e + acd + acf gh + acde + e h {using XY + XY = X} = acd e + acd + acf gh + e h {using X + XY = X} = ac (d'e + d) + acf gh + e h = ace + acd + acf gh + e h {using X + X Y = X + Y} = ace + acd + acf gh + e h + ach {add consensus term ach } 3
= ace + acd + e h + ach {using X + XY = X} = ace + acd + e h Simplification of truth tables Given a truth table as input, LogicAid will find simplified equations for the functions defined by the truth table. 4 1. Select Truth Table from the Input menu. 2. When the Input Truth Table Format dialog box appears, type in the number of input variables if it is different from the default value of 4. 3. If your table has more than one output function, hit Tab and then enter the number of functions. 4. If you wish to change variables names, select Enter Names. 5. When you have finished selecting formats, click OK. 6. An input window titled Truth_Table appears next. The header at the top of the window lists the input variable names and output function names. Enter the truth table below this header. If you have selected the default format for input combinations (straight binary order), the binary input combinations will automatically be generated for you. For example, for three input variables, 000 will appear on the screen. Type in the corresponding output values and hit Enter. Then type in the output values corresponding to row 001, etc. 7. Next, you may select Check Syntax from the Input menu
Ex: Use LogicAid to derive the simplified expression for the following truth table. A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 Cost Criteria Cost criteria is used to measure the simplicity of a logic circuit. Gate cost is simply the number of gates used to implement an expression. Literal cost is the number of literals in an expression. Input cost is the number of literals plus the number of terms in an expression. Ex: Compute cost for each of the following expressions. 5 1. F = BD + AB'C + AC'D' Cost(G) = 4, Cost(L) = 8, Cost(I) = 11 2. F = (A + B) (A + D) (B + C + D') (B' + C' + D) Cost(G) = 5, Cost(L) = 10, Cost(I) = 14
3. F = A + BC Cost(G) = 2, Cost(L) = 3, Cost(I) = 4 4. F = AB + C (D + E) Cost(G) = 4, Cost(L) = 5, Cost(I) = 8 Lab Work Equipment s required: KL-31001 trainer kit. IC's 74LS04 (Hexa NOT), 74LS08 (Quad 2 input AND), 74LS32 (Quad 2 input OR). Connecting wires and Breadboard. The Datasheets of the IC s. Prelab Simplify each of the following Boolean expressions using Boolean theorems. Use LogicAid software to verify your answer. Build truth table for both original and simplified equations. Compute cost for both original and simplified equations. Use Logisim software to draw logic diagram for both original and simplified equations. Implementation F = W' X Y + W X Z + W Y' Z + W' Z'. F = (K + L') (K' + L' + N) (L' + M + N'). Exercises Do the prelab for the following two expressions: (Put screenshots of LogicAid results). 1. F = LM'N' + KLM' + KM'N + KL'N + K'LN' 2. F = (KL' + M) (K + L') M (convert to POS when using LogicAid) Good Luck 6