Chapter 3 Digital Logic Analog Systems Digital Vs. Analog Two
Total Page:16
File Type:pdf, Size:1020Kb
Digital Logic Definition: Chapter 3 digit, n. any of the Arabic figures of 0 through 9. digital, adj. involving using digits to Boolean Algebra and Combinational represent discretely all variables occurring Networks in a given problem. logic, n. a particular method of reasoning or argumentation. J. C. Huang, 2003 Digital Logic Design 1 Analog Systems Digital vs. Analog Definition: Digital solution to a problem is analog, adj. that solve a given problem by advantageous in that it allows us to build using physical analogies, such as electric more reliable components and implement voltages or shaft rotations (which are more sophisticated functions. quantitatively continuous), of the numerical variables occurring in the problem. J. C. Huang, 2003 Digital Logic Design 2 J. C. Huang, 2003 Digital Logic Design 3 Two main types of logic circuit: General form of a combinational circuit: • Combinational (without memory) - chapters 2-6 x1 • Sequential (with memory) - chapters 7 and 8 f1(x1, x2, … xm) x2 f2(x1, x2, … xm) xm fn(x1, x2, … xm) J. C. Huang, 2003 Digital Logic Design 4 J. C. Huang, 2003 Digital Logic Design 5 1 For example, the behavior Truth table of the combinational circuit x to the right can be described f(x, y) • The behavior of a combinational circuit can by the truth table shown y below: always be specified by using a truth table. x y f(x, y) A truth table exhaustively 0 0 f(0, 0) lists all possible input-output 0 1 f(0, 1) pairs. 1 0 f(1, 0) 1 1 f(1, 1) J. C. Huang, 2003 Digital Logic Design 6 J. C. Huang, 2003 Digital Logic Design 7 Example of a truth table Three Basic Logic Devices x y f(x, y) 0 0 0 x x x NOT y OR z AND z 0 1 1 y y 1 0 1 yy OR x NOT x 01AND 0 1 1 1 0 0 1 00 1 00 0 xx 1 0 11 1 10 1 J. C. Huang, 2003 Digital Logic Design 8 J. C. Huang, 2003 Digital Logic Design 9 Logic symbols for the basic gates x y f(x, y) x 0 0 1 f(x, y) 0 1 1 x x x•y x+y y 1 0 0 y y 1 1 1 AND gate OR gate The intended function of this combinational circuit can be directly described by the truth table on the right, which can be represented by the Boolean function below: xx’ f(x, y) = x’y’ + x’y + xy NOT gate which can be realized by the logic circuit shown in the next slide. J. C. Huang, 2003 Digital Logic Design 10 J. C. Huang, 2003 Digital Logic Design 11 2 x xy y Algebra (Mathematical System) x’y f An algebra (or a mathematical system) consists of S = <S, o , o , …, o , r , r , …, r , c , c , …, c > x’y’ 1 2 k 1 2 m 1 2 n Realization of f(x, y) = x’y’ + x’y + xy where oi's are operations defined on S, ri's are relations defined among elements of S, and ci's are constants, some elements of S having some special significance. x Furthermore, it satisfies a set of axioms or postulates y f that governs its behavior. Minimal realization of f(x, y) J. C. Huang, 2003 Digital Logic Design 12 J. C. Huang, 2003 Digital Logic Design 13 Boolean Algebras Boolean Algebras (continued) A Boolean algebra is a mathematical system: 2a. Existence of identity: there exists an element in B, denoted by 0, such that x+0=x for any x ∈ B. • B = <B, +, , =, 0, 1> 2b. Existence of identity: there exists an element in B, denoted by 1, such that x•1=x for any x ∈ B. that satisfies the following postulates: 3a. Commutativity: for any x, y ∈ B, x+y = y+x. ∈ ∈ 1a. Closure: for any x, y B, x+y B. 3b. Commutativity: for any x, y ∈ B, x•y = y•x. 1b. Closure: for any x, y ∈ B, x•y ∈ B. J. C. Huang, 2003 Digital Logic Design 14 J. C. Huang, 2003 Digital Logic Design 15 Boolean Algebras (continued) Boolean Algebras (continued) 4a. Distributive law: for any x, y, z ∈ B, 6. There exists at least two elements in B x•(y+z) = (x•y)+(x•z). These are known as the Huntington postulates. 4b. Distributive law: for any x, y, z ∈ B, x+(y•z) = (x+y)•(x+z). 5. For any element x ∈ B there exists an element x' ∈ B such that (a) x+x'=1 and (b) x•x'=0. J. C. Huang, 2003 Digital Logic Design 16 J. C. Huang, 2003 Digital Logic Design 17 3 Huntington postulates Theorems 1. (a) x+y ∈ B (b) x•y ∈ B Thm 1: The element x’ in a Boolean algebra is 2. (a) x+0 = 0+x = x (b) x•1 = 1•x = x uniquely determined by x. 3. (a) x+y = y+x (b) x•y = y•x Thm 2: • 4. (a) x+(y•z) = (x+y)•(x+z) (a) x + 1 = 1 (b) x 0 = 0 (b) x•(y+z) = x•y+x•z Thm 3: (involution) 5. (a) x+x' = 1 (b) x•x' = 0 (a) 0’ = 1 (b) 1’ = 0 6. |B| ≥ 2 J. C. Huang, 2003 Digital Logic Design 18 J. C. Huang, 2003 Digital Logic Design 19 Theorems (continued) Theorems (continued) Thm 4: (both operations are idempotent) Thm 7: (a) x + x = x (b) x • x = x (a) x + x’y = x + y (b) x(x’ + y) = xy Thm 5: (involution) Thm 8: (associativity) (x')' = x (a) (x + y) + z = x + (y + z) Thm 6: (absorption) (b) (x • y) • z = x • (y • z) • (a) x + xy = x (b) x (x+y) = x Thm 9: (De Morgan's Law) (a) (x+y)'=x'•y' (b) (x•y)'=x'+y' J. C. Huang, 2003 Digital Logic Design 20 J. C. Huang, 2003 Digital Logic Design 21 Theorems (continued) Dual Thm 10: Given an expression in Boolean algebra, its B = 〈 {0, 1}, +, •, = 〉, where the two dual is obtained by replacing every "+" operations are defined as shown below is a operator with "•" operator, and vice versa, Boolean algrbra. and by replacing every 0 with 1, and vice x+y y x•y y versa. +01 • 01 001 000 x x 111 101 J. C. Huang, 2003 Digital Logic Design 22 J. C. Huang, 2003 Digital Logic Design 23 4 Principle of duality Perfect induction The dual of any true statement in Boolean • Perfect induction is proof by exhaustion in algebra is also a true statement. which all possibilities are considered. J. C. Huang, 2003 Digital Logic Design 24 J. C. Huang, 2003 Digital Logic Design 25 The concept of a function Truth table and function • It is a one-to-one or many-to-one mapping. • A truth table, therefore, describes a • The preceding truth table describes a function. mapping of a set of pairs of 0’s and 1’s into • A truth table can be represented by using a a set consisting of 0 and 1, viz., Boolean expression, i.e., an expression → → <0, 0> 0 <0, 1> 1 written in terms of the language of Boolean <1, 0> → 1 <1, 1> → 0 algebra. • That mapping is a function because it is many-to-one. J. C. Huang, 2003 Digital Logic Design 26 J. C. Huang, 2003 Digital Logic Design 27 Truth table and Boolean function Literals and product/sum terms • An output of a combinational circuit, which •A literal is defined as each occurrence of can be exhaustively listed on a column in either a complemented or uncomplemented the truth table, can also be described by a variable in a Boolean expression. Boolean expression. •A product term is a literal or a product (i.e., • The Boolean expression can be constructed AND together, or conjunction) of literals. as explained below. •A sum term is a literal or a sum (i.e., OR together, or disjunction) of literals. J. C. Huang, 2003 Digital Logic Design 28 J. C. Huang, 2003 Digital Logic Design 29 5 Minterms of 2 variables Minterms minterm that is x y m-notation • A minterm is a product term in which all evaluated to 1 variables occur exactly once, either 0 0 x’y’ m0 complemented or uncomplemented. • A minterm has the property that it is 0 1 x’y m1 evaluated to 1 on one and only one row of 1 0 xy’ m the truth table. 2 1 1 xy m3 J. C. Huang, 2003 Digital Logic Design 30 J. C. Huang, 2003 Digital Logic Design 31 Minterms of 3 variables minterm that is → x y z m-notation Truth table Boolean expression evaluated to 1 0 0 0 x’y’z’ m 0 • The function described by a truth table can 0 0 1 x’y’z m1 also be described by a sum (i.e., OR 0 1 0 x’yz’ m2 together, or disjunction) of minterms. 0 1 1 x’yz m 3 • The minterms involved are those, and only 1 0 0 xy’z’ m4 those, associated with the rows on which 1 0 1 xy’z m5 the minterm is evaluated to 1. 1 1 0 xyz’ m6 1 1 1 xyz m7 J. C. Huang, 2003 Digital Logic Design 32 J. C. Huang, 2003 Digital Logic Design 33 Thus the following function can be described as f(x, y, z) = x’yz’ + xy’z + xyz f(x, y) = x’y’ + xy’ x y z f(x, y z) 0 0 0 0 x y f(x, y) 0 0 1 0 0 0 1 0 1 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 J.