CS 140 Lecture 6: Other Types of Gates

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Logic Gates.
Lecture 6 More Logic Functions: NAND, NOR, XOR and XNOR
Types of Logic Circuits
Morgan Kaufmann Publishers
Chapter 2 Logic Circuits.
Boolean rules for simplification Dr. Ahmed Telba.
Logic Gate Level Part 2. Constructing Boolean expression from truth table First method: write nonparenthesized OR of ANDs Each AND is a 1 in the result.
CS 151 Digital Systems Design Lecture 7 More Logic Functions: NAND, NOR, XOR.
Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science.
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.
CS 140L Lecture 1 Professor CK Cheng 3/31/02. CMOS Logic (3.2 – 3.6) Complementary Metal-Oxide Semiconductor.
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.
Chapter 2: Boolean Algebra and Logic Functions
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)
Lecture 17: Digital Design Today’s topic –Intro to Boolean functions Reminders –HW 4 due Wednesday 10/8/2014 (extended) –HW 5 due Wednesday 10/15/2014.
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.
Circuit Simplification Truth Table  Minimized Logic Gates.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Logic Gates. AND gate Produces an output only if both inputs are on Input AInput BOutput (Q) Q=
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
C.S. Choy21 BOOLEAN ALGEGRA The Mathematics of logic Boolean variables have only two possible values (binary) Operators:. Product+ SumComplement A.B A+B.
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.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Hoda Roodaki Boolean Algebra Hoda Roodaki
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
De Morgan’s Theorem,.
Lecture 6: Universal Gates
Chapter 2: Boolean Algebra and Logic Functions
Digital Technology.
מבנה מחשב תרגול 3.
Logic Gates and Boolean Algebra
Logic Gates.
Reading: Hambley Chapters
Lecture 6: Universal Gates
CS/COE0447 Computer Organization & Assembly Language
Circuits, Truth Tables & Boolean Algebra
CSE 370 – Winter Combinational Logic - 1
Lecture 4 Topics Boolean Algebra Huntington’s Postulates Truth Tables
Week 7: Gates and Circuits: PART II
Discrete Mathematics CS 2610
Logic Gates.
Digital Logic.
Boolean Algebra.
Lecture 6: Universal Gates
Circuits, Truth Tables & Boolean Algebra
Design of Digital Circuits Lab 1 Supplement: Drawing Basic Circuits
Digital Logic Design Basics Combinational Circuits Sequential Circuits.
Presentation transcript:

CS 140 Lecture 6: Other Types of Gates Professor CK Cheng

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 Ex: {AND, OR, NOT} {AND, NOT} {OR, NOT} Universal Set: A set of gates such that every switching function can be implemented with gates in this set. Ex: {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 Ex: {AND, OR, NOT} Universal Set: A set of gates such that every Boolean function can be implemented with gates in this set. Ex: {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

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

Universal Set Remark: Universal set is a powerful concept to identify the coverage of a set of gates afforded by a given technology.

Other Types of Gates X Y 1) 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) X XY’ X’Y (X + Y) X = ?? To answer, 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… X XY’ X’Y (X + Y) X = ? X (XY’) (X’Y) (X + Y) X = f (X, Y) If X = 1, f (1, Y) = 1 Y’ 0 1 1 = Y If X = 0, f (0, Y) = 0 0 Y Y 0 = 0 Thus, f (X, 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 (Using only 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.

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