Identity. p ^ T p p _ F p. Idempotency. p _ p p p ^ p p. Associativity. (p _ q) _ r p _ (q _ r) (p ^ q) ^ r p ^ (q ^ r) Absorption

Similar documents
At this point in our study of digital circuits, we have two methods for representing combinational logic: schematics and truth tables.

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

Logic Design (Part 2) Combinational Logic Circuits (Chapter 3)

Chapter 2. Boolean Expressions:

Lecture 7 Logic Simplification

2/8/2017. SOP Form Gives Good Performance. ECE 120: Introduction to Computing. K-Maps Can Identify Single-Gate Functions

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

IST 4 Information and Logic

Variable, Complement, and Literal are terms used in Boolean Algebra.

UNIT 2 BOOLEAN ALGEBRA

Digital Fundamentals

CS February 17

Combinational Logic & Circuits

Introduction to Microprocessors and Digital Logic (ME262) Boolean Algebra and Logic Equations. Spring 2011

Menu. Algebraic Simplification - Boolean Algebra EEL3701 EEL3701. MSOP, MPOS, Simplification

2 Combinational Logic

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f?

Experiment 4 Boolean Functions Implementation

Unit-IV Boolean Algebra

Propositional Calculus. Math Foundations of Computer Science

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION

Incompletely Specified Functions with Don t Cares 2-Level Transformation Review Boolean Cube Karnaugh-Map Representation and Methods Examples

Objectives: 1. Design procedure. 2. Fundamental circuits. 1. Design procedure

CprE 281: Digital Logic

Lecture (04) Boolean Algebra and Logic Gates

Lecture (04) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee

Digital Logic Design (3)

