Dr. Clincy Professor of CS

Slides:



Advertisements
Similar presentations
Programming Logic Gate Functions in PLCs
Advertisements

Boolean Algebra and Combinational Logic
Chapter 2: Combinatorial Logic Circuits Illustration Pg. 32 Logic Circuit Diagrams - Circuit Optimization -2,3,4 level maps 48 elements Optimized to 25.
Computer Programming Skills Revision Prepared by: Ghader Kurdi.
Boolean Algebra and Logic Simplification
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
Digital Logic Chapter 4 Presented by Prof Tim Johnson
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
CS231 Boolean Algebra1 K-map Summary K-maps are an alternative to algebra for simplifying expressions. – The result is a minimal sum of products, which.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University.
CS1Q Computer Systems Lecture 7
February 2, 2004CS 2311 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are AND, OR and.
Karnaugh Maps (K-Maps)
CS231 Boolean Algebra1 Summary so far So far: – A bunch of Boolean algebra trickery for simplifying expressions and circuits – The algebra guarantees us.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
1 Digital Logic Design Week 5&6 cont’d Revision for Quiz 2/Exam.
Chapter 3 Special Section Focus on Karnaugh Maps.
Karnaugh Map and Circuit Design.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
KARNAUGH MAP A Karnaugh map (K Map) is a pictorial method used to minimize boolean expressions without having to use boolean algebra theorems and equation.
Revision Mid 1 Prof. Sin-Min Lee Department of Computer Science.
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.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
Dr. ClincyLecture Slide 1 CS6020- Chapter 3 (3A and ) Dr. Clincy Professor of CS First Exam - Tuesday, September 6th Coverage: All subjects up to.
Assembly Lab1 - Review.
Boolean Algebra & Logic Gates
Digital Logic.
CHAPTER 3 Simplification of Boolean Functions
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Chapter 2: Boolean Algebra and Logic Functions
CS Chapter 3 (3A and ) Part 1 of 8
Dr. Clincy Professor of CS
CS Chapter 3 (3A and ) Part 1 of 8
Circuit analysis summary
Lecture 3 Gunjeet Kaur Dronacharya Group of Institutions
Dr. Clincy Professor of CS
Digital Logic and Design
Basics Combinational Circuits Sequential Circuits
Dr. Clincy Professor of CS
Dr. Clincy Professor of CS
Dr. Clincy Professor of CS
Dr. Clincy Professor of CS
BASIC & COMBINATIONAL LOGIC CIRCUIT
Digital Logic & Design Dr. Waseem Ikram Lecture 13.
Dr. Clincy Professor of CS
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
CS Chapter 3 (3A and ) Part 3 of 8
Dr. Clincy Professor of CS
CS Chapter 3 (3A and ) – Part 2 of 5
Dr. Clincy Professor of CS
ECB2212-Digital Electronics Boolean algebra
Unit 3 Simplification and K-map
CS Chapter 3 (3A and ) – Part 3 of 5
From now on: Combinatorial Circuits:
Lab Instructors will overview the MSP430
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Chapter 3 Special Section
Analysis of Logic Circuits Example 1
Basic circuit analysis and design
Copyright © Cengage Learning. All rights reserved.
Digital Logic Design Basics Combinational Circuits Sequential Circuits.
Karnaugh Map Method By: Asst Lec. Besma Nazar Nadhem
Circuit Simplification and
Computer Architecture
Presentation transcript:

Dr. Clincy Professor of CS CS 6021 - Chapter 3 Dr. Clincy Professor of CS Announcement: trip to China for 2 weeks (business) – last exam will be online (April 29th) – more details coming Dr. Clincy Slide 1 1

Conceptually Boolean Algebra Truth Table Logic Circuit

Boolean Algebra It is easy to convert a function to sum-of-products form using its truth table. We are interested in the values of the variables that make the function true (=1). Using the truth table, we list the values of the variables that result in a true function value. Each group of variables is then ORed together. The sum-of-products form for our function is: We note that this function is not in simplest terms. Our aim is only to rewrite our function in canonical sum-of-products form. Dr. Clincy Lecture

