Digital Logic Design Malik Najmus Siraj siraj@case.edu.pkedu
LECTURE 4
Today s Agenda Recap 2 s complement Binary Logic Boolean algebra
Recap Computer Arithmetic Signed numbers Radix and diminished radix complement
2 s complement representation
2 s complement calculation
Complement Summary
Signed number with complement
Arithmetic with Radix complement
Binary Logic
Binary Logic
Evaluation of Logic function
Multiple input
Algebra
Boolean Algebra
Boolean algebra addition and multiplication li
Boolean addition
Boolean Multiplication
Theorems of Boolean algebra
Commutative Law
Duality principle Every Algebraic expression deducible from the postulates of Boolean algebra remains valid if the operator of identity elements are change.
Associative Law
Associative Law Associative Law for Multiplication A.(B.C) = (A.B).C
Distributive Law A.(B + C) = A.B + A.C
Rules of Boolean Algebra 1. A + 0 = A 7. AA= A.A A 2. A + 1 = 1 3. A.0 = 0 4. A.1 = A 8. A. = 0 A 9. A = A 10.A + A.B = A 5. A + A = A 11.A + A.B= A + B 6. A + A = 1 12.(A+B).(A+C) (A+C) = A+B.C
Examples x+x = x 1. = (x+x).1 2. =(x+x). (x+x ) 3. =x+xx 4. =x+0 5. =x
Continue.. x.x = x 1. x.x +0 2. x.x + x.x 3. x(x+x ) 4. x.1 5. X There are different theorems and their proofs given on page 40 and 41.
Demorgan s Theorems First Theorem A.B A + B Second Theorem A + B A. B A + B = A. B
Demorgan s Theorems Any number of variables X. Y. Z = X + Y + Z X + Y + Z = X. Y. Z Combination of variables ( A + B. C).( A. C + B) = ( A + B. C) + ( A. C + B) = A. ( B. C ) + ( A. C ). B = A. B + A. C + A. B + B. C = Digital A Logic. B Design@CASE + A. C + by Najmus B. C Siraj
Operator Precedence 1. Parentheses 2. NOT 3. AND 4. OR Examples (x+y) ; x y
Boolean Analysis of Logic Circuits Boolean Algebra provides concise way to represent operation of a logic circuit Complete function of a logic circuit can be determined by evaluating the Boolean expression using different input combinations F = (AB+C )D
Boolean Analysis of Logic Circuits C AB + C ( AB + C) D From the expression, the output is a 1 if variable D = 1 ( AB + C) =1 if AB=1 or C=0 Rows in the truth table is 2 n n is the number of variables in the function
Boolean Analysis of Logic Circuits Inputs Output Inputs A B C D F A B C D F 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 1 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 1 0 0 1 0 0 0 1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 0 1 1 1 1 1 Output
Simplification using Boolean Algebra AB + A(B+C) + B(B+C) = AB + AB + AC + BB +BC = AB + AC + B + BC = AB + AC + B = B + AC
Simplified Circuit
Lecture 06
Recap
Today s agenda Duality yprincipalp Complement of a function Minterms and Maxterms Sum of Product and Product of Sum
Duality Principle Every algebraic expression deducible from the postulates of Boolean algebra remains valid if the operator and the identity elements are interchanged 1. x+0=x x.1=x 2. (x+y) = x y xy (x.y) y) = x +y x+y
Example 2.1 x(x +y) = xx +xy = 0+xy = xy x+x y = xx+xy+x x+x y = x(x+y)+x (x+y) = x+y (x+y)(x+y ) = xx+xy +xy+yy = x(1+y +y) = x xy+x z+yz = xy+x z+yz(x+x ) = xy+x z+yzx+yzx = xy(1+z) + x z(1+y) = xy+x z (x+y)(x +z)(y+z) = (x+y)(x +z)
Complement of a function The generalized form of DeMorgan s theorem states that the complement of a function is obtained by interchanging AND and OR operators and complementing each literal Example 2.22
Example 2.2 2 solution
Easy way to fined complement A simpler way to find complement of a function is to take the dual of the function and complement each literal. Examples
Minterms and Maxterms Minterms for two variable are x y, x y, xy, xy. There are eight minterms for 3 variables function. 2 n minterms for n variable. Maxterms for two variable are x+y, x+y,x +y, x +y
X Y Z f1 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1
Example 2.4 (SOP)
Example 2.5(POS) Each term missing one variable So
Conversion between Canonical forms