Combinational Circuits Digital Logic (Materials taken primarily from:

2008 The McGraw-Hill Companies, Inc. All rights reserved.

Digital Circuits ECS 371

Chapter 2 Part 4 Combinational Logic Circuits

Logic Design: Part 2

QUESTION BANK FOR TEST

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

UNIT-4 BOOLEAN LOGIC. NOT Operator Operates on single variable. It gives the complement value of variable.

1. Mark the correct statement(s)

Lecture (05) Boolean Algebra and Logic Gates

Circuit analysis summary

Digital logic fundamentals. Question Bank. Unit I

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Boolean Algebra. P1. The OR operation is closed for all x, y B x + y B

Boolean algebra. June 17, Howard Huang 1

Announcements. Chapter 2 - Part 1 1

Standard Forms of Expression. Minterms and Maxterms

CS8803: Advanced Digital Design for Embedded Hardware

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

TA: Jade Cheng ICS 241 Recitation Lecture Notes #12 November 13, 2009

24 Nov Boolean Operations. Boolean Algebra. Boolean Functions and Expressions. Boolean Functions and Expressions

Outline. EECS Components and Design Techniques for Digital Systems. Lec 9 Putting it all together Digital design - as we ve seen it

2.6 BOOLEAN FUNCTIONS

Introduction to Computer Architecture

Combinational Devices and Boolean Algebra

University of Technology

Definitions. 03 Logic networks Boolean algebra. Boolean set: B 0,

SYNERGY INSTITUTE OF ENGINEERING & TECHNOLOGY,DHENKANAL LECTURE NOTES ON DIGITAL ELECTRONICS CIRCUIT(SUBJECT CODE:PCEC4202)

Introduction to Boole algebra. Binary algebra

BOOLEAN ALGEBRA AND CIRCUITS

CSE 140 Homework One

Lecture 22: Implementing Combinational Logic

Computer Science. Unit-4: Introduction to Boolean Algebra

IT 201 Digital System Design Module II Notes

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

Chapter 2: Combinational Systems

Boolean Algebra and Logic Gates

Boolean logic. Boolean Algebra. Introduction to Computer Yung-Yu Chuang NOT AND NOT

Introduction to Boolean logic and Logical Gates

Lecture 7. Summary of two-level combinational-logic. Ways of specifying circuits. Solving combinational design problems. Verilog versus VHDL

LECTURE 4. Logic Design

Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions

ENGIN 112 Intro to Electrical and Computer Engineering

2.1 Binary Logic and Gates

BOOLEAN ALGEBRA. 1. State & Verify Laws by using :

ENGIN 112 Intro to Electrical and Computer Engineering

Boolean Algebra. BME208 Logic Circuits Yalçın İŞLER

Software Engineering 2DA4. Slides 2: Introduction to Logic Circuits

Basic circuit analysis and design. Circuit analysis. Write algebraic expressions or make a truth table

Gate-Level Minimization. section instructor: Ufuk Çelikcan

R.M.D. ENGINEERING COLLEGE R.S.M. Nagar, Kavaraipettai

X Y Z F=X+Y+Z

CS470: Computer Architecture. AMD Quad Core

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Midterm Exam Review. CS 2420 :: Fall 2016 Molly O'Neil

Simplification of two-level combinational logic

Section 001. Read this before starting! You may use one sheet of scrap paper that you will turn in with your test.

Specifying logic functions

Experiment 3: Logic Simplification

Boolean Functions (10.1) Representing Boolean Functions (10.2) Logic Gates (10.3)

COPYRIGHTED MATERIAL INDEX

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

ENGIN 112. Intro to Electrical and Computer Engineering

Simplification of Boolean Functions

Gate Level Minimization

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Code No: 07A3EC03 Set No. 1

DSAS Laboratory no 4. Laboratory 4. Logic forms

Computer Organization and Levels of Abstraction

Binary logic. Dr.Abu-Arqoub

DKT 122/3 DIGITAL SYSTEM 1

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

Transcription:

dam lank pring 27 E 3 Identity Pre-Lecture Problem Do it! Do it now! What are you waiting for?! Use Logical Equivalences to show!! $! & & $! p ^ T p p _ F p Domination p _ T T p ^ F F Idempotency p _ p p p ^ p p Foundations of omputing I ommutativity p _ q q _ p p ^ q q ^ p bsorption p _ (p ^ q) p p ^ (p _ q) p Double Negation ssociativity (p _ q) _ r p _ (q _ r) (p ^ q) ^ r p ^ (q ^ r) Negation p _ p T p ^ p F Law of Implication Distributivity p ^ (q _ r) (p ^ q) _ (p ^ r) p _ (q ^ r) (p _ q) ^ (p _ r) DeMorgan s Laws (p _ q) p ^ q (p ^ q) p _ q ontrapositive p p p! q p _ q p! q q! p ombinational Logic Example essions of lass: We would like to compute the number of lectures or quiz sections remaining at the start of a given day of the week. Inputs: Day of the Week, Lecture/ection flag Output: Number of sessions left Examples: Input: (Wednesday, Lecture) Output: 2 Input: (Monday, ection) Output: Implementation in oftware public'int classesleftinmorning(weekday,'lecture_flag)'{ switch'(weekday)'{ case'undy: case'mondy: return'lecture_flag?'3':'; case'tuedy: case'wednedy: return'lecture_flag?'2':'; case'thurdy: return'lecture_flag?'':'; case'fridy: return'lecture_flag?'':'; case'turdy: return'lecture_flag?'':'; } } Implementation with ombinational Logic Defining Our Inputs! Encoding: How many bits for each input/output? inary number for weekday One bit for each possible output Weekday Input: inary number for weekday unday =, Monday =, We care about these in binary: Weekday Lecture? Weekday Number inary unday () 2 Monday () 2 Tuesday 2 () 2 Wednesday 3 () 2 Thursday 4 () 2 2 3 Friday 5 () 2 aturday 6 () 2

onverting to a Truth Table! onverting to a Truth Table! case'undy'or'mondy: return'lecture_flag?'3':'; case'tuedy'or'wednedy: return'lecture_flag?'2':'; case'thurdy: return'lecture_flag?'':'; case'fridy: return'lecture_flag?'':'; case'turdy: return'lecture_flag?'':'; Weekday Lecture? c c c 2 c 3 UN UN MON MON TUE TUE WED case'undy'or'mondy: return'lecture_flag?'3':'; case'tuedy'or'wednedy: return'lecture_flag?'2':'; case'thurdy: return'lecture_flag?'':'; case'fridy: return'lecture_flag?'':'; case'turdy: return'lecture_flag?'':'; Weekday Lecture? c c c 2 c 3 WED THU! FRI FRI T! -! Let s begin by finding an expression for c 3. To do this, we look at the rows where c 3 = (true). DY == UN && L == DY == MON && L == d 2 d d == && L == d 2 == && d == && d == && L == d 2 d d == && L == d 2 == && d == && d == && L == ubstituting DY for the binary representation. plitting up the bits of the day; so, we can write a formula.

