Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
9/19/2011 Multiplexer (MUX) Lecture 2 • A multiplexer is a data selector. • A 2‐to‐1 multiplexer can select one of the 2 input signals and connect it to the output signals and connect it to the output. • Multiplexer and demultiplexer • Decoder • Comparator • Boolean algebra • Combinational circuits • Karnaugh diagram TNGE11 Digitalteknik, Lecture 2 1 4‐to‐1 Multiplexer (MUX 4‐1) TNGE11 Digitalteknik, Lecture 2 TNGE11 Digitalteknik, Lecture 2 2 Implement a MUX 4‐1 with 3 MUX 2‐1 3 TNGE11 Digitalteknik, Lecture 2 4 1 9/19/2011 MUX (2‐1)x4 1‐to‐2 Demultiplexer (DMUX 1‐2) • Multiplexer for two 4‐bit channels TNGE11 Digitalteknik, Lecture 2 A demultiplexer is a data distributor. 5 TNGE11 Digitalteknik, Lecture 2 6 Decoder DMUX 1‐4 • A 2‐to‐4 decoder (Notice that it is called Avkodare 1‐4 in the book Digitalakresar.) • One‐hot code: Only 1 bit is 1 and the other bits are 0. TNGE11 Digitalteknik, Lecture 2 7 TNGE11 Digitalteknik, Lecture 2 8 2 9/19/2011 A 3‐to‐8 decoder A 2‐to‐4 decoder with an enable input A 3‐to‐8 decoder is used to generate enable signals. TNGE11 Digitalteknik, Lecture 2 9 TNGE11 Digitalteknik, Lecture 2 10 An example A 3‐to‐8 decoder Address Output (one‐hot code) 1000 (8) 0001 1001 (9) 0010 1010 (10) 1010 (10) 0100 0100 1011 (11) 1000 TNGE11 Digitalteknik, Lecture 2 11 TNGE11 Digitalteknik, Lecture 2 12 3 9/19/2011 Boolean algebra Comparator a = b if and only if a1 = b1 and a0 = b0 TNGE11 Digitalteknik, Lecture 2 13 Laws of Boolean algebra for one variable TNGE11 Digitalteknik, Lecture 2 TNGE11 Digitalteknik, Lecture 2 14 Laws for several variables 15 TNGE11 Digitalteknik, Lecture 2 16 4 9/19/2011 Absorption laws Prove of L15 TNGE11 Digitalteknik, Lecture 2 17 An example TNGE11 Digitalteknik, Lecture 2 TNGE11 Digitalteknik, Lecture 2 18 De Morgan’s laws 19 TNGE11 Digitalteknik, Lecture 2 20 5 9/19/2011 De Morgan’s law illustrated with gates Consensus laws TNGE11 Digitalteknik, Lecture 2 TNGE11 Digitalteknik, Lecture 2 21 Exclusive OR (XOR) 22 Express XOR in Boolean Algebra operations • Laws for constants • Laws for one variable • Laws for several variables TNGE11 Digitalteknik, Lecture 2 23 TNGE11 Digitalteknik, Lecture 2 24 6 9/19/2011 Definition and model of combinational circuits • Formal definition Boolean functions • n‐variable function • Total number of combinations for n variables: • Total number of functions for n variables: • Model TNGE11 Digitalteknik, Lecture 2 25 TNGE11 Digitalteknik, Lecture 2 26 TNGE11 Digitalteknik, Lecture 2 28 Total number of Boolean functions for n variables TNGE11 Digitalteknik, Lecture 2 27 7 9/19/2011 Combinational circuits for SP‐form and PS‐form SP‐form and PS‐form • Minterm expression: Sum‐of‐product form (SP‐form) • Maxterm expression: Product‐of‐sum form (PS‐form) TNGE11 Digitalteknik, Lecture 2 29 Simplify Boolean functions TNGE11 Digitalteknik, Lecture 2 30 Karnaugh diagram • The numbers representing variable combinations are ordered in Gray code, so that only one variable changes between any pair of adjacent cells. • The cells on the opposite borders are adjacent. (The diagram can be wrapped around.) TNGE11 Digitalteknik, Lecture 2 31 TNGE11 Digitalteknik, Lecture 2 32 8 9/19/2011 Using Karnaugh diagram to simplify Boolean functions TNGE11 Digitalteknik, Lecture 2 Rules for writing a logic expression 33 Prime implicant TNGE11 Digitalteknik, Lecture 2 TNGE11 Digitalteknik, Lecture 2 34 Procedure for finding the minimal SP‐form 35 TNGE11 Digitalteknik, Lecture 2 36 9 9/19/2011 Example Notice that the decimal number at the upper‐right corner of y each cell is the decimal value of the binary code for the cell. f = x4 x3 x2 + x4´x2´x1 x0´ + x4 x3´x1´x0´ + x3 x2´x1 + x3´x2x1´x0´ TNGE11 Digitalteknik, Lecture 2 37 NAND gate, NOR gate 38 Karnaugh diagram with “don’t care” cells Invert the logic expressions for the circuits with AND & OR gates twice to derive the logic expressions for the circuits with NAND or NOR gates by using De Morgan’s laws. TNGE11 Digitalteknik, Lecture 2 TNGE11 Digitalteknik, Lecture 2 The function does not specify the outputs of some input combinations since these combinations will never appear. 39 TNGE11 Digitalteknik, Lecture 2 40 10