Logic Gates We have looked at Boolean functions in abstract terms. In this section, we see that Boolean functions are implemented in digital computer circuits called gates. A gate is an electronic device that produces a result based on two or more input values. In reality, gates consist of one to six transistors, but digital designers think of them as a single unit. Integrated circuits contain collections of gates suited to a particular purpose. Dr. Clincy Lecture

Logic Gates The three simplest gates are the AND, OR, and NOT gates. They correspond directly to their respective Boolean operations, as you can see by their truth tables. Dr. Clincy Lecture

Logic Gates Another very useful gate is the exclusive OR (XOR) gate. The output of the XOR operation is true only when the values of the inputs differ. XNOR is the complement to the XOR. Note the special symbol  for the XOR operation. Dr. Clincy Lecture

Logic Gates NAND and NOR are two very important gates. Their symbols and truth tables are shown at the right. Dr. Clincy Lecture

Logic Gates NAND and NOR are known as universal gates because they are inexpensive to manufacture and any Boolean function can be constructed using only NAND or only NOR gates. Dr. Clincy Lecture

Logic Gates Gates can have multiple inputs and more than one output. A second output can be provided for the complement of the operation. We’ll see more of this later. Dr. Clincy Lecture

Combinational Circuits We have designed a circuit that implements the Boolean function: This circuit is an example of a combinational logic circuit. Combinational logic circuits produce a specified output (almost) at the instant when input values are applied. In a later section, we will explore circuits where this is not the case (sequential circuits). Dr. Clincy Lecture

Combinational Circuits We have designed a circuit that implements the Boolean function: This circuit is an example of a combinational logic circuit. Combinational logic circuits produce a specified output (almost) at the instant when input values are applied. In a later section, we will explore circuits where this is not the case (sequential circuits). Dr. Clincy Lecture

Combinational Circuit – Example 1 - XOR C.How do we construct a truth table for the expression ? 1.Determine AND values 2.Determine OR values A. The expression for this circuit is this - explain B.The function is in the “sum-of-products” form – which is really this Digital logic implies the following order: NOT, AND, OR D.When comparing the output to the input pattern – we see we have an XOR case – we could replace that circuit with a simple XOR gate

Combinational Circuit – Example 2 Explain how to extract from the truth table the expression for the circuit for f1 Two 3-variable functions First, figure out the PRODUCTS that make f1 true/high/one – NOT the variables that 0 so that when they are ANDed, the result is 1 x x x f f 1 2 3 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Combinational Circuit – Example 2 continuing

Combinational Circuit – Example 2 continuing Given the expression initially, evaluate the expression and see if it is equal to the original output for f1 Evaluation of the expression x x + x x 1 2 2 3 x x x x x x x x x + x x = f 1 2 3 1 2 2 3 1 2 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Combinational Circuit – Example 2 continuing Two 3-variable functions Lets do f2 x x x f f 1 2 3 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Truth-table technique for proving equivalence of expressions This algebraic expression represents the distributive identity We can prove it is correct by constructing a truth table for the left-handside and the right-handside and seeing if they match Left-hand side Righ t-hand side w y z y + z w ( y + z ) w y w z w y + w z 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Kmaps - Introduction Simplification of Boolean functions leads to simpler (and usually faster) digital circuits. Simplifying Boolean functions using identities is time-consuming and error-prone. Kmaps presents an easy, systematic method for reducing Boolean expressions. In 1953, Maurice Karnaugh was a telecommunications engineer at Bell Labs. While exploring the new field of digital logic and its application to the design of telephone circuits, he invented a graphical way of visualizing and then simplifying Boolean expressions. This graphical representation, now known as a Karnaugh map, or Kmap, is named in his honor. Dr. Clincy Lecture