d 2 d d L d 2 d d L Replacing with oolean lgebra d 2 d d L d 2 d d L Either situation causes c 3 to be true. o, we or them. Truth Table to Logic (Part 2) Truth Table to Logic (Part 3) Now, we do c 2. Now, we do c : d 2 d d L d 2 d d L d 2 d d L d 2 d d L??? d 2 d d L Truth Table to Logic (Part 3) Now, we do c : d 2 d d L d 2 d d L d 2 d d L d 2 d d L d 2 d d d 2 d d L No matter what L is, we always say it s. o, we don t need L in the expression. Truth Table to Logic (Part 3) Now, we do c : d 2 d d L d 2 d d L d 2 d d L d 2 d d L d 2 d d d 2 d d L No matter what L is, we always say it s. o, we don t need L in the expression. c = d 2 d d L + d 2 d d L + d 2 d d L + d 2 d d L + d 2 d d + d 2 d d L

Truth Table to Logic (Part 4) c = d 2 d d L + d 2 d d L + d 2 d d L + d 2 d d L + d 2 d d + d 2 d d L Finally, we do c : d 2 d d L d 2 d d d 2 d d Truth Table to Logic (Part 4) c = d 2 d d L + d 2 d d + d 2 d d c = d 2 d d L + d 2 d d L + d 2 d d L + d 2 d d L + d 2 d d + d 2 d d L Here s c 3 as a circuit: d NOT 2 ND d NOT OR ND d NOT L E 3: Foundations of omputing Lecture 4: oolean lgebra, ircuits, anonical Forms oolean lgebra oolean algebra to circuit design oolean algebra a set of elements containing {, } binary operations { +, } and a unary operation { } such that the following axioms hold:. the set contains at least two elements:, For any a, b, c in : 2. closure: a + b is in a b is in 3. commutativity: a + b = b + a a b = b a 4. associativity: a + (b + c) = (a + b) + c a (b c) = (a b) c 5. identity: a + = a a = a 6. distributivity: a + (b c) = (a + b) (a + c) a (b + c) = (a b) + (a c) 7. complementarity: a + a = a a = xioms and Theorems of oolean lgebra identity:. X + = X D. X = X null: 2. X + = 2D. X = idempotency: 3. X + X = X 3D. X X = X involution: 4. (X ) = X complementarity: 5. X + X = 5D. X X = commutativity: 6. X + Y = Y + X 6D. X Y = Y X associativity: 7. (X + Y) + Z = X + (Y + Z) 7D. (X Y) Z = X (Y Z) distributivity: 8. X (Y + Z) = (X Y) + (X Z) 8D. X + (Y Z) = (X + Y) (X + Z) xioms and Theorems of oolean lgebra uniting: 9. X Y + X Y = X 9D. (X + Y) (X + Y ) = X absorption:. X + X Y = X D. X (X + Y) = X. (X + Y ) Y = X Y D. (X Y ) + Y = X + Y factoring: 2. (X + Y) (X + Z) = 2D. X Y + X Z = X Z + X Y (X + Z) (X + Y) consensus: 3. (X Y) + (Y Z) + (X Z) = 3D. (X + Y) (Y + Z) (X + Z) = X Y + X Z (X + Y) (X + Z) de Morgan s: 4. (X + Y +...) = X Y... 4D. (X Y...) = X + Y +...

