XOR Operator A short digression… … to introduce another Boolean operation: exclusive- OR (XOR) ABA + B 000 011 101 110 XOR.

Slides:



Advertisements
Similar presentations
Digital Circuits.
Advertisements

Chapter 2 Logic Circuits.
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE 301 – Digital Electronics Karnaugh Maps (Lecture #7) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design,
Lecture 14 Today we will Learn how to implement mathematical logical functions using logic gate circuitry, using Sum-of-products formulation NAND-NAND.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.

Computer Organization and Assembly Language: Chapter 7 The Karnaugh Maps September 30, 2013 By Engineer. Bilal Ahmad.
Erik Jonsson School of Engineering and Computer Science FEARLESS Engineeringwww.utdallas.edu/~pervin EE/CE 2310 – HON/002 Introduction to Digital Systems.
PHY 201 (Blum)1 Karnaugh Maps References: Chapters 4 and 5 in Digital Principles (Tokheim) Chapter 3 in Introduction to Digital Systems (Palmer and Perlman)
EEE324 Digital Electronics Ian McCrumRoom 5B18, Lecture 4: Boolean Algebra.
Lecture 2 – Boolean Algebra Lecturer: Amy Ching Date: 21 st Oct 2002.
Digital Logic Chapter 4 Presented by Prof Tim Johnson
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
Department of Computer Engineering
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. K-Map (1)  Karnaugh Mapping is used to minimize the number of logic gates that are required in a digital circuit.
9/15/09 - L7 Two Level Circuit Optimization Copyright Joanne DeGroat, ECE, OSU1 Two Level Circuit Optimiztion An easier way to generate a minimal.
1 Digital Logic Design Week 5 Simplifying logic expressions.
Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Why? What’s Boolean algebra used for? –“The purpose of Boolean algebra is to facilitate the analysis and design of digital circuits.” Express a truth table.
Chapter 3 Gate-Level Minimization
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Minimisation ENEL111. Minimisation Last Lecture  Sum of products  Boolean algebra This Lecture  Karnaugh maps  Some more examples of algebra and truth.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
LOGIC GATES & BOOLEAN ALGEBRA
1 Minterm and Maxterm Expressions Definition: a minterm of n variables is a product of the variables in which each appears exactly once in true or complemented.
CS1Q Computer Systems Lecture 7
XOR Operator A short digression… … to introduce another Boolean operation: exclusive- OR (XOR) ABA + B XOR.
Computer Arithmetic, K-maps Prof. Sin-Min Lee Department of Computer Science.
Lecture 4 Introduction to Boolean Algebra. Binary Operators In the following descriptions, we will let A and B be Boolean variables and define a set of.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
BR 2/1/991 Truth Tables (again) Recall that a boolean equation can be represented by a Truth Table A B C F
THE K-MAP.
Karnaugh Maps Not in textbook. Karnaugh Maps K-maps provide a simple approach to reducing Boolean expressions from a input-output table. The output from.
C.S.Choy39 TERMINOLOGY Minterm –product term containing all input variables of a function in either true or complementary form Maxterm – sum term containing.
 Seattle Pacific University EE Logic System DesignKMaps-1 Two-Level Simplification All Boolean expressions can be represented in two- level forms.
Karnaugh Maps (K maps).
CEC 220 Digital Circuit Design SOP and POS forms Friday, January 23 CEC 220 Digital Circuit Design Slide 1 of 17.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
K-maps and Decoders Prof. Sin-Min Lee Department of Computer Science.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC:K-Map. K-Map (1)  Karnaugh Map provides a systematic method for simplifying Boolean expressions and may produce.
Assembly Lab1 - Review.
CHAPTER 3 Simplification of Boolean Functions
Department of Preparatory Year, Umm Al Qura University
De Morgan’s Theorem,.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Lecture #6 EGR 277 – Digital Logic
Karnaugh Maps.
Digital Logic and Design
BASIC & COMBINATIONAL LOGIC CIRCUIT
Digital Logic & Design Dr. Waseem Ikram Lecture 13.
Karnaugh Maps Topics covered in this presentation: Karnaugh Maps
ECE 331 – Digital System Design
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
Reading: Hambley Ch. 7 through 7.5
Dr. Clincy Professor of CS
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Karnaugh Maps (K maps).
Chapter 5 Combinational Logic Analysis
Analysis of Logic Circuits Example 1
Analysis of Logic Circuits Example 1
Circuit Simplification and
Digital Circuits.
Presentation transcript:

XOR Operator A short digression… … to introduce another Boolean operation: exclusive- OR (XOR) ABA + B XOR

XOR Operator Also referred to as an “odd” function since it returns a 1 only when an odd number of 1’s are input ABCA+B+C

Simplification Using the axioms to “prove” that a simplified version of a circuit is equivalent to the complex version takes a special kind of person… –…of which I’m not one Fortunately, there’s another way…

Karnaugh Maps Also known as K-Map Recall that an expression can be written in the form F(A,B,C) = Σ(0,2,4,5,6) Which means the functional value is 1 at binary input patterns 0, 2, 4, 5, 6 and 0 at all other input patterns –What does the truth table look like?

K-Maps F(A,B,C) = Σ(0,2,4,5,6) is called a “sum of minterms” representation The expression for such a representation is F(A,B,C) = A’B’C’ + A’BC’ + AB’C’ + AB’C + ABC’ We could simplify this via the axioms, right? (assuming we were that special kind of person) It’s painful!!!

K-Maps A K-Map is a grid (map) where each square corresponds to a minterm AB CD A B A A BC Note the ordering here is Gray code, not binary

K-Maps Notice how neighboring squares (minterms) differ by a single bit…this is the key to the whole thing –Consider minterms 1 and 3 1: A’B’C 3: A’BC –If we were to OR these together (A’B’C + A’BC) would simplify to A’C via the axioms

K-Maps Great, now what do we do with them? Place 1’s on the squares that correspond to minterms in the truth table Place 0’s on all other squares Group adjacent 1’s into the largest group whose size is a power of 2 –See example

K-Maps Notes: –Adjacencies wrap top-to-bottom and left-to- right –1’s can be part of more than one group –When you are grouping adjacent squares you’re essentially applying axiom 4 (x + x’ = 1) so the variable that is being “spanned” can be removed from the minterm

K-Maps We’ll do more of this next time so continue reading in Chapter 1

Assignment #4 Implement the method BooleanOperator in the given class public class BooleanOperator { static final int AND = 0; static final int OR = 1; static final int NOT = 2; static final int NAND = 3; static final int NOR = 4; static final int XOR = 5; static String BooleanOperator (String _lhs, String _rhs, int _oper) { String result = new String(); // -- YOUR CODE TO ASSIGN SOMETHING TO result GOES HERE return result; }

Assignment #4 The method should perform as follows –_lhs is a string of 0’s and 1’s corresponding to the left hand side of a Boolean operation –_rhs is a string of 0’s and 1’s corresponding to the right hand side of a Boolean operation –_oper specifies the Boolean operation to be performed The method should perform the specified operation on each of the “bit-pairs” in the two strings

Assignment #4 For example… …should return the string “0001” The other operators should work in a similar manner returning the appropriate bit patterns in the string The NOT operation should return the inverse of the _lhs operand (ignore the _rhs operand) If _lhs and _rhs are not the same length, your method should pad the shorter one with ‘0’s in the MSBs prior to performing the operation –i.e. _lhs = “11”, _rhs = “1” becomes _lhs = “11”, _rhs = “01” String result = BooleanOperator.BooleanOperator(“0011”, “0101”, BooleanOperator.AND);

Assignment #4 Create a test class (e.g. TestBoolean.java) to test your code by –Print out truth tables for each of the operators –Answer questions 1-1 and 1-2 on page 37 of the text. –Note that you may have to “chain” operations i.e. ABC must be done in two steps (AB)C which is allowed by the axioms

Assignment #4 Also, do problems 1-3, 1-4, 1-5, 1-6, and 1-7 on page 37 of the text –You won’t be using your program on these problems

Assignment #4 Turn in –A print out of your BooleanOperator.java –A print out of your TestBoolean.java –A print out of a screen shot of your results –Your answers to problems 1-3 through 1-7 Due next lecture (Tuesday)