Description of Kmaps and Terminology A Kmap is a matrix consisting of rows and columns that represent the output values of a Boolean function. The output values placed in each cell are derived from the minterms of a Boolean function. A minterm is a product term that contains all of the function’s variables exactly once, either complemented or not complemented. For example, the minterms for a function having the inputs x and y are: Consider the Boolean function, Its minterms are: Dr. Clincy Lecture

Description of Kmaps and Terminology Similarly, a function having three inputs, has the minterms that are shown in this diagram. Dr. Clincy Lecture

Truth Table to Kmap Example A Kmap has a cell for each minterm. This means that it has a cell for each line for the truth table of a function. The truth table for the function F(x,y) = xy is shown at the right along with its corresponding Kmap. Dr. Clincy Lecture

Another Truth Table to Kmap Example As another example, we give the truth table and KMap for the function, F(x,y) = x + y at the right. This function is equivalent to the OR of all of the minterms that have a value of 1. Thus: Dr. Clincy Lecture

Kmap Simplification for Two Variables Of course, the minterm function that we derived from our Kmap was not in simplest terms. We can, however, reduce our complicated expression to its simplest terms by finding adjacent 1s in the Kmap that can be collected into groups that are powers of two. In our example, we have two such groups. Can you find them? Dr. Clincy Lecture

Kmap Simplification Rules for Two Variables The rules of Kmap simplification are: Groupings can contain only 1s; no 0s. Groups can be formed only at right angles; diagonal groups are not allowed. The number of 1s in a group must be a power of 2 – even if it contains a single 1. The groups must be made as large as possible. Groups can overlap and wrap around the sides of the Kmap. Dr. Clincy Lecture

Kmap Simplification for Three Variables A Kmap for three variables is constructed as shown in the diagram below. We have placed each minterm in the cell that will hold its value. Notice that the values for the yz combination at the top of the matrix form a pattern that is not a normal binary sequence. Pattern must be like this. Only 1 variable changes at a time Dr. Clincy Lecture

Kmap Simplification Example for Three Variables Consider the function: Its Kmap is given: Reduces to F(x) = z. Dr. Clincy Lecture

2nd Kmap Simplification Example for Three Variables Now for a more complicated Kmap. Consider the function: Its Kmap is shown below. There are (only) two groupings of 1s. Our reduced function is: Dr. Clincy Lecture

Kmap Simplification for Four Variables Our model can be extended to accommodate the 16 minterms that are produced by a four-input function. This is the format for a 16-minterm Kmap. Dr. Clincy Lecture

Kmap Simplification Example for Four Variables We have populated the Kmap shown below with the nonzero minterms from the function: Reduced to: Dr. Clincy Lecture

Kmap Simplification for Four Variables It is possible to have a choice as to how to pick groups within a Kmap, while keeping the groups as large as possible. The (different) functions that result from the groupings below are logically equivalent. Dr. Clincy Lecture

Don’t Care Conditions Real circuits don’t always need to have an output defined for every possible input. For example, some calculator displays consist of 7- segment LEDs. These LEDs can display 2 7 -1 patterns, but only ten of them are useful. If a circuit is designed so that a particular set of inputs can never happen, we call this set of inputs a don’t care condition. They are very helpful to us in Kmap circuit simplification. Dr. Clincy Lecture

Don’t Care Conditions In a Kmap, a don’t care condition is identified by an X in the cell of the minterm(s) for the don’t care inputs, as shown below. In performing the simplification, we are free to include or ignore the X’s when creating our groups. Reduction using don’t cares: Dr. Clincy Lecture

Don’t Care Example Could have the case where some input combinations do not need to be evaluated – these input combinations are called “don’t cares” For a k-map, use “don’t cares” in the case of creating groups of 2, 4, 8, … set of 1s – use “don’t cares as 1s to help minimize the circuit – at least one 1 has to be in a group of don’t cares

More Kmap Examples When adjacent squares contain 1s, indicates the possibility of an algebraic simplication Example of a 3-variable k-map Inputs around edge and output in the boxes