Proving Theorems (Rewriting) Using the laws of oolean lgebra: Proving Theorems (Rewriting) Using the laws of oolean lgebra: prove&the&theorem:&&&&&&&&&&&&&&&&x2 2Y2+2X2 2Y 2=222X prove&the&theorem:&&&&&&&&&&&&&&&&x2 2Y2+2X2 2Y 2=222X X2 Y2+2X2 Y 2=2 distributivity (8) complementarity2(5) identity2(d) X2 Y2+2X2 Y =2 X2 2(Y2+2Y ) =222X2 () =222X2 prove&the&theorem:&&&&&&&&&&&&&&&&&&&&&x2+2x2 2Y222=222X prove&the&theorem:&&&&&&&&&&&&&&&&&&&&&x2+2x2 2Y222=222X X22+22X2 2Y2 =2 identity2(d) distributivity (8) uniting2(2) identity2(d) X22+22X2 2Y2 =222X2 2222+22X2 2Y =222X2 2(2+2Y) =222X2 () =222X2 Proving Theorems (Truth Table) Using complete truth table: For example, de Morgan s Law: (X2+2Y) 2=2X 2 2Y NOR2is2equivalent2to2ND2 with2inputs2complemented (X2 2Y) 2=2X 2+2Y NND2is2equivalent2to2OR2 with2inputs2complemented X Y X Y (X2+2Y) 2222X 2 2Y 222222222222222222 X Y X Y (X2 2Y) X 2+2Y 2 22 222222 2222222222222 implifying using oolean lgebra c3 = d2 d d L + d2 d d L = d2 d (d + d) L = d2 d () L = d2 d L d2 d L NOT NOT ND Let s make a circuit that adds three single bit inputs together into a single binary number Let s make a circuit that adds three single bit inputs together into a single binary number + + + + + + + + + + + + + + + + + + + +

Larger um? Inputs:,2,2 Outputs: TwoRbit2um + To get a sum of numbers with more bits, we can combine two of our original circuit together! Larger um? Larger um? arry From Right arry From Right + Discard2This2it OUT IN To support this idea, we rename our inputs/outputs. IN OUT Inputs:,2,2arryRin Outputs: um,2arryrout OUT IN Inputs:,2,2arryRin OUT IN Outputs: um,2arryrout IN OUT IN OUT Derive an expression for IN OUT IN IN IN = IN + IN + IN + IN IN

Inputs:,2,2arryRin OUT IN Inputs:,2,2arryRin OUT IN Outputs: um,2arryrout Outputs: um,2arryrout IN OUT Derive an expression for OUT IN OUT IN OUT = IN + IN + = IN + IN + IN + IN OUT = IN + IN + IN + IN IN IN IN IN + IN = IN + IN + IN + IN pply Theorems to implify Expressions 2-bit Ripple-arry dder The theorems of oolean algebra can simplify expressions e.g., full adder s carry-out function 2 2 out =22 22in +22 2in +222in 2+222in =22 22in +222 2in +2222in 22+2222in +2222in =22 22in +2222in +222 2in +2222in 22+2222in =22( 2+2)22in +222 2in +2222in 22+2222in =22()22in +222 2in +2222in 22+2222in =222in +222 2in +222in 22+2222in +2222in =222in +222 2in +2222in +2222in 22+2222in =222in +222( 2+2)2in +2222in 22+2222in =222in +222()2in +2222in 22+2222in =222in +222in +2222(in 2+22in) =222in +222in +2222() =222in +222in +2222 adding2extra2terms2 creates2new2factoring2 opportunities in in in in.it/dder um out um out in out um in out um in out um 2 Mapping Truth Tables to Logic Gates anonical Forms 2 Given a truth table:. Write the oolean expression 2. Minimize the oolean expression 3. Draw as gates 4. Map to available gates F/=/ + + + =/ ( +)+( +) =/ + 3 not F 4 not ////F //// //// //// //// //// //// //// //// F Truth table is the unique signature of a oolean Function The same truth table can have many gate realizations We ve seen this already Depends on how good we are at oolean simplification anonical forms tandard forms for a oolean expression We all come up with the same expression

um-of-products anonical Form K Disjunctive Normal Form (DNF) K Minterm Expansion F F"=" "+" "+" "+" "+" Read T rows off truth table dd the minterms together 2 3 onvert to oolean lgebra F um-of-products anonical Form Product term (or minterm) NDed product of literals input combination for which output is true each variable appears exactly once, true or inverted (but not both) minterms F2in2canonical2form: F(,2,2) =2 2+2 2+2 2+2 2+2 canonical2form2 minimal2form F(,2,2) =2 2+2 2+2 2+22+2 2 =2( 2+2 2+2 2+2)2+2 =2(( 2+2)( 2+2))2+2 =22+2 =2 2+2 =22+2