Lecture 6: Universal Gates

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Logic Gates.
Types of Logic Circuits
Morgan Kaufmann Publishers
Chapter 2 Logic Circuits.
Boolean Algebra and Reduction Techniques
ECE2030 Introduction to Computer Engineering Lecture 9: Combinational Logic, Mixed Logic Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering.
Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
CS 140 Lecture 6: Other Types of Gates Professor CK Cheng 1.
1 Digital Logic
Computer organization at the logic level Some not so famous last words.
Lecture 1: Introduction to Digital Logic Design CK Cheng Thursday 9/26/02.
Faculty of Computer Science © 2006 CMPUT 229 Digital Logic From Switches to Memories.
1 Boolean Algebra & Logic Design. 2 Developed by George Boole in the 1850s Mathematical theory of logic. Shannon was the first to use Boolean Algebra.
1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.
CS 140 Lecture 7 Professor CK Cheng 10/17/02. Combinational Logic  Complete set of gates  Other types of gates 1)XOR 2)NAND / NOR 3)Block Diagram Transfers.
Propositional Calculus Math Foundations of Computer Science.
1 CK Cheng CSE Dept. UC San Diego CSE 140, Lecture 2 Combinational Logic.
Chapter 2: Boolean Algebra and Logic Functions
Lecture 3: Incompletely Specified Functions and K Maps CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
Computer Organization 1 Logic Gates and Adders. Propositions –Venn Diagrams.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /05/2013 Lecture 4: Basics of Logic Design Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Week 6: Gates and Circuits: PART I READING: Chapter 4.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
CSE 140, Lecture 2 Combinational Logic
Circuit Simplification Truth Table  Minimized Logic Gates.
Boolean Algebra and Reduction Techniques
Lecture 7: Sequential Networks CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer Science and Engineering.
Logic Gates. A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment,
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
1 CK Cheng CSE Dept. UC San Diego CSE 140, Lecture 2 Combinational Logic.
Module 7.  In Module 3 we have learned about NAND gate – it is a combination of AND operation followed by NOT operation  Symbol A. B = Y  Logic Gate.
CSE 140: Components and Design Techniques for Digital Systems Lecture 6: Universal Gates CK Cheng Dept. of Computer Science and Engineering University.
CEC 220 Digital Circuit Design SOP and POS forms Friday, January 23 CEC 220 Digital Circuit Design Slide 1 of 17.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
CSE 461. Binary Logic Binary logic consists of binary variables and logical operations. Variables are designated by letters such as A, B, C, x, y, z etc.
Digital Logic. Boolean Algebra to Logic Gates Logic circuits are built from components called logic gates. The logic gates correspond to Boolean operations.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
CSE 140 Lecture 8 Sequential Networks
Lecture 4 Topics Boolean Algebra Huntington’s Postulates Truth Tables
CHAPTER 7 MULTI-LEVEL GATE CIRCUITS / NAND AND NOR GATES
Morgan Kaufmann Publishers
Department of Preparatory Year, Umm Al Qura University
Eng. Mai Z. Alyazji October, 2016
Logic Gates and Boolean Algebra
Chapter 3 Notes – Part II Review Questions
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Lecture 6: Universal Gates
Chapter 2: Boolean Algebra and Logic Functions
Logic Gates and Boolean Algebra
Logic Gates.
DIGITAL LOGIC CIRCUITS
Reading: Hambley Chapters
Fundamentals of Computer Science Part i2
Lecture 6: Universal Gates
CSE 370 – Winter Combinational Logic - 1
Lecture 4 Topics Boolean Algebra Huntington’s Postulates Truth Tables
Week 7: Gates and Circuits: PART II
Logic Gates.
Digital Logic Circuits
CS 140 Lecture 6: Other Types of Gates
Design of Digital Circuits Lab 1 Supplement: Drawing Basic Circuits
BOOLEAN ALGEBRA.
Lecture 3: Incompletely Specified Functions and K Maps
Presentation transcript:

Lecture 6: Universal Gates CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer Science and Engineering University of California, San Diego

Combinational Logic: Other Types of Gates Universal Set of Gates Other Types of Gates XOR NAND / NOR Block Diagram Transfers Here we finish up our discussion on combination logic. We first will talk about complete set of gates, then move on to talk about other types of gates such as XOR gates and NAND / NOR gates. We will also talk about block diagram transfers, which is like converting a circuit into an equivalent circuit (ie it has the same exact function), but in the process changing and even reducing the number of gates.

Universal Set of Gates: Motivation AND, OR, NOT: Logic gates related to reasoning from Aristotle (384-322BCE) NAND, NOR: Inverted AND, Inverted OR gates. VLSI technologies. All gates are inverted. Multiplexer + input table: FPGA technology. Table based logic for programmability. XOR: Parity check In the future, we may have new sets of gates due to new technologies. Given a set of gates, can this set of gates cover all possible switching functions?

Universal Set Examples {AND, OR, NOT} {AND, NOT} {OR, NOT} Universal Set: A set of gates such that every switching function can be implemented with the gates in this set. Examples {AND, OR, NOT} {AND, NOT} {OR, NOT} A universal set simply means that some set of gates can implement any switching function. For example, {AND OR NOR} is a universal set because you can do any possible switching (0 or 1) function with it. {AND NOR} is also universal because you can implement OR with just AND, NOT. Since you can do that, you can implement any switching function.

Universal Set Universal set is a powerful concept to identify the coverage of a set of gates afforded by a given technology. If the set of gates can implement AND, OR, and NOT gates, the set is universal.

