L14: Boolean Logic and Basic Gates

Slides:



Advertisements
Similar presentations
Digital Logic Design Gate-Level Minimization
Advertisements

Digital Electronics Lecture 2 Logic Gates. Lecture 2 outline Announcement:
BOOLEAN ALGEBRA. A Mathematical notation used to represent the function of the Digital circuit. A notation that allows variables & constants to have only.
Presented by: Ms. Maria Estrellita D. Hechanova, ECE
ECE 238L Computer Logic Design Spring 2010
Chapter 2 Logic Circuits.
Lecture 20, Slide 1EECS40, Fall 2004Prof. White Lecture #20 ANNOUNCEMENT Midterm 2 Thursday Nov. 18, 12:40 – 2:00 pm A-L initials in F295 Haas Business.
Boolean Algebra and Logic Gate
Relationship Between Basic Operation of Boolean and Basic Logic Gate The basic construction of a logical circuit is gates Gate is an electronic circuit.
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
Lecture 14 Today we will Learn how to implement mathematical logical functions using logic gate circuitry, using Sum-of-products formulation NAND-NAND.
10/25/2004EE 42 fall 2004 lecture 231 Lecture #23 Synthesis Next week: Converting gates into circuits.
W. G. Oldham EECS 40 Fall 2001 Lecture 2 Copyright Regents of University of California The CMOS Inverter: Current Flow during Switching V IN V OUT V DD.
ENGG 1203 Tutorial Combinational Logic (I) 1 Feb Learning Objectives
Prof. Kavita Bala and Prof. Hakim Weatherspoon CS 3410, Spring 2014 Computer Science Cornell University See: P&H Appendix B.2 and B.3 (Also, see B.0 and.
Gates and Logic: From switches to Transistors, Logic Gates and Logic Circuits Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University.
Digital Logic Chapter 4 Presented by Prof Tim Johnson
We know binary We know how to add and subtract in binary –Same as in decimal Next up: learn how apply this knowledge Boolean and Binary Inputs.
Chapter 3.5 Logic Circuits. How does Boolean algebra relate to computer circuits? Data is stored and manipulated in a computer as a binary number. Individual.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary.
Digital Electronics. Introduction to Number Systems & Codes Digital & Analog systems, Numerical representation, Digital number systems, Binary to Decimal.
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
Digital Logic. 4 Why is 32-bit or 64-bit significant in terms of speed, efficiency? 4 Difference between OR and XOR 4 What is a mux for? PLA 4 Two kinds.
ECE 331 – Digital System Design
Apr. 3, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 3: Review of Digital Circuits and Logic Design Jeremy R. Johnson Mon. Apr.
Combinational Logic 1.
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
LOGIC GATES & BOOLEAN ALGEBRA
Unit 1 Minimization Techniques and Logic Gates. Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
ECE 301 – Digital Electronics Basic Logic Operations, Boolean Expressions, and Boolean Algebra (Lecture #3)
Brief Introduction to Boolean Algebra We can use transistors to build AND, OR, NAND, NOR, and Invertors Manufacturing is simplified with NAND/NOR NAND/NOR.
CSE 311 Foundations of Computing I
Announcements Assignment 6 due tomorrow No Assignment 7 yet.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Logic Simplification-Using Boolean Laws Logic Design Laboratory EE 2121 Lectures By Manesh T EE2121-In Charge
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
Dr. ClincyLecture Slide 1 CS6020- Chapter 3 (3A and ) Dr. Clincy Professor of CS First Exam - Tuesday, September 6th Coverage: All subjects up to.
Hoda Roodaki Boolean Algebra Hoda Roodaki
Digital Technology.
Logic Gates and Boolean Algebra
CHAPTER 2 Boolean Algebra
Digital Logic.
Princess Sumaya University
CHAPTER 3 SETS AND BOOLEAN ALGEBRA
ECE 331 – Digital System Design
CHAPTER 2 Boolean Algebra
Computer Science 210 Computer Organization
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
CSE 311 Foundations of Computing I
BASIC & COMBINATIONAL LOGIC CIRCUIT
CSE 370 – Winter Combinational Logic - 1
Dr. Clincy Professor of CS
Reading: Hambley Ch. 7 through 7.5
ECE 120 Midterm 2 HKN Review Session
Boolean Algebra.
Chapter 2 Introduction to Logic Circuits
Digital Fundamentals Floyd Chapter 5 Tenth Edition
ECB2212-Digital Electronics Boolean algebra
Dr. Clincy Professor of CS
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
Computer Architecture
Reading: Hambley Ch. 7 through 7.5
ECE 120 Midterm 2 HKN Review Session.
Boolean Algebra S.SADHISH PRABHU.
Presentation transcript:

L14: Boolean Logic and Basic Gates Quick announcements Deadline for HW3 extended to 11/14/2005 Grading formula in “grade so far” does not include extra credit. Used for grade promotion. Grades histogram. AVG(grades so far = 33.04) L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates LECTURE 14: Transistors to logic gates Boolean Logic Basic logic gates Introduction to switching logic Turning logic circuits into switching expressions Simplifying switching expressions, Karnaugh Maps (no time) L14: Boolean Logic and Basic Gates Fall 2005

From Transistors to Computer Chips L14: Boolean Logic and Basic Gates Fall 2005

Transistors - Where it all starts Transistors are physical structures Bipolar Junction Transistors Field Effect Transistors For digital logic, you can think of a transistor as a switch that has two states: “ON” and “OFF” Wiring transistors together, we can create logic functions and storage elements L14: Boolean Logic and Basic Gates Fall 2005

Example: MOSFET (Metal Oxide Semiconductor Field Effect Transistor) Source Gate Drain Two different types of MOSFET p channel n channel L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates Transistor as a Switch Drain Drain Gate Gate Source Source The voltage on the gate decides if the switch will be open (i.e., “OFF”) or closed (i.e., “ON”) L14: Boolean Logic and Basic Gates Fall 2005

CMOS - Complementary Metal Oxide Semiconductors Today, CMOS is the most common technology used for manufacturing digital computer chips Combines p-channel and n-channel MOSFETS High levels of integration are possible Low power requirements L14: Boolean Logic and Basic Gates Fall 2005

when Gate voltage is high, when Gate voltage is low, MOSFETs n-Channel p-Channel Source Drain Gate Gate Source Drain Designed so that when Gate voltage is high, switch is “ON” Designed so that when Gate voltage is low, switch is “ON” L14: Boolean Logic and Basic Gates Fall 2005

Transistors and Logic Gates Transistors can be connected together with wires Connect transistors to create simple, logical functions - these functions are called logic gates In modern computer chips, the transistors and wires are very, very small L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates CMOS Inverter Vdd = “High” Input Output Input Output Low High High Low Ground = “Low” = 0V L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates NOT Logic Gate Input A Output Input A Output 1 1 The NOT logic gate is an inverter Logical function: A’ or A L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates CMOS NAND Logic Gate Vdd = “High” Output Input A Input A Input B Output Input B 1 1 1 1 1 1 1 L14: Boolean Logic and Basic Gates Ground = “Low” = 0V Fall 2005

L14: Boolean Logic and Basic Gates NAND Logic Gate Input A Input B Output Input A Output 1 1 1 Input B 1 1 1 1 Logical function “NAND” AB alternatively (AB)’ L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates AND Logic Gate Input A Input B Output Input A Output 1 Input B 1 1 1 1 Logical function “AND” AB L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates OR Logic Gate Input A Input B Output Input A Output 1 1 Input B 1 1 1 1 1 Logical function “OR” A + B L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates NOR Logic Gate Input A Input B Output Input A Output 1 1 Input B 1 1 1 Logical function “NOT OR” (A + B) alternatively (A + B)’ L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates XOR Logic Gate Input A Input B Output Input A Output 1 1 Input B 1 1 1 1 Logical function “Exclusive OR” A B + A B alternatively A’B + AB’ L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates Truth Tables Truth Tables are used to define the output for any given combination of inputs Input A Input B Input A Input B Input C Output Output 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 L14: Boolean Logic and Basic Gates Fall 2005

Using Truth Tables to Create Digital Logic Functions Input x Input y Input z Output 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates A Generalized Procedure for Creating a Digital Logic Design from a Truth Table Canonical Sum of Products form Create an input line for each input variable, and branch off another line with a NOT gate to form the complement of the variable. You will need as many AND gates as there are “1”s in the truth table. The inputs to each AND gate are the input variables or their complements - as indicated by the truth table entries. For example if x=0, y=1, and z=0 and OUTPUT=1, you will need x’ , y, and z’ as inputs into one of the AND gates You will need one OR gate. All of the outputs of the AND gates will go into the OR gate. The output of the OR gate is the output function for the circuit L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates A Generalized Procedure for Creating a Digital Logic Design from a Truth Table Canonical Product of Sums form Create an input line for each input variable, and branch off another line with a NOT gate to form the complement of the variable. You will need as many OR gates as there are “0”s in the truth table. The inputs to each OR gate are the input variables or their complements - as indicated by the truth table entries. For example if x=0, y=0, and z=1 and OUTPUT=0, you will need x , y, and z’ as inputs into one of the OR gates You will need one AND gate. All of the outputs of the OR gates will go into the AND gate. The output of the AND gate is the output function for the circuit L14: Boolean Logic and Basic Gates Fall 2005

Canonical Sum of Products Using sum of products is one way to get a correct circuit design from a truth table Approach doesn’t always give you the most efficient circuit design! L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates Boolean Algebra George Boole, 19th Century mathematician Developed a mathematical system (algebra) involving logic later known as “Boolean Algebra” Primitive functions: AND, OR and NOT The power of BA is there’s a one-to-one correspondence between circuits made up of AND, OR and NOT gates and equations in BA + means OR,• means AND, x means NOT L14: Boolean Logic and Basic Gates Fall 2005

Switching Algebra Identities Identity Law 1 A = A 0 + A = A Null Law 0 A = 0 1 + A = 1 Idempotent Law AA = A A + A = A Inverse Law AA = 0 A + A = 1 L14: Boolean Logic and Basic Gates Fall 2005

More Switching Algebra Identities Commutative Law AB = BA A + B = B + A Associative Law (AB)C = A(BC) (A + B) + C = A + (B + C) Absorption Law A(A + B) = A A + AB = A Distributive Law A + BC = (A + B)(A + C) A(B + C) = AB + AC L14: Boolean Logic and Basic Gates Fall 2005

One Other Theorem: Involution A = A (A’)’ = A L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates DeMorgan’s Law A B = A + B alternatively (AB)’ = A’ + B’ A + B = A B alternatively (A + B)’ = A’ B’ Very useful for simplifying functions! L14: Boolean Logic and Basic Gates Fall 2005

Turning a Switching Expression into A Digital Logic Circuit The expression has the directions “and’s” turn into “and” gates; “or’s” turn into “or” gate, complements can be “not” gates…. Example: xy + z’ = output x y output z L14: Boolean Logic and Basic Gates Fall 2005

Working with Switching Algebra Quickie Quiz 1 (Draw this circuit) f (A,B,C) = A’ + B’ + A’ B C A B C A’ B’ A’ B C F(A,B,C) L14: Boolean Logic and Basic Gates Fall 2005

Working with Switching Algebra Complicated functions can be simplified using Boolean Algebra L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates Another Example Input A Output Input B What’s the logic function? ((A + B’)’ B’)’ Simplify using DeMorgan’s Law and identities = (A + B’) + B = A + (B’ + B) = A + 1 = 1 L14: Boolean Logic and Basic Gates Fall 2005

Working with Switching Algebra QUICKIE QUIZ (Simplify this function) f (w,x,y,z) = x y + w’ x y z’ + x’ y = y (x + x’ + w’ x z’) = y ( 1) = y L14: Boolean Logic and Basic Gates Fall 2005

Simplified solutions aren’t always unique f(x,y,z) = x’ y’ z’ + x’ y z’ + x’ y z + x y’ z’ + x y’ z + x y z = x’ z’ + x y’ + y z = x’ y + y’ z’ + x z = x’ z’ + y’ z’ + y z + x z L14: Boolean Logic and Basic Gates Fall 2005

Karnaugh Maps A Tool for Simplifying Logic Functions x y 0 0 0 1 1 1 1 0 z 1 Karnaugh map for three variables – a truth table turned on its side L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates Karnaugh Maps Karnaugh maps are tools to help you visually/graphically group the “1s” in a truth table to develop simplified expressions From the logic expression, you can develop a logic- gate-level design implementing the function L14: Boolean Logic and Basic Gates Fall 2005

Representing Functions Using a Karnaugh Map x y 0 0 0 1 1 1 1 0 z 1 L14: Boolean Logic and Basic Gates Fall 2005

Karnaugh Map Guidelines (1 of 3) Prepare the map using the truth table inputs Each “1” on the Karnaugh map represents a min-term for a “sum of products” expression of the truth table’s function You can simplify the logic expression by combining the product terms (the “min terms”) that are grouped on the Karnaugh map Groups of two, four, eight, (any power of two) “1” ‘s on the map can be used to develop a simpler expression of fewer variables L14: Boolean Logic and Basic Gates Fall 2005

Karnaugh Map Guidelines (2 of 3) Groups can “wrap around” the sides of the Karnaugh map Top and bottom rows Right-most and left-most columns Determine which variables can be eliminated from the min-terms using the row and column entries of the Karnaugh map Any variable that appears as both a “1” and a “0” in the grouping can be eliminated from the product term For a complete expression, you need to have expressions for every “1” on the Karnaugh map and combine the terms in a “sum of products” expression L14: Boolean Logic and Basic Gates Fall 2005

Karnaugh Map Guidelines (3 of 3) You can have a “1” included in more than one simplified expression Redundancy is okay if you end up with the same or fewer terms in your sum of products expression Combine the simplified expressions into a sum of products form Translate the sum of products form into a logic gate design L14: Boolean Logic and Basic Gates Fall 2005

L14: Boolean Logic and Basic Gates Another Example Input x Input y Input z Output 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 L14: Boolean Logic and Basic Gates Fall 2005

Another Example with Three Variables x y z 1 0 0 1 0 1 1 0 1 f(x,y,z) = z’ + x y z L14: Boolean Logic and Basic Gates Fall 2005