Universal Set Examples {AND, OR, NOT} Universal Set: A set of gates such that every Boolean function can be implemented with the gates in this set. Examples {AND, OR, NOT} {AND, NOT} OR can be implemented with AND & NOT gates a+b = (a’b’)’ {OR, NOT} AND can be implemented with OR & NOT gates ab = (a’+b’)’ {XOR} is not universal {XOR, AND} is universal A universal set simply means that some set of gates can implement any switching function. For example, {AND OR NOR} is a universal set because you can do any possible switching (0 or 1) function with it. {AND NOR} is also universal because you can implement OR with just AND, NOT. Since you can do that, you can implement any switching function.

iClicker Is the set {AND, OR} (but no NOT gate) universal? Yes No

iClicker Is the set {f(x,y)=xy’} universal? Yes No

X ⊕ 1 = X*1’ + X’*1 = X’ if constant “1” is available. {NAND, NOR} {NOR} {XOR, AND} X ⊕ 1 = X*1’ + X’*1 = X’ if constant “1” is available. We see that a set consisting of just the NAND and NOR gates forms a universal set. We can implement a NOT gate by using a NAND gate and we can form an AND and OR gate by simply negating the NAND and NOR gates. 1

Other Types of Gates: Properties and Usage X Y XOR X ⊕ Y = XY’ + X’Y It is a parity function (examples) Useful for testing because the flipping of a single input changes the output. XY’ X’Y id x y x ⊕ y 1 2 3 x=0 x=1 y=0 1 y=1 A XOR gate is a gate that is 1 only when one and only one of the two inputs is also 1. If both are 0 or both are 1, then the XOR gate will output a 0 also.

Other Types of Gates: Properties and Usage X Y XOR X ⊕ Y = XY’ + X’Y XY’ X’Y Commutative X ⊕ Y = Y ⊕ X Associative (X ⊕ Y) ⊕ Z = X ⊕ (Y ⊕ Z) 1 ⊕ X = X’, 0 ⊕X = 0X’+ 0’X = X X ⊕ X = 0, X⊕X’ = 1 A XOR gate is a gate that is 1 only when one and only one of the two inputs is also 1. If both are 0 or both are 1, then the XOR gate will output a 0 also.

e) If ab = 0, then a ⊕ b = a + b Proof: If ab = 0, then a = a (b+b’) = ab+ab’ = ab’ b = b (a + a’) = ba + ba’ = a’b a+b = ab’ + a’b = a ⊕ b f) f(x,y)=x ⊕ xy’⊕ x’y ⊕ (x + y) ⊕ x= ? (Priority of operations: AND, ⊕, OR) Hint: We apply Shannon’s Expansion.

Shannon’s Expansion (for switching functions) Formula: f (x,Y) = x * f (1, Y) + x’ * f (0, Y) Proof by enumeration: If x = 1, f (x,Y) = f (1, Y) : 1*f (1, Y) + 1’*f(0,Y) = f (1, Y) If x = 0, f(x,Y) = f (0, Y) : 0*f (1, Y) + 0’*f(0,Y) = f(0, Y) Shannon’s Expression is actually very useful equation. It simply says a function can be decomposed by restricting X. Thus we have two cases, one when X is 0 and one when X is 1.

Back to our problem… Simplify the function f(X,Y) = X⊕XY’⊕X’Y⊕(X+Y)⊕X Case X = 1: f (1, Y) = 1 ⊕ Y’⊕ 0 ⊕ 1 ⊕ 1 = Y Case X = 0: f (0, Y) = 0 ⊕ 0 ⊕ Y ⊕ Y ⊕ 0 = 0 Thus, using Shannon’s expansion, we have f (X, Y) = Xf(1,Y)+X’f(0,Y)= XY Using Shannon’s Expression, we can easily solve for the answer to our problem. First we put parentheses around terms with higher precedence (like AND terms), and then from there we apply Shannon’s Expression to derive the two cares of when X is 1 and X is 0. Because we see that when X is 1, the function is Y, and when X is 0, the function is 0, we realize that the function is simply XY.

XOR gates iClicker: a+(b⊕c) = (a+b)⊕(a+c)? Yes No

Let a | b = (ab)’ (a | b) | c ≠ a | (b | c) 2) NAND, NOR gates NAND, NOR gates are not associative Let a | b = (ab)’ (a | b) | c ≠ a | (b | c)

3) Block Diagram Transformation a) Reduce # of inputs.  

b. DeMorgan’s Law  (a+b)’ = a’b’  (ab)’ = a’+b’ DeMorgan’s Law implies that if you are given a NOR gate, you can convert that to an AND gate with two inverted inputs. Same with a NAND gate, you can replace a NAND gate with a OR gate with two inverted inputs.  (ab)’ = a’+b’

c. Sum of Products (Using only NAND gates)   Sum of Products (We create many bubbles with NOR gates)   As we can see, there is a difference in how we transform our circuit. Comparing the two above, it is clear that using the NAND gates is much preferable to using the NOR gates as there are much less gates in the NAND version.

d. Product of Sums (NOR gates only)   Here we transform a product of sums circuit (two OR gates followed by an AND gate) into one with just NOR gates. We see that in this case, we don’t have a lot of gates like we did in the Sum of Products case. We will create many bubbles with NAND gates.

NAND, NOR gates Remark: Two level NAND gates: Sum of Products Two level NOR gates: Product of Sums

Part II. Sequential Networks Memory / Timesteps Clock A combinational logic cannot have some sort of feedback loop where the output of a logic is also the input of it. A sequential network on the other hand can have this feature. Flip flops Specification Implementation

Reading [Harris] Chapter 3, 3.1, 3.2